[R] upgrade from 3.1.1 > 3.1.2

David Winsemius dwinsemius at comcast.net
Tue Nov 11 05:45:31 CET 2014


On Nov 10, 2014, at 4:10 PM, RICHARD M KARCICH wrote:

> in 3.1.1, i had a few small scripts like the one attached -- 
> installed 3.1.2, then from the R-console, i chg dir and can successfully source() the mycode.R --
> however, 
>> getwd()[1] "C:/RProgramming"> dir()[1] "forCondition.R"  "ifCondition.R"   "mycode.R"        "nestedForLoop.R"[5] "whileLoop.R"    > source ("mycode.R")> ls()[1] "myfunction" "second"    > second(4)Error in second(4) : unused argument (4)

I'm guessing this is supposed to appear as:

getwd()[1] "C:/RProgramming"
> dir()[1] "forCondition.R"  "ifCondition.R"   "mycode.R"        "nestedForLoop.R"
[5] "whileLoop.R"    
> source ("mycode.R")
> ls()
[1] "myfunction" "second"    
> second(4) 
Error in second(4) : unused argument (4)

R seems to be saying that the `second` function does not have any arguments in its formals. If you think this error message is not describing the reality of your code, then why did you not provide the code????

> why can't 'second' run...?  thx in advance...

R told you. You gave it too many arguments. I seriously doubt this has anything to do with the upgrade. This is not a behavior that changed in R 3.1.2

> -r


-- 
David Winsemius
Alameda, CA, USA



More information about the R-help mailing list