-
set.seed(1)---使每次产生的随机变量是相同的
查看全部 -
这一章没有经过实际演练
查看全部 -
1、定义我们要分析的问题 2、定义一个理想的数据模型 3、定义确定要获取的数据 4、确定要清理的数据;查看全部
-
数据科学家需要掌握:1、计算机语言2、数据统计3、业务知识查看全部
-
绘图函数(graphics包) hist:柱状图,boxplot:箱图,points:点,lines:线,text:指定位置添加文字,title:整个图命名,axis:添加坐标轴 plot() xlab、ylab:x坐标轴、x坐标轴标签,lwd:线的宽度,lty:线的种类,pch:点的种类,col:图形的颜色 par() bg:背景的颜色,mar:边距,las:标签的横竖排版,mfrow:画板分成几行几列,并按照行填充,mfcol:画板分成几行几列,并按照列填充查看全部
-
数据分析的流程查看全部
-
数据可视化课程大纲查看全部
-
变量之间展现形式查看全部
-
lwd线宽;lty线类型;pch点类型;bg背景颜色;mar图边距;las标签的横竖排版; mfrow画板分成几行几列,并按照行填充;mfcol查看全部
-
基本绘图系统用graphics查看全部
-
markdown查看全部
-
pdf(file="myfig.pdf") > with(airquality,plot(Wind,Temp,main="Wind and Temp in NYC")) > dev.off() null device 1 > getwd() [1] "C:/Users/pc/Documents" > with(airquality,plot(Wind,Temp,main="Wind and Temp in NYC")) > dev.copy(png,file="mycopy.png") png 3 > dev.off function (which = dev.cur()) { if (which == 1) stop("cannot shut down device 1 (the null device)") .External(C_devoff, as.integer(which)) dev.cur() } <bytecode: 0x0000000005cf2de8> <environment: namespace:grDevices>查看全部
-
> pal<-colorRamp(c("red","blue")) > pal(0) [,1] [,2] [,3] [1,] 255 0 0 > pal(1) [,1] [,2] [,3] [1,] 0 0 255 > pal(0.5) [,1] [,2] [,3] [1,] 127.5 0 127.5 > pal(seq(0,1,len=10)) [,1] [,2] [,3] [1,] 255.00000 0 0.00000 [2,] 226.66667 0 28.33333 [3,] 198.33333 0 56.66667 [4,] 170.00000 0 85.00000 [5,] 141.66667 0 113.33333 [6,] 113.33333 0 141.66667 [7,] 85.00000 0 170.00000 [8,] 56.66667 0 198.33333 [9,] 28.33333 0 226.66667 [10,] 0.00000 0 255.00000 > > pal<-colorRampPalette(c("red","blue")) > pal(1) [1] "#FF0000" > pal(2) [1] "#FF0000" "#0000FF" > pal(10)查看全部
-
ggplot()查看全部
-
library(ggplot2) > qplot(Wind,Temp,data=airquality) > qplot(Wind,Temp,data=airquality,color=Month) > airquality$Month<-factor(airquality$Month) > qplot(Wind,Temp,data=airquality,color=Month) > qplot(Wind,Temp,data=airquality,color=I("red")) > qplot(Wind,Temp,data=airquality,shape=Month) > qplot(Wind,Temp,data=airquality,size=Month) Warning message: Using size for a discrete variable is not advised. > qplot(Wind,Temp,data=airquality,size=I(5),main="Wind Temp") > qplot(Wind,Temp,data=airquality,geom=c("point","smooth")) `geom_smooth()` using method = 'loess' > qplot(Wind,Temp,data=airquality,color="Month",geom=c("point","smooth")) `geom_smooth()` using method = 'loess' > qplot(Wind,Temp,data=airquality,facets=.~Month) > qplot(Wind,Temp,data=airquality,facets=Month~.) > qplot(Wind,Temp,data=airquality,facets=Month ~.) > qplot(Wind,Temp,data=airquality,fill=Month) > qplot(Wind,Temp,data=airquality,geom="density") > qplot(Wind,Temp,data=airquality,geom="dotplot")查看全部
举报
0/150
提交
取消