Thanks so much!
On Tue, Apr 6, 2010 at 5:19 PM, Dennis Murphy <djmuser@gmail.com> wrote:
> If you have a bunch of files in the same directory, look into list.files()
> and consider
> using lapply or some type of loop to process the files. There are examples
> from
> past questions in the archives. Use package sos or use something like
> RSiteSearch('<search string>') to generate potential hits.
>
> HTH,
> Dennis
>
> On Tue, Apr 6, 2010 at 3:00 PM, Changbin Du <changbind@gmail.com>
wrote:
>
>> somfunc<- function (file) {
>>
>> aa_som<-scale(file)
>>
>>
>> final.som<-som(data=aa_som, rlen=10000, grid=somgrid(5,4,
"hexagonal"))
>>
>> pdf(file="/home/cdu/changbin/file.pdf") #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?
>>
>> THANKS!
>>
>> --
>> Sincerely,
>> Changbin
>> --
>>
>> Changbin Du
>> DOE Joint Genome Institute
>> Bldg 400 Rm 457
>> 2800 Mitchell Dr
>> Walnut Creet, CA 94598
>> Phone: 925-927-2856
>>
>> [[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.
>>
>
>
--
Sincerely,
Changbin
--
Changbin Du
DOE Joint Genome Institute
Bldg 400 Rm 457
2800 Mitchell Dr
Walnut Creet, CA 94598
Phone: 925-927-2856
[[alternative HTML version deleted]]