R等使用操作函数和get:错误(函数(x):未使用的参数(envir = <environment>)

时间:2015-10-27 23:22:25

标签: r environment

我打算使用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"))

使用操作时总是会出现此错误:

  

(函数(x):未使用的参数(envir =)

中的错误

我在上面的代码中没有看到任何问题。我没有想到为什么我会收到此错误。我的R会议很干净而且很新。

我正在使用R3.2 64 bitsR Studio Version 0.99.441。 想知道丢失的设置吗?

1 个答案:

答案 0 :(得分:0)

通过设置&#34; R&#34;找到答案。 Rstudio中的目录作为文件夹win-library所在的默认工作目录。