当前位置:网站首页>R简单统计计算--笔记
R简单统计计算--笔记
2022-08-10 05:30:00 【LIAN_U】
#read csv
specie28=read.csv(file="filename.csv")
#read txt
specie28=read.table("filename.txt", head=TRUE, sep=",")
#one attribute of specie28
height=specie28$HEIGHT
DBH=specie28$DBH
#mean of height 均值
height_m=mean(specie28$HEIGHT)
#maximum of height 最大值
height_max=max(specie28$HEIGHT)
#minimum of height 最小值
height_min=min(specie28$HEIGHT)
#standard deviation 标准差
height_sd=sd(specie28$HEIGHT)
#median 中值
height_median(specie28$HEIGHT)
#variance 方差
height_var=var(specie28$HEIGHT)
#两个变量之间的相关系数
cor(specie28$HEIGHT,log(specie28$HEIGHT))
#两个变量之间的协方差
cov(specie28$HEIGHT,log(specie28$HEIGHT))
边栏推荐
- pytorch框架学习(9)torchvision.transform
- 论文精度 —— 2016 CVPR 《Context Encoders: Feature Learning by Inpainting》
- scikit-learn机器学习 读书笔记(二)
- 文章复现:超分辨率网络-VDSR
- The sword refers to Offer 033. Variation array
- Why are negative numbers in binary represented in two's complement form - binary addition and subtraction
- Read the excerpt notes made by dozens of lightweight target detection papers for literacy
- Concurrency tool class - introduction and use of CountDownLatch, CyclicBarrier, Semaphore, Exchanger
- 基于BP神经网络的多因素房屋价格预测matlab仿真
- 基于Qiskit——《量子计算编程实战》读书笔记(三)
猜你喜欢
随机推荐
FPGA engineer interview questions collection 41~50
summer preschool assignments
kaggle小白必看:小白常见的2个错误解决方案
基于Qiskit——《量子计算编程实战》读书笔记(二)
Hezhou ESP32C3 +1.8"tft network clock under Arduino framework
pytorch框架学习(6)训练一个简单的自己的CNN (三)细节篇
pytest测试框架
深度梳理:防止模型过拟合的方法汇总
pygame学习计划(1)
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
树莓派入门(3)树莓派GPIO学习
图纸怎么折?(A0,A1,A2,A3の图纸如何折成A4大小)
pytorch 学习
Ask you guys.The FlinkCDC2.2.0 version in the CDC community has a description of the supported sqlserver version, please
Stacks and Queues | Implementing Queues with Stacks | Implementing Stacks with Queues | Basic Theory and Code Principles
OAuth2的使用场景、常见误区、使用案例
FPGA工程师面试试题集锦21~30
MySql之json_extract函数处理json字段
Pony语言学习(八):引用能力(Reference Capabilities)
Kubernetes:(十七)Helm概述、安装及配置









