[R] can rows of text be repeated using R to create a new datafile

2006-07-08 Thread Bob Green
I am hoping for some advice as to whether the following task can be performed in R? I have a spreadsheet with 325 rows x 3 columns. The data was collected from 40 individuals who in most instances generated 8 bi-polar constructs (the poles are separated by //). The first column is the

Re: [R] can rows of text be repeated using R to create a new datafile

2006-07-08 Thread Gabor Grothendieck
Open Excel, select the data and press ctrl-C. In R, type this line at the console to read the clipboard into a data frame DF (or see the section on Excel in the R Import/Export manual for other ways): DF - read.delim(clipboard, header = TRUE) Now you can do this: DF[rep(1:nrow(DF), each =