R下一些函数
2016-07-04 20:25
351 查看
head(),tail() : 得到数据的最前或最后的数据。默认6条。可以加参数设置。
summary() : 汇总
数理统计例子
RStudio可以装R MarkDown导出html或pdf
summary() : 汇总
数理统计例子
library(ggplot2) library(plotly) head(state.x77) summary(state.x77) state <- data.frame(state.name,state.region,state.x77) attach(state) state_p <- data.frame(state.name,state.region,Area) p <- ggplot(state_p,aes(x=state_p$state.region,y=state_p$Area,fill=state_p$state.region)) + geom_boxplot() + ggtitle("美国不同地区州面积") ggplotly(p) plot_ly(state_p,x=state.region,y=Area,color = state.region,type = 'box') pairs(state) k <- ggplot(state,aes(x=Illiteracy,y=Murder,color=state.region)) + geom_point() + geom_smooth(method=lm, se=FALSE, fullrange=TRUE) + theme_classic() ggplotly(k) cor(state.x77) q1 <- ggplot(state,aes(x=Murder,y=Life.Exp)) + geom_point() + geom_smooth(method=lm, se=FALSE, fullrange=TRUE) + theme_classic() ggplotly(q1) q2 <- ggplot(state,aes(x=Murder,y=Life.Exp,color=state.region)) + geom_point() + geom_smooth(method=lm, se=FALSE, fullrange=TRUE) + theme_classic() ggplotly(q2)
RStudio可以装R MarkDown导出html或pdf
相关文章推荐
- W3AF插件编写
- 【matlab】利用matlab编写启发式算法
- 【原】Maven解决jar冲突调试步骤:第三方组件引用不符合要求的javassit导致的相关异常
- 链表的Java实现
- 交叉编译知识解析(二) —— 交叉编译器的名字的命名规则
- RecyclerView通用适配器Adapter,对Adapter的封装
- 百度一道笔试题
- 秦晖:王小波是一个自由主义思想家吗?
- RTSP协议介绍
- php5中this关键字用法讲解
- 记搜狗机器学习实习生面试
- java.lang.NoClassDefFoundError: org/springframework/beans/factory/support/DefaultListableBeanFactory
- 2.1 nagios 安装
- java框架之spring基础应用
- W3AF FuzzableRequest 处理流程札记
- 剑指offer---二叉树的镜像---java实现
- 华为5700交换机通过外部开源protal和本地aaa用户认证的一些问题
- kcachegrind gui for callgrind
- 7z制作自解压安装包
- 华为5700交换机通过外部开源protal和本地aaa用户认证的一些问题