[英]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. 我没有将0.00分配为NA的方法,而只是将.01添加到所有0.00值中。 I need this to eliminate an error using symbox from the car package.
我需要这样做来消除在汽车包装中使用symbox引起的错误。
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.
symbox(Glass $ Fe,data = Glass,powers = c(3,2,1,0,-0.5,-1,-2))bc1(out,lambda)中的错误:第一个参数必须严格为正。
My instructor recommended not to remove the 0.00 values just make them slightly positive. 我的教练建议不要删除0.00值,只是使它们稍微偏正即可。
Thanks, 谢谢,
一个更完整的问题将包括代码,以加载任何包含symbox
程序包以及示例数据集,但是如果唯一的愿望是将Glass $ Fe .01的值移向正值,则尝试:
symbox(Glass$Fe+0.01, data=Glass, powers=c(3,2,1,0,-0.5,-1,-2))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.