[R] add counter to file name + dir.create

From: Yasin Hajizadeh <yasin_reservoir_at_yahoo.com>
Date: Thu, 19 Jun 2008 07:39:50 -0700 (PDT)


Hi all    

  I have 2 loops with 2 counters, say outer loop counter is X and inner loop counter is Y. In outer loop a data file with known number of columns and unknown number of rows is generated in each script iteration. What inner loop should do is to read this file line by line and generate a directory for each row, then put the elements of that row in a text file insides the generated directory and then execute another script inside that directory ( system command )   I have 2 questions: I want the name of the directory to be unique and I am going to generate them by dir.create ( tell me if there is a better way ), so In the name which will be created, I want to add X, Y, so all the files generated at each inner loop and in next iterationsbe unique. How I can add X and Y to the file name?   and the second question is general comments on the script structure itself.    

  Thank you so much ( IN ADVANCE )    

  Cheers

       
	[[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. Received on Thu 19 Jun 2008 - 15:02:34 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 Fri 20 Jun 2008 - 19:31:01 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.

list of date sections of archive