2.5 Exporting (summaries of) data

Sometimes you may want to export data or a summary of data. Let’s save our data or summary in a .csv file (in Excel, we can then convert it to an Excel file if we want):

# the first argument is the object you want to store, the second is the name you want to give the file (don't forget the .csv extension)
# use write_csv2 when you have a Belgian (AZERTY) computer, otherwise decimal numbers will not be stored as numbers

# store data
write_excel_csv(airbnb, "airbnb.csv")
write_excel_csv2(airbnb, "airbnb.csv") 

# store summary
write_excel_csv(airbnb.summary, "airbnb_summary.csv")
write_excel_csv2(airbnb.summary, "airbnb_summary.csv")

The file will be saved in your working directory.