Re: [R] How to automatically create data frames from an existing one?

2017-01-11 Thread MacQueen, Don
I don't know what the matlab eval() function does, but this example might help you get started with the way R does things: lapply( rwrdatafile, summary) This will apply the summary() function to every column of the data frame. As others have mentioned, it is bad R to create separate variables

Re: [R] How to automatically create data frames from an existing one?

2017-01-11 Thread William Dunlap via R-help
You can use the 'with' function or the 'data' argument to many functions to use the variables in the data frame without copying them out to the global environment. Leaving them in the data.frame keeps them from getting lost among the temporary variables in the global environment. > Data <-

Re: [R] How to automatically create data frames from an existing one?

2017-01-11 Thread Sarah Goslee
I do not understand why you want to take a perfectly good data frame and split it into a whole bunch of single-column data frames instead of working with it as-is. The latter seems like an awkward and unnecessary thing to do. If you explain what you're trying to do, we can help. Referencing

[R] How to automatically create data frames from an existing one?

2017-01-11 Thread Tunga Kantarcı
I have a data frame that includes several columns representing variables and variables names are indicated at the top row of the data frame. That is, I had a csv file where variable names were stored in the top row, and when I imported the csv file to R, R created a data frame that appears with