Hi, I had the following situation and I greatly appreciate any advice. SAM gave the following error : "Error in var(v) : missing observations in cov/cor" when applied on a dataset. The error was traced to a variance computation of a vector containing NA in fudge() [a subroutine called by SAM()]. This vector is a computational output in fudge() : "cv[i] <- sqrt(var(v))/mean(v)" The same error was encountered when SAM was applied to other similar datasets. Would modifying the statement to "var(v, na.rm=TRUE)" be a possibility? Many thanks, Siew Leng R-1.8.1 on Windows XP Home Edition Code snippets : data <- matrix(runif(25, 0,1), nrow=5) x <- 1 : 5 sam(data, x)
On Thu, 29 Jan 2004 01:03:56 -0800 (PST), you wrote:>Hi, > >I had the following situation and I greatly appreciate >any advice. > >SAM gave the following error : > >"Error in var(v) : missing observations in cov/cor" > >when applied on a dataset. The error was traced to a >variance computation of a vector containing NA in >fudge() [a subroutine called by SAM()]. This vector is >a computational output in fudge() : > >"cv[i] <- sqrt(var(v))/mean(v)" > >The same error was encountered when SAM was applied to >other similar datasets. Would modifying the statement >to "var(v, na.rm=TRUE)" be a possibility?SAM() and sam() are different names in R, but neither of them is in the base packages. Which package did you find sam() in? You probably want to ask the author of the package if this modification would be safe. Duncan Murdoch
James MacDonald
2004-Jan-29 13:54 UTC
[R] Help in error : SAM function in library siggenes
siggenes is part of Bioconductor, and the author is Holger Schwender. You should ask Holger first (holger.schw at gmx.de), and the BioC list second. Best, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623>>> Duncan Murdoch <dmurdoch at pair.com> 01/29/04 06:54AM >>>On Thu, 29 Jan 2004 01:03:56 -0800 (PST), you wrote:>Hi, > >I had the following situation and I greatly appreciate >any advice. > >SAM gave the following error : > >"Error in var(v) : missing observations in cov/cor" > >when applied on a dataset. The error was traced to a >variance computation of a vector containing NA in >fudge() [a subroutine called by SAM()]. This vector is >a computational output in fudge() : > >"cv[i] <- sqrt(var(v))/mean(v)" > >The same error was encountered when SAM was applied to >other similar datasets. Would modifying the statement >to "var(v, na.rm=TRUE)" be a possibility?SAM() and sam() are different names in R, but neither of them is in the base packages. Which package did you find sam() in? You probably want to ask the author of the package if this modification would be safe. Duncan Murdoch ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html