上一页 1 ··· 235 236 237 238 239 240 241 242 243 ··· 403 下一页
摘要: 1、应用于向量 > a <- c("d", "e", NA, "k", NA, "m") > a [1] "d" "e" NA "k" NA "m" > as.character(na.omit(a)) ## 清除向量中的空值 [1] "d" "e" "k" "m" > na.omit(a)[1:l 阅读全文
posted @ 2022-04-30 21:51 小鲨鱼2018 阅读(1030) 评论(0) 推荐(0)
摘要: 1、下载地址:http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/ 2、赋予权限 root@DESKTOP-1N42TVH:/home/software# ll -h total 34M drwxr-xr-x 4 root root 4.0K 阅读全文
posted @ 2022-04-30 00:04 小鲨鱼2018 阅读(1582) 评论(0) 推荐(0)
摘要: 1、举例 root@DESKTOP-1N42TVH:/home/test3# a="aa.bb.cc.dd" root@DESKTOP-1N42TVH:/home/test3# echo $a aa.bb.cc.dd root@DESKTOP-1N42TVH:/home/test3# echo ${ 阅读全文
posted @ 2022-04-29 23:03 小鲨鱼2018 阅读(168) 评论(0) 推荐(0)
摘要: 1、举例 #*.的作用 root@DESKTOP-1N42TVH:/home/test3# a="aa.bb.cc.dd" root@DESKTOP-1N42TVH:/home/test3# echo ${a} aa.bb.cc.dd root@DESKTOP-1N42TVH:/home/test3 阅读全文
posted @ 2022-04-29 22:55 小鲨鱼2018 阅读(2796) 评论(0) 推荐(0)
摘要: 1、举例%.*的作用 root@DESKTOP-1N42TVH:/home/test3# a="aa.bb.cc.dd" root@DESKTOP-1N42TVH:/home/test3# echo ${a} aa.bb.cc.dd root@DESKTOP-1N42TVH:/home/test3# 阅读全文
posted @ 2022-04-29 22:43 小鲨鱼2018 阅读(3183) 评论(0) 推荐(1)
摘要: 1、 测试数据 > df <- data.frame(Age=c(22,24,25,26), Gender=c("Girl","Girl","Boy","Boy"), + City=c("Shanghai","Beijing","Guangzhou","Nanjing")) > df Age Gen 阅读全文
posted @ 2022-04-29 21:55 小鲨鱼2018 阅读(1192) 评论(0) 推荐(0)
摘要: 1、测试数据 > dat <- as.data.frame(matrix(1:100, nrow = 10)) > colnames(dat) <- 1:10 > rownames(dat) <- 1:10 > dat 1 2 3 4 5 6 7 8 9 10 1 1 11 21 31 41 51 阅读全文
posted @ 2022-04-29 21:47 小鲨鱼2018 阅读(4097) 评论(0) 推荐(0)
摘要: 1、方法1 模拟200个样本, 50000个位点 nsnp <- 50000 nind <- 200 nums <- sample(1:2, nsnp * 2 * nind, replace = T) snp_matrix <- matrix(nums, nrow = 200) col_idx <- 阅读全文
posted @ 2022-04-29 18:20 小鲨鱼2018 阅读(274) 评论(0) 推荐(0)
摘要: 1、R安装devtools过程中遇到如下问题: > install.packages('devtools', repos='https://mirror.lzu.edu.cn/CRAN/') 2、解决方法 sudo apt-get install libssl-dev sudo apt-get in 阅读全文
posted @ 2022-04-29 10:40 小鲨鱼2018 阅读(755) 评论(0) 推荐(0)
摘要: 1、 > a <- letters[1:10] > a [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" > replace(a, c(1, 3, 5), "xxx") ## 替换指定索引的字符串为特定的字符串 [1] "xxx" "b" "xxx" &qu 阅读全文
posted @ 2022-04-29 00:20 小鲨鱼2018 阅读(1099) 评论(0) 推荐(0)
上一页 1 ··· 235 236 237 238 239 240 241 242 243 ··· 403 下一页