[R] Add group name in barchart

2014-12-02 Thread Silong Liao
Dear ALL, I have a dataset contains 2 variables: mate (mating groups) and ratio (ratio of number of mothers and fathers). And mate is an identifer which consists three components: year, flock (flk), and tag. I am using command "barchart" under package "lattice" to generate plots of ratio aga

[R] plot for "survreg" and "intcox" (rewritten)

2014-08-26 Thread Silong Liao
Dear R users, I'm trying to plot survival probability against time(in years) using "survreg" and "intcox". Please can you help me with this problem? (I have rewritten using plain text.) I tried to use "curve" function but have no clue. For survreg, >mod.reg1=survreg(s_new~type+sex+eye+preopiop+

[R] Plot survreg and intcox

2014-08-26 Thread Silong Liao
Dear R users, I'm trying to plot survival probability against time(in years) using "survreg" and "intcox". Please can you help me with this problem? My code shows below:>mod.reg1=survreg(s_new~type+sex+eye+preopiop+preopva,dist="weibull")>summary(mod.reg1) Call:survreg(formula = s_new ~ type + se