00:00You can export a table or dataframe from R using base R functions like write.csv for csv files
00:06or specialized packages like write.xl for excel files. The easiest and most common way to share
00:11a table is saving it as a comma separated values csv file using the built-in write.csv function.
00:17Prepare your dataframe for example mydata. Run the export command with row.names falc
00:22so R does not add an unwanted column of row numbers write.csv mydata file mytable.csv
00:29row.names falc. Use code with caution. If you find your file in your current working directory check
00:36it via gitudd. 2. Export as an excel file.xlsx. If you need an excel spreadsheet format use the
00:43write.xl package. Install and load the package if not already installed. Use code with caution.
00:50Run the export command write.xlsxmydata pathmytable.xlsxls. We use code with caution.
00:563. Export as a tab text file .txt. If you want a tab delimited text file use write.table.
01:02Use code with caution. Export data from R, csv, excel, and rds. Which format when. And that's the full
01:10picture. If this saved you a search hit like and subscribe. One clear answer every day. See you in the
01:15next one.
Comments