NONMEM Users Network Archive

Hosted by Cognigen

Re: AW: Bootstrap histograms in R

From: Smith, Mike K <mike.k.smith>
Date: Sat, 6 Oct 2012 10:21:46 +0000

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:sebastian.frechen
Sent: Saturday, October 06, 2012 05:35 AM
To: 'Attkins, Neil' <Neil.Attkins
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: owner-nmusers -nmusers
Gesendet: Freitag, 5. Oktober 2012 16:33
An: Tremblay, Pierre-Olivier; nmusers
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:potremblay
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: owner-nmusers
Sent: 2012-10-05 09:40
To: nmusers to:nmusers
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
Received on Sat Oct 06 2012 - 06:21:46 EDT

The NONMEM Users Network is maintained by ICON plc. Requests to subscribe to the network should be sent to: nmusers-request@iconplc.com.

Once subscribed, you may contribute to the discussion by emailing: nmusers@globomaxnm.com.