[BioC] an apparently strange case of 'Warning: number of items to replace is not a multiple of replacement length'

Massimo Pinto pintarello at gmail.com
Mon Oct 19 14:47:46 CEST 2009


Greetings,

I have encountered a series of warning messages when copying indices
into a vector of integers. Specifically:

> Geni_GO_0033554_CM3.ctr3 <- as.integer(unlist(geneIdsByCategory(hgOver.6, "GO:0033554"), use.names = FALSE))

[1] 100133315     10714      1112     11198      1643      2237
26057     27113      4913     50484      5429     57697      5796
5885      7516      8445

> myrows<- integer(length=length(Geni_GO_0033554_CM3.ctr3))
+ for (i in 0:length(Geni_GO_0033554_CM3.ctr3)) {
+ myrows[i] <- which(Age_LNGSVsISS.topTable.2k[,
"mappings.Sub.ENTREZID"] == Geni_GO_0033554_CM3.ctr3[i])
+ }

Warning messages:
1: In myrows[i] <- which(Age_LNGSVsISS.topTable.2k[,
"mappings.Sub.ENTREZID"] ==  :
  number of items to replace is not a multiple of replacement length
2: In myrows[i] <- which(Age_LNGSVsISS.topTable.2k[,
"mappings.Sub.ENTREZID"] ==  :
  number of items to replace is not a multiple of replacement length
3: In myrows[i] <- which(Age_LNGSVsISS.topTable.2k[,
"mappings.Sub.ENTREZID"] ==  :
  number of items to replace is not a multiple of replacement length
4: In myrows[i] <- which(Age_LNGSVsISS.topTable.2k[,
"mappings.Sub.ENTREZID"] ==  :
  number of items to replace is not a multiple of replacement length

I have looked into a former discussion on this list
http://tolstoy.newcastle.edu.au/R/help/04/09/4534.html
but could not find the reason for getting an error in my case.

Apparently, I am not missing any item of those that I wish to copy;
still, I am getting a warning and would prefer to clarify this matter.

Thank you all in advance,
Massimo

sessionInfo follows:

> sessionInfo()
R version 2.9.1 (2009-06-26)
i386-apple-darwin8.11.1

locale:
C

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

other attached packages:
 [1] GO.db_2.2.11        hgug4112a.db_2.2.11 limma_2.18.0
GOstats_2.10.0      RSQLite_0.7-1       DBI_0.2-4
graph_1.22.2        Category_2.10.0
 [9] AnnotationDbi_1.6.0 Biobase_2.4.1

loaded via a namespace (and not attached):
[1] GSEABase_1.6.0    RBGL_1.20.0       XML_2.3-0
annotate_1.22.0   genefilter_1.24.0 splines_2.9.1     survival_2.35-4
 tools_2.9.1       xtable_1.5-5
>


Massimo Pinto
Post Doctoral Research Fellow
Enrico Fermi Centre and Italian Public Health Research Institute (ISS), Rome
http://claimid.com/massimopinto



More information about the Bioconductor mailing list