On 02/10/2010 06:02 PM, Amelia Livington wrote:
Dear R helpers

I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three 
varaibles at random at a time for my analysis and name these files as 
input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF 
and PQR, I am passing the specifications of these variables to input1.csv, 
input2.csv and input3.csv respectively.

This means in another case even if I choose say LMN, DEF and XYZ in this order, 
then my input1.csv will have details of LMN, input2.csv will have detaisl of 
DEF and input3.csv will have details of XYZ. Thus, I am keeping the (input) 
file names constant but the contents of each of these input files may change 
from one case to another case.

As an example, my input files are as given below.

Hi Amelia,

I think you have just won the Posting Guide Medal of Honor for a message containing such a detailed description of the problem. I also think that what you need is:

names(name1)[1]

where you want the name of the variable in the file "input1.csv" that is read into the object named "name1". If this sounds confusing, read in the file as in your excellent example and then execute the above command.

Jim

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

Reply via email to