Re: [R] annotation help in ggplot2

2019-09-20 Thread Moshiur Rahman
Thanks everyone especially Rishi to solve this issue Regards, Moshichi On Fri, Sep 20, 2019 at 22:26 Jeff Newmiller wrote: > Using this list as a labor pool to procure code for generating > publication-quality plots is abuse. Please read the Posting Guide and the > documentation for the ggplot

Re: [R] [SPAM] Re: The "--slave" option

2019-09-20 Thread Richard O'Keefe
Ah, *now* we're getting somewhere. There is something that *can* be done that's genuinely helpful. >From the R(1) manual page: -q, --quiet Don't print startup message --silent Same as --quiet --slave Make R run as quietly as possible

Re: [R] Creating a simple function

2019-09-20 Thread Rui Barradas
Hello, Something like this? ctab <- function(data) { gmodels::CrossTable(as.matrix(data), prop.chisq = FALSE, prop.c = FALSE, prop.t = FALSE, format = "SPSS") } mtcars %>% select(cyl, gear) %>% ctab() Hope this helps, Rui Barradas Às 16:30 de 20/09/19, Zachary Lim escreveu: Hi, I'm t

Re: [R] Loop With Dates

2019-09-20 Thread Rui Barradas
Hello, Maybe I am not understanding but isn't this what you have asked in your previous question and my 2nd post (adapted) does? If not, where does it fail? Hope this helps, Rui Barradas Às 18:46 de 20/09/19, Phillip Heinrich escreveu: With the data snippet below I’m trying to increment the

Re: [R] Loop With Dates

2019-09-20 Thread Ana PGG
Hi Phillip, This can be done in several ways as most things in programming. Here is one posible solution: dates <- c("2018-03-29", "2018-03-29", "2018-03-29", "2018-03-30", "2018-03-30", "2018-03-30", "2018-03-31", "2018-03-31", "2018-03-31") dates <- as.data.frame(as.Dat

Re: [R] Creating a simple function

2019-09-20 Thread Duncan Murdoch
On 20/09/2019 11:30 a.m., Zachary Lim wrote: Hi, I'm trying to create a simple function that takes a dataframe as its only argument. I've been using gmodels::CrossTable, but it requires a lot of arguments, e.g.: #this runs fine CrossTable(data$col1, data$col2, prop.chisq = FALSE, prop.c = FAL

[R] Loop With Dates

2019-09-20 Thread Phillip Heinrich
With the data snippet below I’m trying to increment the “count” vector by one each time the date changes. Date count 1 2018-03-29 1 2 2018-03-29 1 3 2018-03-29 1 81 2018-03-30 1 82 2018-03-30 1 83 2018-03-30 1 165 2018-03-31 1 166 2018-03-31 1 1

[R] Creating a simple function

2019-09-20 Thread Zachary Lim
Hi, I'm trying to create a simple function that takes a dataframe as its only argument. I've been using gmodels::CrossTable, but it requires a lot of arguments, e.g.: #this runs fine CrossTable(data$col1, data$col2, prop.chisq = FALSE, prop.c = FALSE, prop.t = FALSE, format = "SPSS") Moreover

Re: [R] [SPAM] Re: The "--slave" option

2019-09-20 Thread Stephen Ellison
> Sure, it's a silly example, but it makes about as much sense as using > "slave" to mean "quiet". It doesn't. It's a set of options chosen for when R is called as a slave process from a controlling process, and in that it is a reasonable description of the circumstance. --quiet is a separate c

Re: [R] annotation help in ggplot2

2019-09-20 Thread Jeff Newmiller
Using this list as a labor pool to procure code for generating publication-quality plots is abuse. Please read the Posting Guide and the documentation for the ggplot package or go pay someone offlist for their services. On September 20, 2019 4:15:18 AM PDT, Moshiur Rahman wrote: >Thanks a lot

Re: [R] annotation help in ggplot2

2019-09-20 Thread ऋषि / rIsHi
Here is the solution inspired by this post https://stackoverflow.com/questions/18165863/multirow-axis-labels-with-nested-grouping-variables > data$Female <- factor(data$Female, levels = c("F1","F2","F3","F4","F5","F6","F7","F8","F9","F10")) > ggplot(data,aes(x=family,y=offs.surv.perct,fill=treat

Re: [R] annotation help in ggplot2

2019-09-20 Thread ऋषि / rIsHi
There are no attached data . On Fri, Sep 20, 2019 at 11:40 AM Moshiur Rahman wrote: > Dear ggplot2 experts, > > I'm struggling to make a plot having family id in x-axis and female id > below that family id where each 4 families have a single female id. > > I also need to add male id on top of ea

Re: [R] annotation help in ggplot2

2019-09-20 Thread Moshiur Rahman
Thanks a lot Rishi for your very cordial effort and great help. But still I need some help to improve it as the plot doesn't clearly depict which female belongs to which family and this can be detected by drawing a line from 1-4 for F1, 5-8 for F2 Another problem I can see that the position of

Re: [R] [SPAM] Re: The "--slave" option

2019-09-20 Thread Benjamin Lang
Hi Richard, Sure, it's a silly example, but it makes about as much sense as using "slave" to mean "quiet". Also, there is no "--master" option so it's not exactly the master/slave terminology here either. My only point is that I think it's very distasteful to give such a needlessly awful name to

Re: [R] [SPAM] Re: The "--slave" option

2019-09-20 Thread Richard O'Keefe
Not being a jerk is a good thing. Unthinking political correctness is not the same thing at all. The point has already been made that the relationship between a "master" process or cylinder and a "slave" one is intrinsically a dominance relation where the "master" tells the "slave" what to do. No

Re: [R] annotation help in ggplot2

2019-09-20 Thread Moshiur Rahman
Thanks Rishi, Please find attached the data herewith. On Fri, Sep 20, 2019 at 5:48 PM ঋষি ( ऋषि / rIsHi ) wrote: > There are no attached data . > > On Fri, Sep 20, 2019 at 11:40 AM Moshiur Rahman > wrote: > >> Dear ggplot2 experts, >> >> I'm struggling to make a plot having family id in x-ax

[R] annotation help in ggplot2

2019-09-20 Thread Moshiur Rahman
Dear ggplot2 experts, I'm struggling to make a plot having family id in x-axis and female id below that family id where each 4 families have a single female id. I also need to add male id on top of each bar which I can do before grid.arrange, but fail after doing it. So, any suggestions? Please

Re: [R] [SPAM] Re: The "--slave" option

2019-09-20 Thread Benjamin Lang
Hi Roy, Thank you, I’m sorry — I couldn’t resist fitting in a little dig there because that’s one of my main frustrations with actually using R, and to me it seemed to make some sort of sense because I was complaining about backwardness in a way (so a steep learning curve seemed to fit in). The