Can anyone tell me how to use 'try' command for a block of commands? Right now I'm using try for each command like this:
try(m<-MAplot(genes(cuff),args[1],args[2]))
try(png('MA_plot.png'))
try(m)
try(dev.off ())
try(print("MA_plot"))
EDIT:
try({
disp<-dispersionPlot(genes(cuff))
png('dispersion_plot.png')
disp
dev.off ()
print("dispersion_plot")
genes.scv<-fpkmSCVPlot(genes(cuff))
png('SCV_plot.png')
genes.scv
dev.off ()
print("SCV_plot")
dens<-csDensity(genes(cuff))
png('density_plot.png')
dens
dev.off ()
print("density_plot")
})
With this also I'm not getting plots..