简体   繁体   中英

Error in recoding function from package epicalc

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM