Hi Nathalie,

if I understand correctly, you have 60 DNAcopy object you need to plot. The
following code will do the trick:

The first step is to create a vector with the name of the 60 objects:

object.list <- c("DNAcopy1", "DNAcopy2"..."DNAcopy60")

than do a loop to plot them as pdf file:

for (I in object.list) {
   pdf(file=paste(I, ".pdf", sep=""), height=10, width=10)
   plot(I, plot.type="w")
   dev.off()
}

you can modify the height and width in the pdf function to increase or
reduce the plot dimensions

best
r


On 6 April 2011 12:45, Nathalie Conte <nac@sanger.ac.uk> wrote:

> dear All,
> I am  using the DNA copy package to get my CGH files (Agilent 244K arrays)
> analysed.
> I am using this command to plot them one by one :
> >plot(CNA.object, plot.type="w")
> This is a very slow and time consuming process and I have ~60 files to plot
> . I am quite novice in R and was wondering whether anybody could advise on a
> simple script to get all files  plotted and the plots saved into a single
> pdf file ( or nay other format)?
> Many thanks in advance for any advice,
>
> Nathalie
>
>
> --
> The Wellcome Trust Sanger Institute is operated by Genome Research Limited,
> a charity registered in England with number 1021457 and a company registered
> in England with number 2742969, whose registered offic...{{dropped:19}}

