Re: [R] Constructing a data.frame from csv files

2012-01-11 Thread Vincy Pyne
required data.frame. Thanks again. With warm regards Vincy --- On Wed, 1/11/12, jim holtman wrote: From: jim holtman Subject: Re: [R] Constructing a data.frame from csv files To: "Vincy Pyne" Cc: r-help@r-project.org Received: Wednesday, January 11, 2012, 1:49 PM The error message s

Re: [R] Constructing a data.frame from csv files

2012-01-11 Thread jim holtman
The error message says it all: the dataframes that you are creating, and then trying to 'rbind', do not have the same columns. You need to at least show what the first couple of lines of each of you input files are, or output the names of the columns as you are reading the files. This is some el

[R] Constructing a data.frame from csv files

2012-01-11 Thread Vincy Pyne
Dear R helpers, Following is my R code where I am trying to calculate returns and then trying to create a data.frame. Since, I am not aware how many instruments I will be dealing so I have constructed a function. My R code is as follows - library(plyr) mydata <- data.frame(instru_name = c("in