Reshape2包是用于数据重构的包,其主要功能函数为melt和cast两个,可以实现长数据和宽数据之间的转换。

library(reshape2)
a = read.table("MEs-list.txt",header = T,sep = "\t")
#id.vars = "Stage"表面锁定Stage列,其他融合
b = melt(a, id.vars = "Stage")
则自动生成三列数据:

Reshape2包是用于数据重构的包,其主要功能函数为melt和cast两个,可以实现长数据和宽数据之间的转换。
library(reshape2)
a = read.table("MEs-list.txt",header = T,sep = "\t")
#id.vars = "Stage"表面锁定Stage列,其他融合
b = melt(a, id.vars = "Stage")
则自动生成三列数据:
本文标题:Reshape2简单操作1
本文链接:https://www.haomeiwen.com/subject/pcsgtktx.html
网友评论