I am trying to use recode
function for demarcation of value in a variable but am not able to do so with a specific variable only where as it is working fine for another variable.
recode(age, age > 60, NA)
Error in recode.default(age, age > 60, NA) : object '.data' not found
What to do?
I think you could just do
age[age>60] <- NA
Note that epicalc is somewhat obsolete ... . It looks like epicalc operates by default on a data frame called .data , which could make things difficult ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.