Am Montag, den 12.12.2011, 09:41 -0500 schrieb R. Michael Weylandt : > Why can't you just replace "temp/data" with filename (no quotes)? I'm not > sure I get the question...
… no I am feeling silly and I do not know where I screwed up before. Here is the full working example. #!/usr/bin/env r if (is.null(argv) | length(argv)!=1) { cat("Usage: auswertung.r datafile \n") q() } filename <- as.character(argv[1]) d = data.frame(x=scan(filename)) write(sum(d$x), paste(filename, ".result", sep=""), ncolumns=1) Thank you very much, Paul
signature.asc
Description: This is a digitally signed message part
______________________________________________ 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.