Re: [R] Write table with data in other .csv template

2012-09-25 Thread Jeff Newmiller
CSV files are on disk, with filenames. You can call them whatever you want, but they are not variables in R. Data frames are variables in memory. You can read any CSV file into any data frame you like, but it replaces the original contents of the data frame completely. You can also write a data

Re: [R] Write table with data in other .csv template

2012-09-25 Thread s.s.m. fauzi
Hi Jeff, I got it...Thank you for your help! On Wed, Sep 26, 2012 at 11:53 AM, s.s.m. fauzi wrote: > Hi Jeff, > Do I need to call the .csv template to perform this operation? > > Shukor > > > On Wed, Sep 26, 2012 at 11:50 AM, Jeff Newmiller > wrote: > >> Perhaps you might try >> >> template[

Re: [R] Write table with data in other .csv template

2012-09-25 Thread s.s.m. fauzi
Hi Jeff, Do I need to call the .csv template to perform this operation? Shukor On Wed, Sep 26, 2012 at 11:50 AM, Jeff Newmiller wrote: > Perhaps you might try > > template[ , names(tbl) ] <- tbl > > where I have used tbl instead of table, for reasons previously mentioned. > -

Re: [R] Write table with data in other .csv template

2012-09-25 Thread Jeff Newmiller
Perhaps you might try template[ , names(tbl) ] <- tbl where I have used tbl instead of table, for reasons previously mentioned. --- Jeff NewmillerThe . . Go Live... DCN:Basic

Re: [R] Write table with data in other .csv template

2012-09-25 Thread s.s.m. fauzi
Hi Jeff, Thank you for the respond. I'm not really familiar with cbind. Anyway, there is a duplication in my input and the template, and I want to preserve the column order. Shukor On Wed, Sep 26, 2012 at 11:30 AM, Jeff Newmiller wrote: > Thanks for posting dput data, but I don't understand yo

Re: [R] Write table with data in other .csv template

2012-09-25 Thread Jeff Newmiller
Thanks for posting dput data, but I don't understand your question. are you familiar with cbind? Is there duplication of column names in your input table and template? Are they always duplicated in the template? What characteristics of the template are you trying to preserve? Column order? Othe