Try:
names(a) <- b
On Mon, Mar 15, 2010 at 4:55 PM, Xumin Zeng <xumin.zeng at abbott.com>
wrote:> Hi,
>
> Do you know how to assign colnames from one list to another, for example.
> a=c(1,2,3)
> b=c("A","B","C")
>
> how can I get the dataset
>
> A B C
> 1 ?2 3
>
> where A, B and C are colnames. Thanks.
>
> Xumin
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
--
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O