[BioC] Error of pamr.knnimpute

James W. MacDonald jmacdon at med.umich.edu
Tue Jan 16 15:26:03 CET 2007


washiot+1 at gmail.com wrote:
> Dear all,
> 
> I am trying to use pamr.knnimpute with Agilent Microarray data which
> consist from 137 colums (samples) and 23653 rows (probes).
> These data values were calculated in log ratio, and 212 of them were "NA".
> 
> I tried to run pamr.knnimpute with this dataset.
> But an error occurred as below.
> 
> 
>>pamr.knnimpute(tmp2)
> 
> Error in rep(1, p) : invalid 'times' argument
> 
> 
> Would you tell me how to fix this problem ?

You might start with the help page for pamr.knnimpute.

Usage:

      pamr.knnimpute(data ,k = 10, rowmax = 0.5, colmax = 0.8, maxp = 1500)

Arguments:

     data: The PAM input data. A list with components: 'x', an
           expression matrix with  genes in the rows, samples in the
           columns, and 'y', a vector of the class labels for each
           sample. Same form as used by pamr.train, and same as that
           produced by 'pamr.from.excel'



 From what you have said, it appears that your 'tmp2' object is a matrix 
of expression data, not the list that pamr.knnimpute() is expecting. If 
you don't do what the function is expecting, it won't work correctly.

Best,

Jim


> 
> 
> Sincerely yours,
> 
> Takanori Washio
> Keio University
> 
> 
> ------------------------------------
> 
> 
>>tmp2[is.na(tmp2)]
> 
> [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
> NA
> ----//----
> [201] NA NA NA NA NA NA NA NA NA NA NA NA
> 
> ------------------------------------
> 
> 
>>tmp2[1,]
> 
>        1        2        3        4        5        6        7        8 
>  0.10767  0.16026 -0.04576  0.01838  0.06601 -0.01996  0.09117  0.06113 
> ----//----
>      137 
>  0.00153
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the Bioconductor mailing list