[R] How to create a mixed col.names?

From: Jonas Malmros <jonas.malmros_at_gmail.com>
Date: Mon, 17 Dec 2007 15:08:09 +0100


Hello,

I have a vector of names, say :

names <- c("Factor 1", "Factor 2", Factor 3")

I am creating a dataframe and I want the column names to be mixed like this:
"Factor 1" " Sign Factor 1" "Factor 2" "Sign Factor 2" "Factor 3"
"Sign Factor 3"

How can I automate the creation of such a mixed vector? I tried with rep but did not succeed.

Could someone please suggest a solution to this problem? Thanks in advance!

Regards,
JM

-- 
Jonas Malmros
Stockholm University
Stockholm, Sweden

______________________________________________
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.
Received on Mon 17 Dec 2007 - 14:11:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 17 Dec 2007 - 15:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.