I am using ggplot to plot the geneontology results:
I use the following code:
p <- ggplot(data=mydata_2, aes(x=Term, y=logPValue), size =1) + geom_bar(stat='identity')
It worked. But When I want to reorder the columns from high to low using y value using:
p <- ggplot(data=mydata_2, aes(x=(Term, -logPValue), y=logPValue), size =0.01) + geom_bar(stat='identity')
it showed an error:
error: unexpected ',' in "p <- ggplot(data=mydata_2, aes(x=(Term,"
Why this happened. I searched a while. A lot of people is using this method.