[R] help output figures in R
David Winsemius
dwinsemius at comcast.net
Wed Apr 7 00:28:53 CEST 2010
On Apr 6, 2010, at 6:00 PM, Changbin Du wrote:
Perhaps:
> somfunc<- function (file) {
>
fname <- deparse(substitute(file))
> aa_som<-scale(file)
>
>
> final.som<-som(data=aa_som, rlen=10000, grid=somgrid(5,4,
> "hexagonal"))
>
> pdf(file=paste("/home/cdu/changbin/", fname, ".pdf", sep="") #output
> graphic file.
>
> plot(final.som, main="Unsupervised SOM")
>
> dev.off()
>
> }
>
> I have many different files, if I want output pdf file with the
> same name
> as for each dataset I feed to the function somfunc.
>
> HOw should I DO?
This seems to be a popular question this week. You should read more of
r-help.
>
> --
>
> Changbin Du
> DOE Joint Genome Institute
> Bldg 400 Rm 457
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list