学习小组Day4笔记--森蝶
2021-07-09 本文已影响0人
松风
R语言基础
Day4+R语言基础.png
Rstudio
![](https://img.haomeiwen.com/i26610967/c53796482e44775b.png@l_1,f_png,w_1200)
注意:符号都需要用英文符号,尤其是括号。
尝试作图
plot(rnorm(50))
![](https://img.haomeiwen.com/i26610967/fa095776ad29de57.png)
iris$Sepal.Length~iris$Species,col = c("lightblue","lightyellow","lightpink"))
![](https://img.haomeiwen.com/i26610967/6746761703f75e05.png)
基本操作
用Rproject管理工作目录
R语言只能和一个文件夹进行互动
查看工作目录(路径)
getwd()
![](https://img.haomeiwen.com/i26610967/893f57fcfa3af1c2.png)
显示文件列表(相当于Linux的ls)
dir()
或 list.files()
![](https://img.haomeiwen.com/i26610967/613a14cf3fe5f055.png)
加减乘除等基本运算
![](https://img.haomeiwen.com/i26610967/f2dd4b7e0b3ce6d1.png)
赋值
赋值符号用<-
![](https://img.haomeiwen.com/i26610967/34018e5fe467a728.png)
![](https://img.haomeiwen.com/i26610967/f6962a63caf75a4e.png)
列出历史命令
history()
清空控制台
快捷键ctrl+l