R 语言基础

列出变量,限定以m开头的。

ls(pat="m")

删除全部

rm(list=ls())

帮助

help("",try,all.packages=TRUE)
help.start
help.search("")

工作目录

getwd()
setwd()

读取文件

df<-read.table("save.dat")
df<-read.csv("file.csv")

写入文件

write.table

生成数列

seq(from=1,to=5,length=10)