Setting a set of data to contain specific columns prior to writing to CSV

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Setting a set of data to contain specific columns prior to writing to CSV

New_User1
Okay so, I have a massive data set, that I can get to output in a CSV by using:

write.csv(SUMMARY_data,"CombinedPrintout.csv",row.names=F)

SUMMARY_data is made in the code and contains way more details than I want. Anyone know how to only specify certain columns before writing the CSV (and yes, i have these columns names)?

I suspect it has to do with using cbind, but i have no idea where to put the name of the dataset and the columns i want when using cbind.  Also, how would i refer to SUMMARY_data when talking about it? As a matrix?

As you can tell, extremely new to R (just looking over a model that was built by someone else), and have no experience in it.

Thanks!