摘要: 代码笔记 library(psych)library(pheatmap) #以上导入包S9 <- read.csv(file.choose())rownames(S9)=S9[,1] #将第一列转为列名S9 <- S9[,2:11] #删除第一列S9 <- data.matrix(S9) #将dat 阅读全文
posted @ 2022-10-28 00:59 alan的学习笔记 阅读(179) 评论(0) 推荐(0)
摘要: plot type "p" for points, "l" for lines, 点图 "b" for both points and lines, 折线图 "c" for empty points joined by lines, 点线图(去点) "o" for overplotted point 阅读全文
posted @ 2021-10-22 23:50 alan的学习笔记 阅读(232) 评论(0) 推荐(0)
摘要: rep的使用 rep(c(1,2,3),length.out=10) [1] 1 2 3 1 2 3 1 2 3 1 > rep(x = 1,... = 5) [1] 1 > rep(x = 1,each=10) [1] 1 1 1 1 1 1 1 1 1 1 > rep(c(1,2,3),each 阅读全文
posted @ 2021-08-13 23:21 alan的学习笔记 阅读(124) 评论(0) 推荐(0)
摘要: 添加与修改矩阵的名字> dimnames(vec) <- list(c("e","f"),c("a","b","c")) 先行后列 > vec a b c e 1 3 5 f 2 4 6 > a [1] 2 3 4 > names(a) <- ("a") 给向量加名字 > a a <NA> <NA> 阅读全文
posted @ 2021-08-12 22:52 alan的学习笔记 阅读(684) 评论(0) 推荐(0)
摘要: > a <- c(1:20)给a赋值 > sum(a)求和 [1] 210 > max(a)最大值 [1] 20 > min(a)最小值 [1] 1 > mean(a)平均值 [1] 10.5 > var(a)方差 [1] 35 > sd(a)标准差 [1] 5.91608 > prod(a)连乘 阅读全文
posted @ 2021-08-11 23:17 alan的学习笔记 阅读(1182) 评论(0) 推荐(0)
摘要: getwd()查找当前位置 setwd(dir="")设置路径注意为/ 赋值: x<- c(5,6,7,8)赋值x为数组,内容为5,6,7,8 names(x) <- c("a","b","c","d")赋值名字 > a <- c(1:100) 给a赋值 > a[c(5:25)] 显示第五个数到第二 阅读全文
posted @ 2021-08-10 22:01 alan的学习笔记 阅读(42) 评论(0) 推荐(0)
摘要: dir 查阅当前目录下的所有文件 cd ..返回上一级 md创建新的文件夹 rd删除文件夹 del 删除文件 cls 清屏 netstat -a 查看端口号(防止占用很重要) ctrl+c退出任务 shutdown -s -t time(自动关机)(example:shutdown -s -t 72 阅读全文
posted @ 2021-08-10 21:44 alan的学习笔记 阅读(18) 评论(0) 推荐(0)