Thanks, David.
By going through the code, I came to a similar conclusion also: it seems the
match.2.list function must be modified in the following way to make it work:
match.2.list <- function(l1,l2){
if (class(l1)=="element"){
l1 <- l1[[1]]
l2 <- l2[[1]]
}
length(l1)==length(l2)
}
because d
Hi,
does anyone know if it is possible to construct sets of S4 objects?
It seems the constructor set does not like it:
Error in as.vector(x, "character") :
cannot coerce type 'environment' to vector of type 'character'
Regards
Johnny
[[alternative HTML version deleted]]
Hi,
Is there a simple package to manage sets of general objects, and perform
simple operations like:
- union
- intersection
- difference
- test for membership...
but where the equality test between 2 objects is under the control of the
programmer?
In the base package, it seems only operations on
Hi,
I tried to use the sets package yesterday, which seems to be a very powerful
package: thanks to the developers. I wanted to define sets of lists where 2
lists are considered equal if they have the same length.
So, I implemented:
match.2.list <- function(l1,l2){
length(l1)==length(l2)
}
and
Hello,
I wanted to parse some information from a text, where fields are tab
separated.
When I copy the text into an R session (under emacs) like:
mystring <- "field1 field2 field3"
the tab character is replaced by a single space!
For ex, if I type mystring, I get:
"field1 field2 field3"
The ta
5 matches
Mail list logo