R语言基础汇编
卧新实验室
Think out of the box
展开
-
R语言图解“等额本金与等额本息”
相关代码:#输入数据B <- 1000000R <- 0.06/12 # 月利率t <- 15*12N <- 1:t#等额本金MBA <- B/tMYA <- B - MBA*(N-1)MIA <- MYA*RMPA <- MIA + MBA# 等额本息MPB <- B*R*(1+R)^t /...原创 2019-05-03 00:25:43 · 2701 阅读 · 0 评论 -
R语言常见问题汇总
Problem1: R安装不了包,以及出现了类似的报错:cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/PACKAGES'R安装不了包,出现了类似的报错:Warning: u...原创 2019-03-17 21:32:39 · 2945 阅读 · 0 评论 -
安装低版本的R语言、和自行下载安装各个版本的R语言包、以及多环境运行R
1. 下载并安装最新的R版本软件,以国内的清华的镜像为例(国内镜像速度快)https://mirrors.tuna.tsinghua.edu.cn/CRAN/2. 官网上如何下载老版本或低版本(旧版本)的R语言(同时下载多个版本的R,功能运行更加丰富)https://cran.r-project.org/bin/windows/base/old/3. 官网上如何去自行下载安装各个版...原创 2018-08-22 19:58:04 · 37200 阅读 · 4 评论 -
利用ggplot2的绘图
We learn this library "ggplot2"cos the ggplot2 can paint out a beautiful picture.1. This means in the way that build a plot layer by layer.2. Generally ggplot ( 'the main part' ) +geom_XXX(mapp...原创 2018-09-07 23:11:46 · 402 阅读 · 0 评论 -
Part1 R语言的基本操作
1 R语言的取整函数具体代码如下:#查阅R语言中的取整函数有哪些,分别有什么区别?a <- c(6.46)a1 <- ceiling(a) #是上取a2 <- floor(a) #是下取a3 <- round(a) #四舍五入#尝试使用a<-runif(100),进行各种取整函数操作,写出结果异同a<-runif(100)a1 &...原创 2019-03-17 21:29:52 · 749 阅读 · 0 评论 -
R语言绘制五角星
1.采用简单的连线n <- seq(1,11,2) #R语言环境x <- sin(0.4*n*pi)y <- cos(0.4*n*pi)plot(x,y,type = 'l',xlim = c(-1,1),ylim = c(-1,1),xlab="", ylab="", axes=F)2. 采用长短轴的点的拼接# 给定一些初始的值r <- ...原创 2019-03-16 22:29:21 · 6668 阅读 · 1 评论 -
R语言给图形填充颜色(polygon函数)
1. 使用polygon进行纯色填充# polygon函数介绍polygon(x, y = NULL, density = NULL, angle = 45, border = NULL, col = NA, lty = par("lty"), ..., fillOddEven = FALSE)其中density为填充的阴影线的密度,angle为阴影线的...原创 2019-03-17 21:17:35 · 21683 阅读 · 2 评论