当前位置:网站首页>机器学习笔记 - R语言学习入门系列一
机器学习笔记 - R语言学习入门系列一
2022-06-09 09:25:00 【坐望云起】
一、R概述和安装
R是用于统计计算和图形的免费软件环境。它可以在各种 UNIX 平台、Windows 和 MacOS 上编译和运行。
官方下载地址:
CRAN - Mirrors
https://cran.r-project.org/mirrors.html windows版本的只要下载安装即可。
安装完成的界面如下

使用 R,您可以编写函数、进行计算、应用大多数可用的统计技术、创建简单或复杂的图形,甚至编写自己的库函数。
R 中使用的编程在不同的方法中是相似的。 因此,一旦你学会了应用线性回归,修改代码以使其进行广义线性建模或广义加性建模,只需要修改几个选项或对公式进行小的改动。 此外,Rhas 拥有出色的统计设施。 几乎所有你在统计方面可能需要的东西都已经被编程并在 R 中可用(作为主包的一部分或作为用户贡献的包)。
二、初步使用
1、2+2
我们在控制台输入2+2,然后回车,会得到4,并不稀奇。

2、log(2)
我们在控制台输入log(2),然后回车,得到0.6931472。

3、log10(2)
我们在控制台输入log10(2),然后回车,得到0.30103。

三、绘图功能
R 具有出色的绘图工具。但同样,需要输入代码或从以前的项目中复制它来实现。
setwd("D:\\57R")
ISIT<-read.table("D:\\57R\\RBook\\ISIT.txt",header=TRUE)
library(lattice)
xyplot(Sources~SampleDepth|factor(Station),data=ISIT,
xlab="Sample Depth",ylab="Sources",
strip=function(bg='white', ...)
strip.default(bg='white', ...),
panel = function(x, y) {
panel.grid(h=-1, v= 2)
I1<-order(x)
llines(x[I1], y[I1],col=1)})其中 ISIT.txt内容如下,百度网盘下载地址
链接:https://pan.baidu.com/s/18QwZb91hcmRR3UOGL48R9Q
提取码:dpso
图标显示如下

边栏推荐
- LeetCode_ Monotone stack_ Medium_ 581. shortest unordered continuous subarray
- [technology, business and management] drama learning and Entrepreneurship: Silicon Valley season 5 Episode 4-6
- Understand the graph database neo4j (II)
- How do you view the multi runtime architecture of dapr and layotto?
- Interviewer: how to open a video? What is second on video?
- 【图机器学习】启发式链路预测方法
- openstack详解(十七)——openstack Nova其他配置
- Array.map()简写函数
- three.js学习笔记(十六)——汹涌的海洋
- [5 machine learning] the most understandable decision tree in the whole network (with source code attached)
猜你喜欢

Dnmap architecture implementation and scanning practice

How do you view the multi runtime architecture of dapr and layotto?

openstack详解(十八)——Nova服务启动与服务创建
![[linear algebra] understand eigenvalues and eigenvectors](/img/c6/d7b024daf0ac9c684b5b171b0c2fb7.png)
[linear algebra] understand eigenvalues and eigenvectors

Sofa weekly | kusion open source, QA this week, contributor this week
![[technology, business and management] drama learning and Entrepreneurship: Silicon Valley, episode 1-2, season 6](/img/21/9569fb9a013da1476645bbfb0cf93c.png)
[technology, business and management] drama learning and Entrepreneurship: Silicon Valley, episode 1-2, season 6

Solve the apscheduler error: run time of job... Next run at:...) "was missed by

openstack详解(十二)——Glance安装与初步配置

- Bean method ‘redisConnectionFactory‘ in ‘JedisConnectionConfiguration‘ not loaded because @Conditi

【图机器学习】图神经网络入门(一)谱图理论
随机推荐
【新手上路常见问答】关于物联网设计
LeetCode_模拟_中等_621. 任务调度器
[1 data collection] complete learning path of data crawler
TS 泛型的extends属性
[technology, business and management] drama learning and Entrepreneurship: Silicon Valley Season 6 Episode 6-7
Summary of Android development interview experience and compilation of actual records (must see)
【推荐系统】基于用户的协同过滤
视觉SLAM总结——SuperPoint / SuperGlue
Linux online installation of a neo4j diagram database
Longest common subsequence and longest common substring
[probability theory] correlation calculation between variables
【科技、商业和管理】看剧学创业:《硅谷》第六季第6-7集
three.js学习笔记(十五)——着色器图案
JWT和session
MSF针对FTP的后门攻击危害
[Android -- interview] the top ten platforms where programmers have joined w every month
MSF实战——MySQL空密码的危害
MSF practice - harm of ms17-010 vulnerability
NIO BIO AIO
LeetCode_单调栈_中等_581.最短无序连续子数组