[R] My first R-program
Shai Shen-Orr
lvssso at bioinfo.weizmann.ac.il
Wed Apr 5 19:39:25 CEST 2000
Sorry, I pasted the wrong file in earlier... this is the correct one:
pValCalculator(b, n=20, m=20)
{
ind <- 1:min(c(n,m))
prob <- (1-pnorm(b,sd=std*sqrt(ind)))
prob1 <- sum((n-ind+1)*(m-ind+1)*prob)
prob1
}
inputData <-
scan("/users/lvssso/projects/LAMA/output/pValLamaScore.tmp", list(block1
= "",block2 = "",width1 = 0,width2 = 0,alignment = 0,score = 0));
pVal <- vector(mode = "numeric", length(inputData$score));
for(i in 1:length(inputData$score))
pVal[i] <- pValCalculator(inputData$score, inputData$width1,
inputData$width2);
inputData$pValue <- list(pVal);
write.table(inputData, file = "pValLamaScore.out", row.names = FALSE,
col.names = FALSE, sep = "\t");
The error seems to be in, in its inability to recognize my self-made
function (pValCalculator).
Shai
--
Shai Shen-Orr
Crown Human Genome Center and Bioinformatics Unit,
Weizmann Institute of Science
Home page and more contact info: http://bioinfo.weizmann.ac.il/~lvssso
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list