使用dplyr包select函数时出现
> load('step1output.Rdata')
> library(dplyr)
> y=select(exp_new,-num_range("GSM155932", 6:8))
Error in UseMethod("select_") :
no applicable method for 'select_' applied to an object of class "c('matrix', 'double', 'numeric')"
> class(exp_new)
[1] "matrix"
select函数只能修改data.frame ,所以需要把metrix变为data.frame
> y=as.data.frame(exp_new)
> y1=select(y,-num_range("GSM155932", 6:8))
> colnames(y1)
网友评论