[R] "too many arguments" error

Euphoria yeshapatel83 at gmail.com
Mon Mar 29 20:11:45 CEST 2010


Hi all!

I keep getting the "too many arguments" error when I insert the xaxt="n",
axis(1, at=seq (0, 183, 365, 549, 732, 915, 1095))  statement in the code
below for a survival plot.  

How can I go around this issue? Is there another way for me to change the
x-axis?

Also, I would prefer the y-axis to be represented by percentages (10, 20,
30..) rather than decimals (.10, .20, .30...).  I can change the labels, but
again I get the error, is there another way to solve the problem?

Thanks!


************** CODE *********************

plot (Rwhite.surv, main = "SNP Model", ylab = "Events", xlab = "Days to
Event", fun="event", col = c("red", "blue", "black"), lty = c(1, 2, 3),
xaxt="n", axis(1, at=seq (0, 183, 365, 549, 732, 915, 1095)) ) 

legend ("bottomright", inset=0.05, legend = c("CC", "TC", "TT"), col =
c("red", "blue", "black"), lty = c(1, 2, 3))
legend("bottomleft", "log-rank p=0.0671", bty ="n")

************** CODE *********************


-- 
View this message in context: http://n4.nabble.com/too-many-arguments-error-tp1695431p1695431.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list