[R] Vector Assignment -- Why won't it let me do it?

David Winsemius dwinsemius at comcast.net
Thu Jul 8 05:14:42 CEST 2010


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 connection

Not 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.



More information about the R-help mailing list