1

I have been searching on how to do this. I know how to easily do this in MATLAB, but it is proving difficult in R. Is there a simple way of doing this?

Thanks

Jaap
  • 81,064
  • 34
  • 182
  • 193
Katie
  • 11
  • 1
  • 1
  • 2
  • 1
    If the above link doesn't get you to a solution, please provide more detail about exactly what you are trying to accomplish. What file type you're trying to save as, etc. – Mako212 Sep 19 '17 at 22:15
  • Are you trying to write to specifically an .xls or .xlsx file or does any format work? Typically you might want to write to a CSV instead since it has been support. – beigel Sep 19 '17 at 23:15

2 Answers2

3

Writing to a .csv is often a way to go in R. Alternatively, you can use the xlsx package

Installing the package

install.packages("xlsx")

Writing with the package

library(xlsx)

write.xlsx(YourDataFrame, "C:/Temp/YourExcelFile.xlsx")

Keep us posted! :)

1

You can use the write.csv command. Excel is able to read csv files.

write.table(x = my_dataframe, file = "my_file.csv")

Brendan
  • 101
  • 3