摘要: 001、 x <- c(1, 10, 80, 8, 5, 6, 7) ## 测试向量 F <- ecdf(x) ## ecdf函数 F(3) ## 表示向量x中小于等于3的比例 1/7 sum(x <= 3)/length(x) 。 002、 x <- c(1, 10, 80, 8, 5, 6, 7 阅读全文
posted @ 2025-07-24 23:30 小鲨鱼2018 阅读(8) 评论(0) 推荐(0)
摘要: 001、 layout(matrix(c(2,0,1,3), 2, 2, byrow = T), widths = c(5, 2), heights = c(2,5)) ## 设置画板布局 par(mar = c(2, 2, 2, 2)) plot(1:10, cex = 2, pch = 19, 阅读全文
posted @ 2025-07-24 17:03 小鲨鱼2018 阅读(11) 评论(0) 推荐(0)
摘要: 001、 默认调色板 palette("default") palette() plot(1:5, cex = 5, pch = 15, col = 1:5) 002、修改默认调色板 palette(c("red", "black", "green","cyan", "purple")) palet 阅读全文
posted @ 2025-07-24 16:15 小鲨鱼2018 阅读(34) 评论(0) 推荐(0)
摘要: 001、 (base) [b20223040323@admin2 test5]$ ls test.ped (base) [b20223040323@admin2 test5]$ cat test.ped ## 测试ped文件 DOR DOR1 0 0 0 -9 G G C C G G G G A G 阅读全文
posted @ 2025-07-24 11:44 小鲨鱼2018 阅读(8) 评论(0) 推荐(0)
摘要: 001、默认情况下,read.table函数以“#” 为注释行,读取数据时,将忽略掉以“#”号开头的行: 测试数据如下: fst <- read.table("test.txt", sep="\t", header=T) ## 数据读取结果默认忽略掉了注释行 fst 。 002、使用comment. 阅读全文
posted @ 2025-07-24 11:33 小鲨鱼2018 阅读(26) 评论(0) 推荐(0)