Error in huge R package when criterion "stars" -


i trying association network using expression data have, data huge: 300 samples , ~30,000 genes. apply gaussian graphical model data using huge r package.

here code using

dim(data) #[1] 317 32291  huge.out <- huge.npn(data) huge.stars <- huge.select(huge.out, criterion="stars") 

however in last step got error:

error in cor(x) : ling....in progress:10%  missing values present in input variable 'x'. consider using use = 'pairwise.complete.obs' 

any appreciated.

you posted exact question on rhelp today. both , rhelp deprecate cross-posting if choose switch venues @ least courteous inform readership.

you responded suggestion here on there missing data in data-object named 'data' claiming there no missing data. code return:

lapply(data , function(x) sum(is.na(x))) 

that first level check, there error caused later step encountered missing value in matrix of correlation coefficients in matrix 'huge.out". happen if there were: a) infinities in calculations or b) if 1 of columns constant:

> cor(c(1:10,inf), 1:11) [1] nan > cor(rep(2,7), rep(2,7)) [1] na warning message: in cor(rep(2, 7), rep(2, 7)) : standard deviation 0 

so next check is:

sum( is.na(huge.out) ) 

that @ least give basis defending claim of no missings , give plausible theory source of error. locate column entirely constant might (assuming dataframe):

 which(sapply(sapply(data, unique), length) > 1) 

if it's matrix, need use apply.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -