Is there an easy way to change the axis labels in the ranpar.vs.cov routine
(eg., from ETA1 to IIV_CL)
I've tried excluding PK parameters and leaving only ETAS in PATAB, and renaming
the ETA column headers to my desired name (eg.,IIV_CL in PATAB), but that
doesn't work.
I have also have tried
ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5,
page.numbers=F, ylb=c("IIV_CL", "IIV_Vc", "IIV_Q", "IIV_Vp"),
main=NULL, scales = list(x=list(cex=1.5),
y=list(cex=1.5)))
The ylb command plants all four labels on every plot.
Paul Hutson, PharmD, BCOP
Professor
UWisc School of Pharmacy
T: 608.263.2496
F: 608.265.5421
Changing axis label in ranram.vs.cov in XPOSE4
4 messages
3 people
Latest: Feb 22, 2019
Hey Paul,
I found a workaround for this issue. It's not the most elegant, but it
might push you in the right direction for a more elegant solution.
## Save the xyplot that is output by the function
fig <- ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5, page.numbers=F,
main=NULL, scales = list(x=list(cex=1.5), y=list(cex=1.5)))
## Create custom list of labels, repeating each for the number of
covariates included
label <- c(rep("IIV_CL",3), rep("IIV_Vc", 3))
## loop through the plots in your saved plot object
for(i in 1:length(fig@plotList)){
## assign the ith y-label to the ith plot
fig@plotList[[i]]$ylab[[1]] <- label[i]
}
## print figure to screen
fig
There is almost certainly a better way of accomplishing this, but this will
work for now. Good luck!
Sam
--
Samuel Callisto
PhD Candidate
Experimental and Clinical Pharmacology
University of Minnesota
717 Delaware St SE; Room 468
Minneapolis, MN 55455
Quoted reply history
On Fri, Feb 15, 2019 at 5:42 PM Paul Hutson <[email protected]> wrote:
> Is there an easy way to change the axis labels in the ranpar.vs.cov
> routine (eg., from ETA1 to IIV_CL)
>
> I’ve tried excluding PK parameters and leaving only ETAS in PATAB, and
> renaming the ETA column headers to my desired name (eg.,IIV_CL in PATAB),
> but that doesn’t work.
>
> I have also have tried
>
> ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5,
> page.numbers=F, ylb=c("IIV_CL", "IIV_Vc", "IIV_Q", "IIV_Vp"),
>
> main=NULL, scales = list(x=list(cex=1.5),
> y=list(cex=1.5)))
>
> The ylb command plants all four labels on every plot.
>
>
>
> Paul Hutson, PharmD, BCOP
>
> Professor
>
> UWisc School of Pharmacy
>
> T: 608.263.2496
>
> F: 608.265.5421
>
>
>
Dear all.
I think you can try the following (Andy and Niclas, am I right?).
#Read in
xpdb <- xpose.data("xxx")
#Provided ETA1 is the name of your variable in xpdb.
xpdb@Prefs@Labels$ETA1 <- "IIV_CL"
All the best, Siv
Siv http://katalog.uu.se/profile/?id=N96-5738, PhD
Researcher
Dept of Pharmaceutical Biosciences
Faculty of Pharmacy
Uppsala University
Sweden
Phone: +46 (0)18 471 4315
Private: +46 (0)733 924 657
http://www.farmbio.uu.se/research/researchgroups/pharmacometrics/
Quoted reply history
From: [email protected] <[email protected]> On Behalf Of
Samuel Callisto
Sent: 18 February 2019 05:48
To: Paul Hutson <[email protected]>
Cc: nmusers <[email protected]>
Subject: Re: [NMusers] Changing axis label in ranram.vs.cov in XPOSE4
Hey Paul,
I found a workaround for this issue. It's not the most elegant, but it might
push you in the right direction for a more elegant solution.
## Save the xyplot that is output by the function
fig <- ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5, page.numbers=F,
main=NULL, scales = list(x=list(cex=1.5), y=list(cex=1.5)))
## Create custom list of labels, repeating each for the number of covariates
included
label <- c(rep("IIV_CL",3), rep("IIV_Vc", 3))
## loop through the plots in your saved plot object
for(i in 1:length(fig@plotList)){
## assign the ith y-label to the ith plot
fig@plotList[[i]]$ylab[[1]] <- label[i]
}
## print figure to screen
fig
There is almost certainly a better way of accomplishing this, but this will
work for now. Good luck!
Sam
--
Samuel Callisto
PhD Candidate
Experimental and Clinical Pharmacology
University of Minnesota
717 Delaware St SE; Room 468
Minneapolis, MN 55455
On Fri, Feb 15, 2019 at 5:42 PM Paul Hutson
<[email protected]<mailto:[email protected]>> wrote:
Is there an easy way to change the axis labels in the ranpar.vs.cov routine
(eg., from ETA1 to IIV_CL)
I’ve tried excluding PK parameters and leaving only ETAS in PATAB, and renaming
the ETA column headers to my desired name (eg.,IIV_CL in PATAB), but that
doesn’t work.
I have also have tried
ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5,
page.numbers=F, ylb=c("IIV_CL", "IIV_Vc", "IIV_Q", "IIV_Vp"),
main=NULL, scales = list(x=list(cex=1.5),
y=list(cex=1.5)))
The ylb command plants all four labels on every plot.
Paul Hutson, PharmD, BCOP
Professor
UWisc School of Pharmacy
T: 608.263.2496
F: 608.265.5421
När du har kontakt med oss på Uppsala universitet med e-post så innebär det att
vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du
läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/
E-mailing Uppsala University means that we will process your personal data. For
more information on how this is performed, please read here:
http://www.uu.se/en/about-uu/data-protection-policy
Thanks to Laura, Sam and Siv for their suggestions, which I summarize below:
Sam's approach at the bottom is nice in that it shows how to access the label
names of the S4 object, yet is more complex in that the loop is sensitive to
the entry of the correct number of covariates.
Siv's approach is perhaps the most elegant to me, in that it allows the labels
to be changed before the ranpar.vs.cov script is run, and will also be ready
for other functions that will use the ETA/IIV data.
Laura's approach is actually my favorite for the ranpar.vs.cov command, in that
in making the stepwise label change and output to the multiple plots (with the
%02d creating numbered files), her method separates the plots of differing
ETAs/IIVs. That is, the plots for IIV_Vc do not start on the same page as the
end of the plots of IIV_CL.
## Standard argument
runnum<-1
xpdb1 <- xpose.data(runnum)
png(file="ETAvsCOV%02d.png")
ranpar.vs.cov(xpdb1, onlyfirst = FALSE, cex=0.5,x.cex=1.5,y.cex=1.5,
page.numbers=F,
main=NULL, scales = list(x=list(cex=1.5), y=list(cex=1.5)))
dev.off()
## From Laura Curd
runnum<-1
xpdb1 <- xpose.data(runnum)
change.xvardef(xpdb1, "ranpar")= "ETA1"
xplot <- ranpar.vs.cov(xpdb1, onlyfirst=TRUE, ylb= "IIV_CL")
png(file="ETAvsCOV_CurdMethod_ETA1%02d.png")
xplot
dev.off()
# Then you can make the ETA2 plots:
change.xvardef(xpdb1, "ranpar")= "ETA2"
xplot <- ranpar.vs.cov(xpdb1, onlyfirst=TRUE, ylb= "IIV_Vc")
png(file="ETAvsCOV_CurdMethod_ETA2%02d.png")
xplot
dev.off()
## From Siv Jonsson
runnum<-1
xpdb <- xpose.data(runnum)
#Provided ETA1 is the name of your variable in xpdb.
xpdb@Prefs@Labels$ETA1 <- "IIV_CL"
xpdb@Prefs@Labels$ETA2 <- "IIV_Vc"
png(file="ETAvsCOV_JonssonMethod%02d.png")
ranpar.vs.cov(xpdb, onlyfirst = FALSE, cex=0.5,x.cex=1.5,y.cex=1.5,
page.numbers=F,
main=NULL, scales = list(x=list(cex=1.5), y=list(cex=1.5)))
dev.off()
### From Sam Callisto
fig <- ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5, page.numbers=F,
main=NULL, scales = list(x=list(cex=1.5), y=list(cex=1.5)))
## Create custom list of labels, repeating each for the number of covariates
included
label <- c(rep("IIV_CL",3), rep("IIV_Vc", 3))
## loop through the plots in your saved plot object
for(i in 1:length(fig@plotList)){
## assign the ith y-label to the ith plot
fig@plotList[[i]]$ylab[[1]] <- label[i]
}
## print figure to screen
fig
Paul Hutson, PharmD, BCOP
Professor
UWisc School of Pharmacy
T: 608.263.2496
F: 608.265.5421
Quoted reply history
From: Laura Curd <[email protected]>
Sent: Saturday, February 16, 2019 10:32 AM
To: Paul Hutson <[email protected]>; 'nmusers' <[email protected]>
Subject: RE: Changing axis label in ranram.vs.cov in XPOSE4
Hi Paul,
I have run into the same issue, so I typically call ranpar.vs.cov within a for
loop (using vectors for the ETA names in patab and for the preferred names) to
specify the axis label. You can specify each ETA individually by using
change.xvardef, and make the y-axis label anything you want.
For example, to make the ETA1 plots only:
change.xvardef(xpdb1, "ranpar")= "ETA1"
xplot <- ranpar.vs.cov(xpdb1, onlyfirst=TRUE, ylb= "IIV_CL")
Then you can make the ETA2 plots:
change.xvardef(xpdb1, "ranpar")= "ETA2"
xplot <- ranpar.vs.cov(xpdb1, onlyfirst=TRUE, ylb= "IIV_Vc")
and so on for the other ETAs. Let me know if that helps!
Thanks,
Laura
Laura Curd, B.S.
Senior Programmer, Clinical Pharmacology Associate
Nuventra Pharma Sciences, Inc.
[email protected]<mailto:[email protected]>
CONFIDENTIALITY NOTICE The information in this transmittal (including
attachments, if any) may be privileged and confidential and is intended only
for the recipient(s) listed above. Any review, use, disclosure, distribution or
copying of this transmittal, in any form, is prohibited except by or on behalf
of the intended recipient(s). If you have received this transmittal in error,
please notify me immediately by reply email and destroy all copies of the
transmittal.
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> On Behalf
Of Paul Hutson
Sent: Friday, February 15, 2019 6:34 PM
To: 'nmusers' <[email protected]<mailto:[email protected]>>
Subject: [NMusers] Changing axis label in ranram.vs.cov in XPOSE4
WARNING: This email originated from outside of the company. Do not click links
or open attachments unless you recognize the sender and are expecting the
message.
Is there an easy way to change the axis labels in the ranpar.vs.cov routine
(eg., from ETA1 to IIV_CL)
I've tried excluding PK parameters and leaving only ETAS in PATAB, and renaming
the ETA column headers to my desired name (eg.,IIV_CL in PATAB), but that
doesn't work.
I have also have tried
ranpar.vs.cov(xpdb1, cex=0.5,x.cex=1.5,y.cex=1.5,
page.numbers=F, ylb=c("IIV_CL", "IIV_Vc", "IIV_Q", "IIV_Vp"),
main=NULL, scales = list(x=list(cex=1.5),
y=list(cex=1.5)))
The ylb command plants all four labels on every plot.
Paul Hutson, PharmD, BCOP
Professor
UWisc School of Pharmacy
T: 608.263.2496
F: 608.265.5421