[R] Transform counts into presence/absence
Johannes Radinger
JRadinger at gmx.at
Thu May 31 13:13:24 CEST 2012
Hi,
I am looking for a very easy way to transform
a column in a dataframe from counts (eg. c(1,0,21,2,0,0,234,2,0))
into a binary form to get presence/absence values
e.g. c(1,0,1,1,0,0,1,1,0). Is there a simple built-in function?
or do I have do to it with a replaceement funciton using IF x > 0
THEN 1 etc.?
/johannes
--
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
More information about the R-help
mailing list