Carlos Morales wrote: > Hello, > > I still have the same error which I have written in the Subject field, I > leave here the code and I hope you can help me with this: > [removed]
the lengthy code example does not make it easier to help you, in particular without the data you used. All the commented out code should have been removed before posting. My guess is that you use R < 2.8.0 and generate a vector s which contains only NAs. Try to inspect your function filter.clones by putting a browser() call somewhere before the sd() call and run it again. See ?browser and ?trace. And you could vectorize this (and other parts), e.g. the last loop would be rewritten as tripliclones.info$Estandar_desviation <- apply(tripliclones.info[ ,2:4], 1, function(x) sd(as.numeric(x), na.rm=TRUE)) Regards, Matthias R version 2.7.1 (2008-06-23) > b <- rep(NA,4) > sd(b) Error in var(x, na.rm = na.rm) : missing observations in cov/cor > sd(b, TRUE) Error in var(x, na.rm = na.rm) : no complete element pairs R version 2.8.1 (2008-12-22) > b<- rep(NA,4) > sd(b) [1] NA > sd(b, TRUE) [1] NA -- Matthias Burger Project Manager/ Biostatistician Epigenomics AG Kleine Praesidentenstr. 1 10178 Berlin, Germany phone:+49-30-24345-0 fax:+49-30-24345-555 http://www.epigenomics.com matthias.bur...@epigenomics.com -- Epigenomics AG Berlin Amtsgericht Charlottenburg HRB 75861 Vorstand: Geert Nygaard (CEO/Vorsitzender) Oliver Schacht PhD (CFO) Aufsichtsrat: Prof. Dr. Dr. hc. Rolf Krebs (Chairman/Vorsitzender) ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.