Re: [Rd] loading multiple CSV files into a single data frame

From: oliver <oliver_at_first.in-berlin.de>
Date: Thu, 03 May 2012 23:54:09 +0200

On Thu, May 03, 2012 at 11:40:42PM +0200, victor jimenez wrote:
> First of all, thank you for the answers. I did not know about zoo. However,
> it seems that none approach can do what I exactly want (please, correct me
> if I am wrong).
>
> Probably, it was not clear in my original question. The CSV files only
> contain the performance values. The other two columns (ASSOC and SIZE) are
> obtained from the existing values in the directory tree. So, in my opinion,
> none of the proposed solutions would work, unless every single "data.csv"
> file contained all the three columns (ASSOC, SIZE and PERF).
[...]

Maybe things will be clearer if you would provide an example with the tree and some example data, which you provide as a*.zip file.

As I undertand your question, you have a some variables' values stored in the csv-files, and other values of your variables are given as directory structure.

So you need to convert the structure of your directory into values fo your dataframe.

You need to have a dataframe that contains all possible values that are of interest to you.
Some of them are loaded via the csv-load and others are just picked from the directory structure.

You just have to fill in the data from the csv into the dataframe, and the values/variables that are implictly given via the directory structure, you just set when importing.

Maybe just read in the csv-files and add the missing values.

So if the variable on the cahcing mechanism is encode as part of the path to the file, e.g. "direct-mapped", then just set the chace value to "direct-mapped".

Ciao,

   Oliver

P.S.: In my understandiung this would be rather r-users instead of r-devel,

      because I think r-devel seems to be more focussed on internals and
      package stuff, while your problem is rather a user problem
      (any R user needs some kind of "programming" to get things done).

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 03 May 2012 - 21:55:52 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 03 May 2012 - 22:21:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive