HI all, raw_urine = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\mz.spot.sam.dat.new", header = TRUE ) pvalue = read.table("Z:\\bruce.9.3.09.sample.stability.analysis\\urine\\all.urine.features.t.test.result", header = TRUE ) library(compositions) p = function(a,b){ y = pvalue[,a] if(y<0.01){ index = which(y, arr.ind=TRUE) day1 = raw_urine[index,3:7] day2 = raw_urine[index,b] graph = {matplot(raw_urine[index,1],day1,lwd = 3) matpoints(raw_urine[index,1],day2,lwd = 3, col="red")} print(graph) }}
the above is my sample code in which i'm trying to output some graphs. but however, I can get return() to return value I want and all. But I just don't know if there's anything special I need to use to output graphs. I get this error msg: " Warning message: In if (y < 0.01) { : the condition has length > 1 and only the first element will be used" everything was fine until i put in graphing functions in the end. Thanks. -- Edward Chen Email: edche...@gmail.com Cell Phone: 510-371-4717 [[alternative HTML version deleted]] ______________________________________________ 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.