Re: [R] howto get the number of columns and column names of multiply data frames

2009-08-10 Thread Frank Schäffer
Thanks for your replies. Both, Don and Stevens solutions worked well. Best regards Frank __ 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

Re: [R] howto get the number of columns and column names of multiply data frames

2009-08-09 Thread Don MacQueen
## You can use get() for ( i in 1:n) { nm <- paste('dataframe',i,sep='') cat( ncol( get(nm)), 'columns in',nm,'\n') ) } ## or nms <- ls(pattern='dataframe') for (nm in nms) cat( ncol(get(nm)) , 'columns in',nm,'\n') ) } (Assuming I have balanced parantheses, that is -- my email software

Re: [R] howto get the number of columns and column names of multiply data frames

2009-08-09 Thread Steve Lianoglou
Hi, On Aug 9, 2009, at 11:29 AM, Frank Schäffer wrote: Hi, I' ve read in several files with measurements into R data frames(works flawlessly). Each dataframe is named by the location of measurement and contains hundreds of rows and about 50 columns like this dataframe1. date measurment_1 .