[R] Automating R for multiple data files

About this list Date view Thread view Subject view Author view Attachment view

From: Adam Tee (adam@ajtee.uklinux.net)
Date: Fri 02 May 2003 - 01:57:38 EST


Message-id: <3EB143F2.7000504@ajtee.uklinux.net>

Hi,

I'm new to R and have looked at the mail archives and not
seen a solution to my problem.

I have a set of data files with filenames in the following form
haydn1stmvt.jtf.sim0.142292.et.dist, where the latter half
changes, after the jtf.

What I am trying to do is process the set of these files using
R's batch mode. using the following :

library(mva)

mdsdata <- read.table(file)
cm <- cmdscale(mdsdata)
x <- cm[,1]
y <- -cm[,2]

postscript("file.eps", height=5, width=5)
plot(x,y,type="n", main="classical MDS")
text(x,y,names(mdsdata))
dev.off()

I want the variable file to contain the relevant file name with
having to input it manually for each file. Is there an easy solution to
this ??

Thanks

Adam Tee
PhD Student
University of Leeds

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:44 EST