Displaying 2 results from an estimated 2 matches for "idworkin".
Did you mean:
dworkin
2010 May 26
1
More efficient way to use ifelse()? - A follow up
...plemented
# Dennis Murphy suggested switch.. I have not gotten it working yet..
elevation.DM <- switch(Population, "CO"= 2169, "CN" = 1121, "Ga" =
500, "KO" = 2500, "Mw" = 625, "Ng" = 300 )
On 26 May 2010 01:25, Ian Dworkin <idworkin at msu.edu> wrote:
> # This is more about trying to find a more effecient way to code some
> simple vectorized computations using ifelse().
>
> # Say you have some vector representing a factor with a number of
> levels (6 in this case), representing the location that samples were...
2010 May 26
4
More efficient way to use ifelse()?
...NA, NA,
NA))
# It makes sense to me why this does not work (elevation.take.2), but
I am not sure how to get it to work. Any suggestions? I suspect it
involves a trick using "any" or "II" or something, but I can't seem to
work it out.
# Thanks in advance!
# Ian Dworkin
# idworkin at msu.edu