table <- data.frame(genename=paste("gene",1:5,sep = ""),S1=c(2,5,4,8,6),S2=c(5,6,8,1,9),S3=c(2,3,8,1,6))
### gather(table,colnames(table)[2:4],key = "id",value = "exp")
### 简便写法 gather(table,id,exp,-genename)
spread(table,key = "id",value = "exp")
a <- rep("yes",5)
a <- seq(2,10,by=1)
drop_na(X,X2)
replace_na(X,list(X2=2))
fill(X,X2)
---实操小笔记
网友评论