上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 403 下一页
摘要: 1、测试数据 test <- c(5.3, 5.6, 0.7, 0.6, 1.3, 2.8, 2.9, 2.1, 2.4, 3.7, 4.2, 4.9, 4.7, 4.8, 4.2) 2、生成统计节点 breaks <- seq(0, 6, length.out = 7) ## 生成统计节点 bre 阅读全文
posted @ 2021-11-05 11:10 小鲨鱼2018 阅读(2778) 评论(0) 推荐(0)
摘要: 1、方式1 test <- matrix(1:12, byrow = T, nrow = 3, ncol = 4) test c1 <- rep(1:nrow(test), times = ncol(test)) c2 <- rep(1:ncol(test), each = nrow(test)) 阅读全文
posted @ 2021-11-03 18:18 小鲨鱼2018 阅读(1467) 评论(0) 推荐(0)
摘要: 1、 a <- c("b", "a", "b") b <- c("c", "b", "a") c <- c("x", "a", "d") d <- data.frame(a, b, c) d e <- unlist(d) e sum(e == "b") ## 统计b出现的次数 sum(e == "d 阅读全文
posted @ 2021-11-03 18:00 小鲨鱼2018 阅读(6416) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test# ls outcome.map outcome.ped root@PC1:/home/test# cat outcome.map 1 snp1 0 55910 1 snp2 0 85204 1 snp3 0 122948 1 snp4 0 203 阅读全文
posted @ 2021-11-03 16:45 小鲨鱼2018 阅读(572) 评论(0) 推荐(0)
摘要: 1、 cut -d " " -f 7- $1 > nuc.ped awk '{for(i = 1; i <= NF; i = i + 2) {printf("%s ", $i)} {printf("\n")}}' nuc.ped > top.ped awk '{for(i = 2; i <= NF; 阅读全文
posted @ 2021-11-02 23:28 小鲨鱼2018 阅读(447) 评论(0) 推荐(0)
摘要: 1、R实现 dat <- read.table("outcome.ped") name1 <- c("FID", "IID", "PAT", "MAT","SEX", "PHENOTYPE" ) name2 <- dat[,1:6] name3 <- rbind(name1, name2) dat 阅读全文
posted @ 2021-11-02 21:52 小鲨鱼2018 阅读(875) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test/test/test2# cat nuc.ped G G C C G G G G A G A A G G G C G G G G G G A A G G C C G G G G G G A A G G C C G G G G G G A A G G 阅读全文
posted @ 2021-11-02 21:39 小鲨鱼2018 阅读(202) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test2# cat a.txt 1 e d 2 a g 3 w e 4 d g 5 g j 6 e j 7 l m 8 i n 2、awk命令实现 root@PC1:/home/test2# cat a.txt 1 e d 2 a g 3 w e 4 d 阅读全文
posted @ 2021-11-02 20:35 小鲨鱼2018 阅读(417) 评论(0) 推荐(0)
摘要: 1、测试数据 root@PC1:/home/test2# ls a.txt root@PC1:/home/test2# cat a.txt 1 2 3 4 5 6 7 8 e a w d g e l i d g e g j j m n 2、将连续的两列数据转换成一列数据 root@PC1:/home 阅读全文
posted @ 2021-11-02 20:24 小鲨鱼2018 阅读(211) 评论(0) 推荐(0)
摘要: set.seed()用于保证多次生成随机数的结果一致。 1、 par(mfrow = c(2,2)) a <- rnorm(10) plot(a, pch = 19, cex =2) b <- rnorm(10) plot(b, pch = 19, cex =2) set.seed(100) c < 阅读全文
posted @ 2021-11-02 20:03 小鲨鱼2018 阅读(965) 评论(0) 推荐(0)
上一页 1 ··· 270 271 272 273 274 275 276 277 278 ··· 403 下一页