yes, but you will want to call the function as

imputedMatrix = impute.knn(myMatrix)$data

for example, using a synthetic matrix with random NAs:

library(impute)
set.seed(123)

# create a 760*160 matrix w/random NAs
baz <- matrix(rnorm(760*160), ncol=160)
is.na(baz) <- rbinom(760*160, 1, 0.01)
anyMissing(baz)
# [1] TRUE
mean(baz, na.rm=TRUE)
# [1] 0.00251371

# now impute it, with the default k=10 neighbors
qux <- impute.knn(baz)$data
anyMissing(qux)
# [1] FALSE
mean(qux)
# [1] 0.002513383

More parameters are of course documented under

?impute.knn

Hope this helps; impute is a real workhorse package.

--t


On Sat, Mar 3, 2012 at 7:16 AM, Ali Mohammadian <nrcgeb@gmail.com> wrote:

> Dear all,
> Newbie.
> I have an expression matrix with ~760 genes, 40 samples and each
> sample has 4 replicates (=160 columns). May I use
> Matrix= impute.knn (My.matrix)
>
> Or should I detremine some parameters? Thanks in advance.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



-- 
*A model is a lie that helps you see the truth.*
*
*
Howard Skipper<http://cancerres.aacrjournals.org/content/31/9/1173.full.pdf>

	[[alternative HTML version deleted]]

