上一页 1 ··· 356 357 358 359 360 361 362 363 364 ··· 367 下一页
摘要: 1、准备测试数据10个样本,10个位点 [root@linuxprobe test]# ls test.map test.ped [root@linuxprobe test]# cat test.ped ## 10个样本,10行 DOR sample01 0 0 0 -9 G G C C G G G 阅读全文
posted @ 2020-10-07 00:44 小鲨鱼2018 阅读(8059) 评论(0) 推荐(0) 编辑
摘要: 1、R语言seq函数用于生成一段步长相等的序列 简单用法: > seq(5) ##默认从1开始,默认步长为1,只跟一个数字默认是终点 [1] 1 2 3 4 5 > seq(6) [1] 1 2 3 4 5 6 > seq(5.6) [1] 1 2 3 4 5 2、设定起点 > seq(5) [1] 阅读全文
posted @ 2020-10-06 19:57 小鲨鱼2018 阅读(9671) 评论(0) 推荐(1) 编辑
摘要: 1、创建测试数据 利用awk进行合并(1) [root@linuxprobe test2]# seq -w 30 | xargs -n 2 | sed = | sed 'N;s/\n/> /' > a.txt ##创建测试数据 [root@linuxprobe test2]# cat a.txt 1 阅读全文
posted @ 2020-10-06 15:34 小鲨鱼2018 阅读(992) 评论(0) 推荐(0) 编辑
摘要: 1、利用xargs命令将多列数据转化为一列数据 [root@linuxprobe test2]# echo "1 2 3 4 5 6" > a.txt [root@linuxprobe test2]# cat a.txt 1 2 3 4 5 6 [root@linuxprobe test2]# ca 阅读全文
posted @ 2020-10-06 14:57 小鲨鱼2018 阅读(2047) 评论(0) 推荐(0) 编辑
摘要: 1、利用xargs进行行列转换 [root@linuxprobe test2]# seq 512345[root@linuxprobe test2]# seq 5 | xargs ## xargs 默认转化为1行1 2 3 4 5[root@linuxprobe test2]# seq 5000 | 阅读全文
posted @ 2020-10-06 13:54 小鲨鱼2018 阅读(2417) 评论(0) 推荐(0) 编辑
摘要: 1、R语言中sort函数对向量按照从小到大排序,默认返回向量从小到大的值 创建测试数据: > test <- c(7,1,9,3,8)> test[1] 7 1 9 3 8> a <- sort(test) ## 默认升序> class(a) ## 返回值为数值[1] "numeric"> a[1] 阅读全文
posted @ 2020-10-06 00:10 小鲨鱼2018 阅读(10879) 评论(0) 推荐(0) 编辑
摘要: 1、基本用法,直接运行date 显示系统当前时间 [root@linuxprobe test]# date Mon Oct 5 20:03:00 CST 2020 2、以特定格式输出,如“年-月-日 时:分:秒” [root@linuxprobe test]# date "+%Y-%m-%d %H: 阅读全文
posted @ 2020-10-05 20:42 小鲨鱼2018 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 1、准备测试数据 [root@linuxprobe test]# ls test.map test.ped [root@linuxprobe test]# wc -l * ## 46827个位点,60个样本 46827 test.map 60 test.ped 46887 total [root@l 阅读全文
posted @ 2020-10-05 16:49 小鲨鱼2018 阅读(4998) 评论(0) 推荐(0) 编辑
摘要: 1、创建测试数据 [root@linuxprobe test]# echo "aaa.bbb.ccc.ddd" > a.txt [root@linuxprobe test]# cat a.txt aaa.bbb.ccc.ddd 2、利用\进行转义,使转义字符仍为字符串 [root@linuxprob 阅读全文
posted @ 2020-10-05 13:32 小鲨鱼2018 阅读(16050) 评论(0) 推荐(0) 编辑
摘要: 1、简单用法,直接加数字 [root@linuxprobe test]# seq 10 ## 输出1到10列表 1 2 3 4 5 6 7 8 9 10 2、设置起点、终点 [root@linuxprobe test]# seq 5 10 ##设置起点为5,终点为10,默认的步长为1。 5 6 7 阅读全文
posted @ 2020-10-05 12:47 小鲨鱼2018 阅读(872) 评论(0) 推荐(0) 编辑
上一页 1 ··· 356 357 358 359 360 361 362 363 364 ··· 367 下一页