Dear all,
I want to run ggplot2 in one of my file.
I do this:
mergefile<- read.csv("path of my file/name.csv")
library(ggplot2) to import my library
ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
fill=Prostate )) + geom_bar(colour="black", stat="identity",
position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
lines")+ylab("Percentage of
overlapping")+ggtitle("Comparison between
cell lines against the prostate cancer lines from DNase
esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
vjust = 0.5))
i used this command three times, but now is not working, the error reported
is:
Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines),
y=Percentage, vjust=-0.5, fill=Prostate )) + geom_bar(colour="black",
stat="identity", position=position_dodge(),
size=.3)+ylim(0%,100%)"
Can some one help me? any suggestions?
Thanks a lot!
Best regards, Benedetta
[[alternative HTML version deleted]]
It is difficult to read your code because the HTML format messes it up, but I
think your ggplot function call is missing a parenthesis between fill=Prostate
and the + sign.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On March 25, 2015 7:02:50 AM PDT, "BenedettaB24 ."
<benedetta.brunetti at gmail.com> wrote:>Dear all,
>
>I want to run ggplot2 in one of my file.
>I do this:
>
>mergefile<- read.csv("path of my file/name.csv")
>
>library(ggplot2) to import my library
>
>ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
>fill=Prostate )) + geom_bar(colour="black",
stat="identity",
>position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
>lines")+ylab("Percentage of
overlapping")+ggtitle("Comparison between
>cell lines against the prostate cancer lines from DNase
>esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
>vjust = 0.5))
>
>i used this command three times, but now is not working, the error
>reported
>is:
>
>Error: unexpected ')' in "ggplot(percent,
aes(x=factor(Cell.lines),
>y=Percentage, vjust=-0.5, fill=Prostate )) +
geom_bar(colour="black",
>stat="identity", position=position_dodge(),
size=.3)+ylim(0%,100%)"
>
>
>Can some one help me? any suggestions?
>
>Thanks a lot!
>
>Best regards, Benedetta
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
You need to define limits as defined in the data. ylim(0, 1) instead of ylim(0%, 100%) ylim(0%, 100%) is incorrect R syntax. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070 Anderlecht Belgium To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher The plural of anecdote is not data. ~ Roger Brinner The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey 2015-03-25 15:02 GMT+01:00 BenedettaB24 . <benedetta.brunetti at gmail.com>:> Dear all, > > I want to run ggplot2 in one of my file. > I do this: > > mergefile<- read.csv("path of my file/name.csv") > > library(ggplot2) to import my library > > ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5, > fill=Prostate )) + geom_bar(colour="black", stat="identity", > position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell > lines")+ylab("Percentage of overlapping")+ggtitle("Comparison between > cell lines against the prostate cancer lines from DNase > esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90, > vjust = 0.5)) > > i used this command three times, but now is not working, the error reported > is: > > Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines), > y=Percentage, vjust=-0.5, fill=Prostate )) + geom_bar(colour="black", > stat="identity", position=position_dodge(), size=.3)+ylim(0%,100%)" > > > Can some one help me? any suggestions? > > Thanks a lot! > > Best regards, Benedetta > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
> i used this command three times,clearly not exactly this, if it's stopped working ...> but now is not working, the error reported is: > Error: unexpected ')' in "ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, > vjust=-0.5, fill=Prostate )) + geom_bar(colour="black", stat="identity", > position=position_dodge(), size=.3)+ylim(0%,100%)" > > > Can some one help me? any suggestions?You have an unexpected right parenthesis at 100%). Look for something wrong there or before that - often an unmatched parenthesis, string terminator or operator terminator - would be sensible. As a clue, you could think about what '%' means in R. It does NOT mean 'percent' S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
ylim(0%,100%) is not valild. It should be ylim(0,100).
Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
Sent by: "R-help" <r-help-bounces at r-project.org>
03/25/2015 11:14 AM
To
"BenedettaB24 ." <benedetta.brunetti at gmail.com>, "r-help
at r-project.org"
<r-help at r-project.org>,
cc
Subject
Re: [R] Graph with ggplot2.
It is difficult to read your code because the HTML format messes it up,
but I think your ggplot function call is missing a parenthesis between
fill=Prostate and the + sign.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go
Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
On March 25, 2015 7:02:50 AM PDT, "BenedettaB24 ."
<benedetta.brunetti at gmail.com> wrote:>Dear all,
>
>I want to run ggplot2 in one of my file.
>I do this:
>
>mergefile<- read.csv("path of my file/name.csv")
>
>library(ggplot2) to import my library
>
>ggplot(percent, aes(x=factor(Cell.lines), y=Percentage, vjust=-0.5,
>fill=Prostate )) + geom_bar(colour="black",
stat="identity",
>position=position_dodge(), size=.3)+ylim(0%,100%)+xlab("Prostate cell
>lines")+ylab("Percentage of
overlapping")+ggtitle("Comparison between
>cell lines against the prostate cancer lines from DNase
>esperiment")+theme_bw()+theme(axis.text.x=element_text(angle = 90,
>vjust = 0.5))
>
>i used this command three times, but now is not working, the error
>reported
>is:
>
>Error: unexpected ')' in "ggplot(percent,
aes(x=factor(Cell.lines),
>y=Percentage, vjust=-0.5, fill=Prostate )) +
geom_bar(colour="black",
>stat="identity", position=position_dodge(),
size=.3)+ylim(0%,100%)"
>
>
>Can some one help me? any suggestions?
>
>Thanks a lot!
>
>Best regards, Benedetta
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]