[R] generate multipe output .csv files in a loop

2009-04-22 Thread Gator Connection
I need to generate output files as .csv file in a loop: let's say, I want to generate a sequence of files according to the loop number "i". the first file genearted should be file1.csv the second should be file2.csv I use: write.csv(temp, "file$i$.csv") in the loop but it did not work. can

[R] FW: merge multiple csv files

2008-02-08 Thread Gator Connection
Dear list:I have a folder that contains more than 50 csv files labels sequencially like sample01.csv to sample50.csv. for each file the first 5 rows are descriptive of the data collected (useful but not needed in data merge). each file then start the data at row 6 and have 2 variables x and

[R] help on establishing a matrix

2008-01-30 Thread Gator Connection
I am a beginner and this is a naive question. I have the following data set. row column height 1 2 96 3 7 67 9 25 77 .. I have a matrix of 50*100 data points and about 60% of them are zeros. I want to put the height data into the matrix according to their row and column numbers. does anybody