Way are you taking the forth argument of the paste
?paste("arunoff_",table_year,
sep="")[4]

Either way, way not use something like:
colnames(x)[column to change] <- "text, or pasted text"

Cheers,
Tal




On Thu, Mar 26, 2009 at 2:33 PM, Steve Murray <smurray444@hotmail.com>wrote:

>
> Dear all,
>
> I'm trying to assign a name to the fourth column whilst using 'assign', but
> keep encountering errors. What have I done wrong?!
>
> > assign(colnames(c(paste("arunoff_",table_year, sep="")[4]), "COUNT"))
>
> Error in if (do.NULL) NULL else if (nc> 0) paste(prefix, seq_len(nc),  :
>  argument is not interpretable as logical
>
>
> Hope someone is able to help.
>
> Thanks for any pointers,
>
> Steve
>
>
> _________________________________________________________________
> [[elided Hotmail spam]]
>
> ______________________________________________
> R-help@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.
>



-- 
----------------------------------------------


My contact information:
Tal Galili
Phone number: 972-50-3373767
FaceBook: Tal Galili
My Blogs:
http://www.r-statistics.com/
http://www.talgalili.com
http://www.biostatistics.co.il

	[[alternative HTML version deleted]]


