[英]R; Using manipulate function and get : Error in (function (x) : unused argument (envir = <environment>)
I intend to use manipulate
: 我打算使用
manipulate
:
install.packages("UsingR")
library(manipulate)
library(UsingR)
data(galton)
########## Manipulable Histogram ##########
myHist <- function(mu, Color){
hist(galton$child, col=Color, breaks=10)
lines(c(mu,mu), c(0, 150), col="red", lwd=5)
}
manipulate(myHist(mu, Color), mu = slider(62, 74, step=.5),
Color=picker("blue", "red", initial="blue"))
I always get this error while using manipulate: 使用操作时,我总是会收到此错误:
Error in (function (x) : unused argument (envir = )
(函数(x)中的错误:未使用的参数(envir =)
I do not see any issue in the code above. 我在上面的代码中没有看到任何问题。 I have NO IDEA of why I get this error.
我不知道为什么会收到此错误。 My R session is clean and new.
我的R会话很新。
I am using R3.2 64 bits
through R Studio Version 0.99.441
. 我通过
R Studio Version 0.99.441
使用R3.2 64 bits
。 Any idea of the missing settings ? 对缺少的设置有任何想法吗?
通过将Rstudio中的“ R”目录设置为文件夹win-library所在的默认工作目录,找到了答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.