search for: slctn

Displaying 1 result from an estimated 1 matches for "slctn".

Did you mean: slct
2005 Jul 08
1
how to do something like symptoms==c('a', 'e', 'z')
...c('a','e','z')) Uwe Ligges > > > (which is incorrect unless symptoms is, in this case, an integer multiple of 3 long). > > Is there, or if not, is there a more efficient/elegant way than > > select.elements <- function(data, lst) > { > slctn <- data == lst[1] > for( e in 2:length(lst) ){ > slctn <- slctn | (data==lst[e]) > } > slctn > } > > > ##> select.elements( 1:10, c(1,5,10) ) > [1] TRUE FALSE FALSE FALSE TRUE FALSE FALSE FALSE FALSE TRUE > > Thanks, > RenE > > _______...