Day5-Alexander
2020-05-22 本文已影响0人
Alexander_Le

每日任务

向量(vector)
矩阵(Matrix)
数组(Array)
数据框(Data frame)
List
geom_point()
ggplot(data=mpg,mapping=aes(x=cty,y=hwy))+
geom_point()

geom_jitter
ggplot(data=mpg,mapping=aes(x=cty,y=hwy))+
geom_jitter()

geom_boxplot()
ggplot(data=mpg,mapping=aes(x=class,y=hwy))+
geom_boxplot(aes(color=class))

coord_flip()

填颜色的一个比较
ggplot(data=diamonds,mapping = aes(x=cut))+
geom_bar(aes(color=cut))

注:可以发现这是对柱状图的边框进行颜色标注
该如何办呢?请注意参数aes() fill选项
ggplot(data=diamonds,mapping = aes(x=cut))+
geom_bar(aes(fill=cut)

save(X,file="test.RData")这句代码如果报错object X not found
是为什么,应该怎么解决?
既然报错显示X不存在,重新运行即可。
> save(X,file="test.RData")
Error in save(x,file="test.RData"):目标对象‘×’不存在
> x <- read.csv('doudou.txt')
> save(x,file="test.RData")
- 出现报错,主动查找原因
- 学会思考,学会提问
- 善于运用搜索工具