上一页 1 ··· 338 339 340 341 342 343 344 345 346 ··· 407 下一页
摘要: 1、 attach(mtcars) layout(matrix(c(1,1,2,3), 2, 2, byrow=T)) hist(wt) hist(mpg) hist(disp) detach(mtcars) 2、 attach(mtcars) layout(matrix(c(1,2,3,3),2, 阅读全文
posted @ 2021-04-16 18:11 小鲨鱼2018 阅读(1957) 评论(0) 推荐(0)
摘要: 1、 par(mfrow=c(3,2)) plot(1:10) text(1,5,"aa", cex = 2,col = "red") plot(1:10) text(5,5,"bb",cex = 2, col = "blue") plot(1:10) text(5,5, "cc", cex = 2 阅读全文
posted @ 2021-04-16 17:16 小鲨鱼2018 阅读(1621) 评论(0) 推荐(0)
摘要: 1、 > plot(1:10) > locator(1) ## 此时鼠标点击图形中位置,将返回位置坐标 $x [1] 2.202362 $y [1] 7.89666 > text(locator(1),"xxx",cex = 2,col="red") ## 结合text函数,可以图形中添加文本 > 阅读全文
posted @ 2021-04-16 16:49 小鲨鱼2018 阅读(3133) 评论(0) 推荐(0)
摘要: 1、 opar <- par(no.readonly = T) par(mfrow=c(2,2)) plot(1:10) legend("topleft",inset = 0.04,c(paste0("lab", 1:4)),pch = c(15:18), col = c("red","blue", 阅读全文
posted @ 2021-04-16 16:31 小鲨鱼2018 阅读(4925) 评论(0) 推荐(0)
摘要: 1、 plot(1:10) abline(h=5,col="red",lty=2,lwd = 3) 2、 plot(1:10) abline(h=c(2,4,6),col="red",lwd=3) 3、 plot(1:10) abline(v=c(2,4,8), col = "blue", lwd 阅读全文
posted @ 2021-04-16 15:43 小鲨鱼2018 阅读(1784) 评论(0) 推荐(0)
摘要: 1、 library(Hmisc) opar <- par(no.readonly = T) par(mfrow=c(1,2)) plot(1:10) plot(1:10) minor.tick(nx=2,ny=3,tick.ratio = 0.5) par(opar) 2、 library(Hmi 阅读全文
posted @ 2021-04-16 12:19 小鲨鱼2018 阅读(588) 评论(0) 推荐(0)
摘要: 1、去除外围框线 opar <- par(no.readonly = T) par(mfrow = c(2,1)) plot(1:10) plot(1:10, axes = F) par(opar) 2、去除x轴标线 opar <- par(no.readonly = T) par(mfrow = 阅读全文
posted @ 2021-04-16 11:52 小鲨鱼2018 阅读(5913) 评论(0) 推荐(0)
摘要: 1、 [root@centos7 test]# ls a.txt [root@centos7 test]# cat a.txt i e s m u w e i p q x z u n k e c b v y [root@centos7 test]# sed 's/.$//' a.txt i e s 阅读全文
posted @ 2021-04-16 09:14 小鲨鱼2018 阅读(1861) 评论(0) 推荐(0)
摘要: 1、随机抽样 > a <- 1:10 > sample(a,5) [1] 9 4 5 10 6 > sample(a,5,replace = T) [1] 10 7 5 3 4 > sample(a,5,replace = T) ## 有放回抽样 [1] 5 9 5 1 3 > b <- LETTE 阅读全文
posted @ 2021-04-15 22:24 小鲨鱼2018 阅读(2374) 评论(0) 推荐(0)
摘要: 1、和 [root@centos7 test]# cat a.txt 3 8 9 4 2 4 8 1 9 8 4 2 8 5 3 2 [root@centos7 test]# sed -n '1p' a.txt 3 8 9 4 [root@centos7 test]# sed -n '1p' a.t 阅读全文
posted @ 2021-04-15 22:06 小鲨鱼2018 阅读(1082) 评论(0) 推荐(1)
上一页 1 ··· 338 339 340 341 342 343 344 345 346 ··· 407 下一页