I have looked absolutely everywhere but I cannot figure out why my Mac will not let me create simple data vectors.> blahError: object 'blah' not found> blah <- c(1, 2, 3)Error in c(1, 2, 3) : 'file' must be a character string or connection It used to work, and 6 months later I'm back on R, and now it will not work. Please help, guys & gals! -- View this message in context: http://r.789695.n4.nabble.com/Vector-Assignment-Why-won-t-it-let-me-do-it-tp2281698p2281698.html Sent from the R help mailing list archive at Nabble.com.
RICHARD M. HEIBERGER
2010-Jul-08 03:09 UTC
[R] Vector Assignment -- Why won't it let me do it?
> > > > blah > Error: object 'blah' not found > > blah <- c(1, 2, 3) > Error in c(1, 2, 3) : 'file' must be a character string or connection > > It used to work, and 6 months later I'm back on R, and now it will not > work. > > Most likely, you inadvertently masked the base function c with your ownfunction c that does something else. Type c and see what it shows. [[alternative HTML version deleted]]
On Jul 7, 2010, at 8:39 PM, Adam Berrones wrote:> > I have looked absolutely everywhere but I cannot figure out why my > Mac will > not let me create simple data vectors. > >> blah > Error: object 'blah' not found >> blah <- c(1, 2, 3) > Error in c(1, 2, 3) : 'file' must be a character string or connectionNot able to reproduce on a Mac. It appears that you may have redefined c() > blah <- c(1, 2, 3) > blah [1] 1 2 3 What do you get with?: c I get: > c function (..., recursive = FALSE) .Primitive("c") > sessionInfo() R version 2.10.1 Patched (2010-02-17 r51152) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.10.1 I would try: rm(c) -- David> > It used to work, and 6 months later I'm back on R, and now it will > not work. > > Please help, guys & gals! > > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Vector-Assignment-Why-won-t-it-let-me-do-it-tp2281698p2281698.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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.