会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小鲨鱼2018
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
403
下一页
2025年7月28日
python 中 if __name__ == "__main__": main() 的作用
摘要: if __name__ == "__main__": main() 语句的作用 001、 [root@PC1 test]# ls script.py test.py [root@PC1 test]# cat script.py ## 测试程序script.py #!/usr/bin/env pyth
阅读全文
posted @ 2025-07-28 16:00 小鲨鱼2018
阅读(23)
评论(0)
推荐(0)
2025年7月26日
CMplot包中修改pdf的长宽比例
摘要: 001、 pdf("xxx.pdf", width = 8, height = 8) # 调整PDF的宽高比例,更适合阅读 CMplot(data1, type = "p", plot.type = "m", LOG10 = FALSE, col = c("blue4", "orange3"), c
阅读全文
posted @ 2025-07-26 17:10 小鲨鱼2018
阅读(11)
评论(0)
推荐(0)
R语言中mutate函数
摘要: R语言中mutate函数 001、 举例1, 向数据框中添加新列 library(dplyr) dat <- data.frame( a = 1:5, b = 11:15, c = 101:105) ## 测试数据框 dat mutate(dat, new_col = "xx") ## 利用muta
阅读全文
posted @ 2025-07-26 16:48 小鲨鱼2018
阅读(22)
评论(0)
推荐(0)
2025年7月24日
R 语言中ecdf函数
摘要: 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)
R语言中layout函数设置画板布局
摘要: 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)
R语言中palette函数修改R语言的默认调色板的颜色
摘要: 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)
Linux 中awk命令中实现以某一列为分类输出数据
摘要: 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)
R 语言中read.table函数读取数据注释行的处理 comment.char="" 选项
摘要: 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)
2025年7月22日
R语言中删除目录下的文件
摘要: unlink("nonwhite_white_xp_ehh_tmp_result.txt")
阅读全文
posted @ 2025-07-22 11:35 小鲨鱼2018
阅读(6)
评论(0)
推荐(0)
2025年7月20日
R语言中如何打出英文θ
摘要: 001、 plot(1:10, main=expression(theta))
阅读全文
posted @ 2025-07-20 16:04 小鲨鱼2018
阅读(10)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
403
下一页
公告