R语言边学边记3-数据的导入与导出

> getwd()#默认工作目录

[1] "C:/Users/Jerry/Desktop/工作目录"

> setwd("C:/Users/Jerry/Desktop/工作目录")#重新设置工作目录

> data<-read.csv("R.csv")

> n1<-c(1,3:7)

> n2<-c("a","b","c","d","e","f")

> h<-data.frame(n1,n2)

> write.csv(h,"RR.csv")

> write.csv(h,"RR.csv",row.names = F)#关闭索引

你可能感兴趣的:(R语言边学边记3-数据的导入与导出)