简体   繁体   中英

New to R. I am trying add .01 the 0.00 values in the Glass$Fe from the mlbench package

I don't what to assign the 0.00 as NA but by simply adding .01 to all values that are 0.00. I need this to eliminate an error using symbox from the car package.

symbox(Glass$Fe, data=Glass, powers=c(3,2,1,0,-0.5,-1,-2)) Error in bc1(out, lambda) : First argument must be strictly positive.

My instructor recommended not to remove the 0.00 values just make them slightly positive.

Thanks,

一个更完整的问题将包括代码,以加载任何包含symbox程序包以及示例数据集,但是如果唯一的愿望是将Glass $ Fe .01的值移向正值,则尝试:

symbox(Glass$Fe+0.01, data=Glass, powers=c(3,2,1,0,-0.5,-1,-2))

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