[R] Q about package Icens: change the color of the shading in plot function

2010-08-30 Thread Mendolia, Franco
Hello!

I want to use the Icens package for analyzing interval-censored data. This code 
from the manual gives me what I want.

library(Icens)
data(cosmesis)
csub1 - subset(cosmesis, subset=Trt==0, select=c(L,R))
e1 - VEM(csub1)
plot(e1)

However, I would like to change the color of the shading from green to 
something less green, say gray. Any ideas how I could do that? I looked at par, 
but I wasn't able to find what I need.

Thanks,
Franco
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Q about package Icens: change the color of the shading in plot function

2010-08-30 Thread David Winsemius


On Aug 30, 2010, at 10:58 PM, Mendolia, Franco wrote:


Hello!

I want to use the Icens package for analyzing interval-censored  
data. This code from the manual gives me what I want.


library(Icens)
data(cosmesis)
csub1 - subset(cosmesis, subset=Trt==0, select=c(L,R))
e1 - VEM(csub1)
plot(e1)

However, I would like to change the color of the shading from green  
to something less green, say gray. Any ideas how I could do that? I  
looked at par, but I wasn't able to find what I need.


methods(plot)

getAnywhere(plot.isurv)

(The polygon calls are hard coded and do not accept col= arguments.)

--
David.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Q about package Icens: change the color of the shading in plot function

2010-08-30 Thread David Winsemius


On Aug 30, 2010, at 11:25 PM, David Winsemius wrote:



On Aug 30, 2010, at 10:58 PM, Mendolia, Franco wrote:


Hello!

I want to use the Icens package for analyzing interval-censored  
data. This code from the manual gives me what I want.


library(Icens)
data(cosmesis)
csub1 - subset(cosmesis, subset=Trt==0, select=c(L,R))
e1 - VEM(csub1)
plot(e1)

However, I would like to change the color of the shading from green  
to something less green, say gray. Any ideas how I could do that? I  
looked at par, but I wasn't able to find what I need.


methods(plot)

getAnywhere(plot.isurv)

(The polygon calls are hard coded and do not accept col= arguments.)


Hack it,...add a col argument:

plotisurv - function (x, type = eq, surv = FALSE, bounds = FALSE,  
shade = 3,

 density = 30, angle = 45, lty = 1, new = TRUE, xlab = Time,
 ylab = Probability, main = GMLE, ltybnds = 2,  
col=green, ...)


And then in the body  change:

   border = FALSE, col = green)

to:

   border = FALSE, col = col)



--
David.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Q about package Icens: change the color of the shading in plot function

2010-08-30 Thread Mendolia, Franco
___
From: David Winsemius [dwinsem...@comcast.net]
Sent: Monday, August 30, 2010 10:41 PM
To: David Winsemius
Cc: Mendolia, Franco; r-help@r-project.org
Subject: Re: [R] Q about package Icens: change the color of the shading in plot 
function

On Aug 30, 2010, at 11:25 PM, David Winsemius wrote:


 On Aug 30, 2010, at 10:58 PM, Mendolia, Franco wrote:

 Hello!

 I want to use the Icens package for analyzing interval-censored
 data. This code from the manual gives me what I want.

 library(Icens)
 data(cosmesis)
 csub1 - subset(cosmesis, subset=Trt==0, select=c(L,R))
 e1 - VEM(csub1)
 plot(e1)

 However, I would like to change the color of the shading from green
 to something less green, say gray. Any ideas how I could do that? I
 looked at par, but I wasn't able to find what I need.

 methods(plot)

 getAnywhere(plot.isurv)

 (The polygon calls are hard coded and do not accept col= arguments.)

Hack it,...add a col argument:

plotisurv - function (x, type = eq, surv = FALSE, bounds = FALSE,
shade = 3,
  density = 30, angle = 45, lty = 1, new = TRUE, xlab = Time,
  ylab = Probability, main = GMLE, ltybnds = 2,
col=green, ...)

And then in the body  change:

border = FALSE, col = green)

to:

border = FALSE, col = col)


 --
 David.



Thanks, wasn't aware of the getAnywhere function.

Franco
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.