To export a dataframe as a CSV file in R, you can use the write.csv() function. Here's an example:
main.r227 chars6 lines
In this example, we first create a sample dataframe called df. We then use the write.csv() function to export df to a file called my_data.csv. The row.names = FALSE argument specifies that the row names of df should not be included in the exported file.
gistlibby LogSnag