Dear Bioconductors,

Please can you help me with small annoying problem. 

 

I want to impute a matrix that has 4 columns of data. Using the
impute.knn package returns me a list not a matrix. 

 

Using as.matrix to return the data returned from impute.knn does not
give me the same matrix structure as I began with?

It must be a simple answer?

 

My code:

 

library(impute);

imputed_data <- impute.knn(normalised_data, k=5);

 

> dim(normalised_data)

[1] 43376     4

> dim(imputed_data)

NULL

> class(normalised_data)

[1] "matrix"

> class(imputed_data)

[1] "list"

 

Why does impute.knn not return the data as you would sensibly think it
would, ie in the same format as your microarray data?

Please tell me if I am missing something or the solution?

 

Thanks a lot for any help. 

 

Kind regards,

 

John.


	[[alternative HTML version deleted]]

