preprocessCore problem: normalize.quantiles error
1
0
Entering edit mode
gugpuccio ▴ 10
@gugpuccio-7602
Last seen 4.3 years ago
Finland

Hi,

I have 4 vectors of the same length. I joinded them in a matrix in which every row is a vector, with the command:

TOT=do.call(rbind,list)

in which TOT is the final matrix and list is a list with the 4 vectors.

 

Then i use normalize.quantiles on this matrix and i get this error

Error in normalize.quantiles(x = TOT) : 
  vector types do not match in copyVector

do you know why? 

Thank you.

 
preprocesscore error normalization • 4.5k views
ADD COMMENT
0
Entering edit mode
Diego Diez ▴ 760
@diego-diez-4520
Last seen 4.1 years ago
Japan

This works for me:

set.seed(123)
mylist <- lapply(1:5, function(k) {
  sample(1:100, size = 10, replace = TRUE)
})
mylist
[[1]]
 [1] 29 79 41 89 95  5 53 90 56 46

[[2]]
 [1] 96 46 68 58 11 90 25  5 33 96

[[3]]
 [1]  89  70  65 100  66  71  55  60  29  15

[[4]]
 [1] 97 91 70 80  3 48 76 22 32 24

[[5]]
 [1] 15 42 42 37 16 14 24 47 27 86

m <- do.call(rbind, mylist)
m
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]   29   79   41   89   95    5   53   90   56    46
[2,]   96   46   68   58   11   90   25    5   33    96
[3,]   89   70   65  100   66   71   55   60   29    15
[4,]   97   91   70   80    3   48   76   22   32    24
[5,]   15   42   42   37   16   14   24   47   27    86

library(preprocessCore)
normalize.quantiles(m)
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 30.0 70.3 21.4 70.3 86.1 21.4 54.6 86.1 86.1  54.6
[2,] 70.3 30.0 70.3 30.0 30.0 86.1 30.0 21.4 70.3  86.1
[3,] 54.6 54.6 54.6 86.1 70.3 70.3 70.3 70.3 30.0  21.4
[4,] 86.1 86.1 86.1 54.6 21.4 54.6 86.1 30.0 54.6  30.0
[5,] 21.4 21.4 30.0 21.4 54.6 30.0 21.4 54.6 21.4  70.3
 
sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.4 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] graphics  grDevices utils     datasets  stats     methods   base     

other attached packages:
[1] preprocessCore_1.30.0 fortunes_1.5-2        dplyr_0.4.2           tidyr_0.2.0          
[5] reshape2_1.4.1        ggplot2_1.0.1         lattice_0.20-31       devtools_1.8.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6      xml2_0.1.1       magrittr_1.5     MASS_7.3-42      munsell_0.4.2   
 [6] colorspace_1.2-6 R6_2.1.0         stringr_1.0.0    plyr_1.8.3       tools_3.2.1     
[11] parallel_3.2.1   grid_3.2.1       gtable_0.1.2     DBI_0.3.1        git2r_0.10.1    
[16] rversions_1.0.1  digest_0.6.8     assertthat_0.1   curl_0.9.1       memoise_0.2.1   
[21] stringi_0.5-5    scales_0.2.5     proto_0.3-10 

So maybe you could provide more details about what are you doing including your system information when running the code (i.e. output of sessionInfo())

ADD COMMENT

Login before adding your answer.

Traffic: 857 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6