Re: [R] Help with the Error Message in R "Error in 1:nchid : result would be too long a vector"

2020-09-30 Thread Rahul Chakraborty
Hello Rui, Thanks a lot for your response. But, I will surely say that the data I attached is in long format as it has 18 rows (3 alternatives*3 questions* 2 individuals). Had it been a wide format data it would have had 6 rows (3 questions* 2 individuals). But, anyway thanks. Best, Rahul On We

Re: [R] 2 KM curves on the same plot

2020-09-30 Thread Jim Lemon
Hi John, Brilliant solution and the best sort - when you finally solve your problem by yourself. Jim On Thu, Oct 1, 2020 at 2:52 AM array chip wrote: > > Hi Jim, > > I found out why clip() does not work with lines(survfit.object)! > > If you look at code of function survival:::lines.survfit, in

Re: [R] How to decrease size of points?

2020-09-30 Thread Medic
Yes, I just wanted to decrease the STARTING point size! Sorry for not being able to formulate Thank you very much, Rui and Avi! That's all for now. I need to comprehend information. Medic __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

Re: [R] How to decrease size of points?

2020-09-30 Thread Rui Barradas
Hello, Inline. Às 20:01 de 30/09/20, Medic escreveu: №1 Medic: The code works as I want, but the points (circles) on the plot are too big. How to decrease them? Where to insert (for instance) size = 0.8 for points (circles) on plot? p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) + xlab (

Re: [R] How to decrease size of points?

2020-09-30 Thread Medic
№1 Medic: The code works as I want, but the points (circles) on the plot are too big. How to decrease them? Where to insert (for instance) size = 0.8 for points (circles) on plot? p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) + xlab ("X") + ylab("Y") + geom_smooth() Stage is factor, x and

Re: [R] How to decrease size of points?

2020-09-30 Thread Rui Barradas
Hello, That's the problem of not having a reproducible example, you only gave us one value for size. Try nsize <- length(unique(df1$Stage)) before the plot and then p1 + scale_size_manual(values = rep(0.8, nsize)) Hope this helps, Rui Barradas Às 17:58 de 30/09/20, Medic escreveu: The

Re: [R] How to decrease size of points?

2020-09-30 Thread Medic
The code works as I want, but the points (circles) on the plot are too big. How to decrease them? Where to insert (for instance) size = 0.8 for points (circles) on plot? p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) + xlab ("X") + ylab("Y") + geom_smooth() Stage is factor, x and y - continuo

Re: [R] 2 KM curves on the same plot

2020-09-30 Thread array chip via R-help
Hi Jim, I found out why clip() does not work with lines(survfit.object)! If you look at code of function survival:::lines.survfit, in th middle of the code:     do.clip <- getOption("plot.survfit")     if (!is.null(xx <- do.clip$plotclip))          clip(xx[1], xx[2], xx[3], xx[4]) This will re

Re: [R] 2 KM curves on the same plot

2020-09-30 Thread array chip via R-help
Thank you Jim for helping! Yes, I will try Mark's method. John On Wednesday, September 30, 2020, 01:47:55 AM PDT, Jim Lemon wrote: Hi John, Hmmm, this works: plot(1:10) xylim<-par("usr") clip(5,xylim[2],xylim[3],xylim[4]) lines(10:1) so I suspect that there is a "lines" method that resets

[R] [R-pkgs] New version of package brant on CRAN

2020-09-30 Thread kontakt
Dear R community The new version of the package brant (0.3-0) is now available on CRAN. It contains the function brant() to test the parallel regression assumption for ordinal logistic regression models. I this version I fixed a bug which led in some situations to an error message and I add

Re: [R] How to decrease size of points?

2020-09-30 Thread Rui Barradas
Hello, Your example is not reproducible but here it goes. Data: df1 <- iris[c(1, 2, 5)] Use scale_size_manual. 1. If Stage is a factor or character df1$Stage <- "a" p <- ggplot(df1, aes(Sepal.Length, Sepal.Width, color = Species)) p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) +

[R] How to decrease size of points?

2020-09-30 Thread Medic
The code works as I want, but the points are too big. How to decrease them? (Where to insert: size = 0.8?) p1 <- p + geom_point(aes(size = Stage), alpha = 1/3) + xlab ("X") + ylab("Y") + geom_smooth() __ R-help@r-project.org mailing list -- To UNSUBSCRIB

Re: [R] 2 KM curves on the same plot

2020-09-30 Thread Jim Lemon
Hi John, Hmmm, this works: plot(1:10) xylim<-par("usr") clip(5,xylim[2],xylim[3],xylim[4]) lines(10:1) so I suspect that there is a "lines" method that resets the clipping region out of sight. Fortunately Mark Schwartz provided a way to get your plot so I will give the wall against which I have b