Re: [R] ggplot2 error bars and convex hulls

2020-04-21 Thread Ivan Calandra
Thanks Rui for these 2 possibilities; I'll have a look. Any one with pointers for the error bars issue? Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research Centre and Museum for Human Behavioural Evolution Schloss Monrepos 56567

Re: [R] ggplot2 error bars and convex hulls

2020-04-21 Thread Rui Barradas
Hello, As for convex hulls, there is an example of how to construct a stat_hull in vignette("extending-ggplot2", package = "ggplot2") There is also a geom_hull in a GitHub package: devtools::install_github("cmartin/ggConvexHull") Hope this helps, Rui Barradas Às 17:02 de 21/04/20, Ivan Cal

[R] ggplot2 error bars and convex hulls

2020-04-21 Thread Ivan Calandra
Dear useRs, I would like to have horizontal and vertical error bars extending from the means on two continuous variables. This would be the "manual" way of doing it, computing the mean and sd (or whatever stats) beforehand and then calling geom_errorbar() and geom_errorbarh() with appropriate coo

[R] ggplot2 error

2017-11-09 Thread Thomas Subia via R-help
Hello all, Zeki(?) reported: > ggplot(data = mtcars, aes(x= wt, y= mpg)) + geom_line() > Error: Found object is not a stat. Using R v3.4.62 and R studio, I'm unable to reproduce this error. All the best, Thomas Subia [[alternative HTML version deleted]]

Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
.size) >>4: In get(Info[i, 1], envir = env) : >>  Reached total allocation of 1535Mb: see help(memory.size) >>Error: package or namespace load failed for ‘ggplot2’ >>> memory.size(4000) >>[1] 4000 >>> library(ggplot2) >>Error : cannot allocate vect

Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
ed for ‘ggplot2’ >Just curious, why did you think that solution would work? > From: Jeff Newmiller >To: Jam One ; "r-help@R-project.org" > > Sent: Wednesday, March 25, 2015 4:44 AM > Subject: Re: [R] ggplot2 Error : cannot allocate vector of siz

Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jam One
size 1.9 Gb Error: package or namespace load failed for ‘ggplot2’ Just curious, why did you think that solution would work? From: Jeff Newmiller To: Jam One ; "r-help@R-project.org" Sent: Wednesday, March 25, 2015 4:44 AM Subject: Re: [R] ggplot2 Error : cannot allocate

Re: [R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jeff Newmiller
Upgrade your copy of R to the latest. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: O

[R] ggplot2 Error : cannot allocate vector of size 1.9 Gb

2015-03-24 Thread Jam One
Dear All, I have a showstopper here. I cannot run a library(UsingR) because I cannot load the package 'ggplot2'. > sessionInfo() R version 3.1.0 (2014-04-10) Platform: i386-w64-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_

Re: [R] ggplot2 error: "Error in as.environment(where) : 'where' is missing"

2013-06-11 Thread David Winsemius
On Jun 11, 2013, at 10:44 AM, Brian Smith wrote: > Hmm...I think it used to work before, but it gives an error now. Here is > some sample code: > > = > library(ggplot2) > Sample <- rep(c('A','B'),rep(10,2)) > Vals <- sample(1:1000,20) > dataf <- as.data.frame(cbind(Sample,Vals)) It'

Re: [R] ggplot2 error: "Error in as.environment(where) : 'where' is missing"

2013-06-11 Thread Brian Smith
s) > str(dataf) > #'data.frame':20 obs. of 2 variables: > # $ Sample: Factor w/ 2 levels "A","B": 1 1 1 1 1 1 1 1 1 1 ... > # $ Vals : int 96 712 765 121 154 78 821 258 812 51 ... > > ggplot(dataf,aes(x=Vals,colour=Sample))+geom_density() #no error

Re: [R] ggplot2 error: "Error in as.environment(where) : 'where' is missing"

2013-06-11 Thread arun
1 1 1 1 1 1 1 1 1 1 ... # $ Vals  : int  96 712 765 121 154 78 821 258 812 51 ... ggplot(dataf,aes(x=Vals,colour=Sample))+geom_density() #no error A.K. - Original Message - From: Brian Smith To: r-help Help Cc: Sent: Tuesday, June 11, 2013 1:44 PM Subject: [R] ggplot2 error: "E

Re: [R] ggplot2 error: "Error in as.environment(where) : 'where' is missing"

2013-06-11 Thread Bert Gunter
I just wanted to point out that the construction: dataf <- as.data.frame(cbind(Sample,Vals)) is **EVIL** . Why? cbind() constructs a matrix out of the separate vectors, and must coerce columns of different types, as is the case here, to do so (a matrix must be of one data type). Consequently >

[R] ggplot2 error: "Error in as.environment(where) : 'where' is missing"

2013-06-11 Thread Brian Smith
Hmm...I think it used to work before, but it gives an error now. Here is some sample code: = library(ggplot2) Sample <- rep(c('A','B'),rep(10,2)) Vals <- sample(1:1000,20) dataf <- as.data.frame(cbind(Sample,Vals)) myplot <- ggplot(dataf,aes(x=Vals,colour=Sample)) + geom_density() mypl

Re: [R] ggplot2 error: arguments imply differing number of rows

2012-04-05 Thread ux.seo
As you got the error message, to use ggplot function, you had better make a data.frame with your data "d". for example, d[ n x p], n : observations, p : variables n = dim(d) dd = data.frame(x=d[,2:n[2]], y=d[,1]) then, you may get the better result after apply "dd" to the ggplot function. > p1 +

[R] ggplot2 error: arguments imply differing number of rows

2012-04-05 Thread Debbie Smith
This example is from "The R Book" by Michael J. Crawley. d=read.table( "http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/diminish.txt"; ,header=TRUE) p=qplot(xv,yv,data=d); p m1=lm(yv~xv,data=d) p1=p + geom_abline(intercept=coefficients(m1)[1], slope=coefficients(m1)[2] ); p1 m2=lm(yv~xv + I