- R Data Visualization Cookbook
- Atmajitsinh Gohil
- 134字
- 2021-08-06 19:21:07
Exporting data in R
Once we have processed our data, we need to save it to an external device or send it to our colleagues. It is possible to export data in R in many different formats.
How to do it…
To export data from R, we can use the write.table()
function. Please note that R will export the data to our current directory or the folder we have assigned using the setwd()
function:
write.table(data, "mydata.csv", sep=",")
How it works…
The first argument in the write.table()
function is the data in R that we would like to export. The second argument is the name of the file. We can export data in the .xls
or .txt
format, simply by replacing the mydata.csv
file extension with mydata.txt
or mydata.xls
in the write.table()
function.
推薦閱讀
- Progressive Web Apps with React
- 簡單高效LATEX
- Software Testing using Visual Studio 2012
- Learning Bayesian Models with R
- VSTO開發入門教程
- Learning AWS Lumberyard Game Development
- Python程序設計與算法基礎教程(第2版)(微課版)
- Unity 2018 Augmented Reality Projects
- Illustrator CC平面設計實戰從入門到精通(視頻自學全彩版)
- 代碼閱讀
- C編程技巧:117個問題解決方案示例
- 貫通Tomcat開發
- Web編程基礎:HTML5、CSS3、JavaScript(第2版)
- 你好!Java
- Vue.js 3.x高效前端開發(視頻教學版)