[R] Passing the parameter (file name) to png()

From: Maulik Shah <maulik.shah2020_at_gmail.com>
Date: Sat, 26 Jun 2010 10:25:13 +0530


I am fitting 3 parameter model to my response matrix and want to generate item characterstic curve.
I want to specify file name to save item characterstic curve by passing it as external parameter to the R batch script. The following is the code I have written for this.

*R Script:*

library(ltm)
cmd_args = commandArgs();
for (arg in cmd_args) cat(" ", arg, "\n", sep="") respmat <- read.table("C:\\rphp\\responsedata.txt") fit3pl <- tpm(respmat)
cat(" ", arg, "\n", sep="")
b <- c("C:\\rphp\\",arg)
png(file=b, bg="transparent")
plot(fit3pl,items=c,lwd=3)
dev.off()
rm(respmat,fit3pl,b)
q()

Could you please help me in doing so? I get an error message when R executes png().

Thanks and Regards,
Maulik

        [[alternative HTML version deleted]]



R-help_at_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. Received on Sat 26 Jun 2010 - 09:45:51 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 26 Jun 2010 - 12:00:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive