AW: Bootstrap histograms in R

3 messages 3 people Latest: Oct 08, 2012

AW: Bootstrap histograms in R

From: Sebastian Frechen Date: October 06, 2012 technical
Hey Neil If you would like to save your graphics in a pdf you could also add the following code before and after the code that creates the graphics. This would save all graphics in a "multipage"-pdf in the working folder: pdf("my_bootstrap_analysis.pdf", width=10, height=8) --- CODE TO CREATE GRAPHICS --- dev.off() Kind Regards Sebastian Dr. Sebastian Frechen Department of Pharmacology, Clinical Pharmacology Cologne University Hospital ----------------------- Gleueler Str. 24 50931 Cologne Germany Von: [email protected] [mailto:[email protected]] Im Auftrag von Attkins, Neil Gesendet: Freitag, 5. Oktober 2012 16:33 An: Tremblay, Pierre-Olivier; [email protected] Betreff: RE: [NMusers] Bootstrap histograms in R Hi Pierre-Olivier, Thank you for your suggestion that has worked perfectly ;-) Many thanks Neil
Quoted reply history
From: Tremblay, Pierre-Olivier [mailto:[email protected]] Sent: 05 October 2012 15:20 To: Attkins, Neil Subject: RE: [NMusers] Bootstrap histograms in R Hi Neil, We don't have the code piece surrounding the graphics call but you could maybe add the following graphics device call just prior to the graphing commands: windows(record=T). Or add the "record=T" option if the windows() call is there (under Mac OS, the graphics device call should be "quartz()" instead of windows(), I think). You should then be able to page up or down with the keyboard. Best, Pierre-Olivier From: [email protected] [mailto:[email protected]] On Behalf Of Attkins, Neil Sent: 2012-10-05 09:40 To: [email protected] Subject: [NMusers] Bootstrap histograms in R Hi I have just run a bootstrap analysis on my final Pop PK model using NONMEM 7.2 with PDx-Pop 5. My model has 7 Thetas in it and when I come to evaluate the output from the bootstrap in R the Theta histograms are plotted in a 3x2 matrix in an R window, and the plot for Theta 7 seems to overwrite the plot for Thetas 1-6 so that I cannot see them - there is just one window open with the Theta 7 histogram. Does anybody know if there is a way to change the PDx-Pop supplied R script or an option somewhere within PDx-Pop to change the plots to plot 8 to a page (4x2 matrix), or so the plots go onto separate pages/tabs so I can get the Theta 1-6 histograms? Many thanks Neil

Re: AW: Bootstrap histograms in R

From: Mike K Smith Date: October 06, 2012 technical
Also: png("myplots%d.png") #insert plot code here plot(...) dev.off() Will create as many png files as pages in your plot. "%d" as part of the filename is the magic here. To change layout of graphs: par(mfrow=c(4,2)) will give you four rows of two plots. Mike
Quoted reply history
From: Frechen, Dr. Sebastian [mailto:[email protected]] Sent: Saturday, October 06, 2012 05:35 AM To: 'Attkins, Neil' <[email protected]>; [email protected] <[email protected]> Subject: AW: [NMusers] Bootstrap histograms in R Hey Neil If you would like to save your graphics in a pdf you could also add the following code before and after the code that creates the graphics. This would save all graphics in a “multipage”-pdf in the working folder: pdf("my_bootstrap_analysis.pdf", width=10, height=8) --- CODE TO CREATE GRAPHICS --- dev.off() Kind Regards Sebastian Dr. Sebastian Frechen Department of Pharmacology, Clinical Pharmacology Cologne University Hospital ----------------------- Gleueler Str. 24 50931 Cologne Germany Von: [email protected] [mailto:[email protected]] Im Auftrag von Attkins, Neil Gesendet: Freitag, 5. Oktober 2012 16:33 An: Tremblay, Pierre-Olivier; [email protected] Betreff: RE: [NMusers] Bootstrap histograms in R Hi Pierre-Olivier, Thank you for your suggestion that has worked perfectly ;-) Many thanks Neil From: Tremblay, Pierre-Olivier [mailto:[email protected]]<mailto:[mailto:[email protected]]> Sent: 05 October 2012 15:20 To: Attkins, Neil Subject: RE: [NMusers] Bootstrap histograms in R Hi Neil, We don't have the code piece surrounding the graphics call but you could maybe add the following graphics device call just prior to the graphing commands: windows(record=T). Or add the "record=T" option if the windows() call is there (under Mac OS, the graphics device call should be "quartz()" instead of windows(), I think). You should then be able to page up or down with the keyboard. Best, Pierre-Olivier From: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Attkins, Neil Sent: 2012-10-05 09:40 To: [email protected]<mailto:[email protected]> Subject: [NMusers] Bootstrap histograms in R Hi I have just run a bootstrap analysis on my final Pop PK model using NONMEM 7.2 with PDx-Pop 5. My model has 7 Thetas in it and when I come to evaluate the output from the bootstrap in R the Theta histograms are plotted in a 3x2 matrix in an R window, and the plot for Theta 7 seems to overwrite the plot for Thetas 1-6 so that I cannot see them – there is just one window open with the Theta 7 histogram. Does anybody know if there is a way to change the PDx-Pop supplied R script or an option somewhere within PDx-Pop to change the plots to plot 8 to a page (4x2 matrix), or so the plots go onto separate pages/tabs so I can get the Theta 1-6 histograms? Many thanks Neil

RE: AW: Bootstrap histograms in R

From: Neil Attkins Date: October 08, 2012 technical
Hi Mike, Great, many thanks for your suggestions, I will definitely try them out. Many thanks Neil
Quoted reply history
From: Smith, Mike K [mailto:[email protected]] Sent: 06 October 2012 11:22 To: '[email protected]'; Attkins, Neil; '[email protected]' Subject: Re: AW: [NMusers] Bootstrap histograms in R Also: png("myplots%d.png") #insert plot code here plot(...) dev.off() Will create as many png files as pages in your plot. "%d" as part of the filename is the magic here. To change layout of graphs: par(mfrow=c(4,2)) will give you four rows of two plots. Mike From: Frechen, Dr. Sebastian [mailto:[email protected]]<mailto:[mailto:[email protected]]> Sent: Saturday, October 06, 2012 05:35 AM To: 'Attkins, Neil' <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> Subject: AW: [NMusers] Bootstrap histograms in R Hey Neil If you would like to save your graphics in a pdf you could also add the following code before and after the code that creates the graphics. This would save all graphics in a “multipage”-pdf in the working folder: pdf("my_bootstrap_analysis.pdf", width=10, height=8) --- CODE TO CREATE GRAPHICS --- dev.off() Kind Regards Sebastian Dr. Sebastian Frechen Department of Pharmacology, Clinical Pharmacology Cologne University Hospital ----------------------- Gleueler Str. 24 50931 Cologne Germany Von: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> Im Auftrag von Attkins, Neil Gesendet: Freitag, 5. Oktober 2012 16:33 An: Tremblay, Pierre-Olivier; [email protected]<mailto:[email protected]> Betreff: RE: [NMusers] Bootstrap histograms in R Hi Pierre-Olivier, Thank you for your suggestion that has worked perfectly ;-) Many thanks Neil From: Tremblay, Pierre-Olivier [mailto:[email protected]]<mailto:[mailto:[email protected]]> Sent: 05 October 2012 15:20 To: Attkins, Neil Subject: RE: [NMusers] Bootstrap histograms in R Hi Neil, We don't have the code piece surrounding the graphics call but you could maybe add the following graphics device call just prior to the graphing commands: windows(record=T). Or add the "record=T" option if the windows() call is there (under Mac OS, the graphics device call should be "quartz()" instead of windows(), I think). You should then be able to page up or down with the keyboard. Best, Pierre-Olivier From: [email protected]<mailto:[email protected]> [mailto:[email protected]]<mailto:[mailto:[email protected]]> On Behalf Of Attkins, Neil Sent: 2012-10-05 09:40 To: [email protected]<mailto:[email protected]> Subject: [NMusers] Bootstrap histograms in R Hi I have just run a bootstrap analysis on my final Pop PK model using NONMEM 7.2 with PDx-Pop 5. My model has 7 Thetas in it and when I come to evaluate the output from the bootstrap in R the Theta histograms are plotted in a 3x2 matrix in an R window, and the plot for Theta 7 seems to overwrite the plot for Thetas 1-6 so that I cannot see them – there is just one window open with the Theta 7 histogram. Does anybody know if there is a way to change the PDx-Pop supplied R script or an option somewhere within PDx-Pop to change the plots to plot 8 to a page (4x2 matrix), or so the plots go onto separate pages/tabs so I can get the Theta 1-6 histograms? Many thanks Neil