上一页 1 ··· 316 317 318 319 320 321 322 323 324 ··· 385 下一页
摘要: 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 阅读(1761) 评论(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 阅读(561) 评论(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 阅读(5834) 评论(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 阅读(1849) 评论(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 阅读(2325) 评论(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 阅读(1047) 评论(0) 推荐(1) 编辑
摘要: 1、最大值 [root@centos7 test]# cat a.txt 4 2 8 6 4 9 2 7 5 3 5 7 [root@centos7 test]# awk 'BEGIN{max = 0}{if($1 > max) max = $1}END{print max}' a.txt 6 [r 阅读全文
posted @ 2021-04-15 21:53 小鲨鱼2018 阅读(5451) 评论(0) 推荐(0) 编辑
摘要: 1、交集intersect > x <- 1:4 > y <- 3:7 > x [1] 1 2 3 4 > y [1] 3 4 5 6 7 > intersect(x,y) [1] 3 4 2、并集union > x <- 1:4 > y <- 3:7 > x [1] 1 2 3 4 > y [1] 阅读全文
posted @ 2021-04-15 20:38 小鲨鱼2018 阅读(996) 评论(0) 推荐(0) 编辑
摘要: 1、简单用法 > a <- c(5:2,3:7,4+1:4) > a [1] 5 4 3 2 3 4 5 6 7 5 6 7 8 > unique(a) ## 去重复 [1] 5 4 3 2 6 7 8 2、数据框 > a <- rep(1, 5) > b <- c(4,3,2,2,4) > c < 阅读全文
posted @ 2021-04-15 19:09 小鲨鱼2018 阅读(3352) 评论(0) 推荐(0) 编辑
摘要: 1、按行排列 [root@centos7 test]# cat a.txt 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 [root@centos7 test]# cat a.txt | xargs -n 4 01 02 03 阅读全文
posted @ 2021-04-15 18:37 小鲨鱼2018 阅读(465) 评论(0) 推荐(0) 编辑
上一页 1 ··· 316 317 318 319 320 321 322 323 324 ··· 385 下一页