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)why can't 'second' run...? thx in advance... -r
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
Mindreading option not enabled. Please make your example reproducible by including all code necessary for us to reproduce your problem starting from an empty R environment. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. On November 10, 2014 4:10:39 PM PST, RICHARD M KARCICH <rmkarcich at msn.com> 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) >why can't 'second' run...? thx in advance... >-r > > > >------------------------------------------------------------------------ > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.