Re: [R] GGPlot plot

2018-07-18 Thread Francesca
Thanks for the answer. Il gio 19 lug 2018, 01:04 Jim Lemon ha scritto: > Hi Francesca, > This looks like a fairly simple task. Try this: > > fpdf<-read.table(text="PASP SUBJC > 0 0 > 4 1 > 0 0 > 8 0 > 4 0 > 0 1 > 0 1", > he

Re: [R] GGPlot plot

2018-07-18 Thread Jim Lemon
Hi again, Sorry, forgot this line: fpdf$PASPpos<-fpdf$PASP > 0 just after reading in the data frame. Jim On Thu, Jul 19, 2018 at 9:04 AM, Jim Lemon wrote: > Hi Francesca, > This looks like a fairly simple task. Try this: > > fpdf<-read.table(text="PASP SUBJC > 0 0 > 4 1

Re: [R] GGPlot plot

2018-07-18 Thread Jim Lemon
Hi Francesca, This looks like a fairly simple task. Try this: fpdf<-read.table(text="PASP SUBJC 0 0 4 1 0 0 8 0 4 0 0 1 0 1", header=TRUE) # get the number of positive PASP results by group ppos<-by(fpdf$SUBJC,fpdf$PASPpos,su

Re: [R] GGPlot plot

2018-07-18 Thread Jeff Newmiller
On Wed, 18 Jul 2018, Francesca wrote: Dear R help, I am new to ggplot so I apologize if my question is a bit obvious. Or perhaps not, as this is the "R-help" mailing list, not the "Ggplot-help" mailing list. Fortunately for you, what you really need to learn is R, and then ggplot will be

Re: [R] GGPlot plot

2018-07-18 Thread Rui Barradas
Hello, Your request is not entirely clear. What kind of a graph do you want? A bar graph with a bar of the fraction of positive levels of PASP per each level of SUBJC? You need to be more specific. Also, please post data like this: # post the output of this command in your next mail dput(hea

[R] GGPlot plot

2018-07-18 Thread Francesca
Dear R help, I am new to ggplot so I apologize if my question is a bit obvious. I would like to create a plot where a compare the fraction of the values of a variable called PASP out of the number of subjects, for two groups of subject codified with a dummy variable called SUBJC. The variable

[R] ggplot, Plot title at the bottom of plot

2015-05-04 Thread Sheila the angel
Hello All, I am looking for the answer to simple question: In ggplot, how to put plot title at the bottom of plot ? This code : qplot(rnorm(100)) + ggtitle("My Title") puts the title at middle and top of plot while I want it to be at middle and *Bottom* of the plot. Using +theme(plot.title =

[R] ggplot - plot with only legend?

2008-04-10 Thread Pedro de Barros
Dear R'ers, I am trying to build a composite plot (with several plots in one figure). I have tried, but I cannot use facetting, as I need to customize each plot using grid. Since all the plots are the same (with different data, but same layout and categories), I would like to have only one lege