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
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
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
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]]
.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
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
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
Upgrade your copy of R to the latest.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: O
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_
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'
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
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
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
>
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
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 +
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
16 matches
Mail list logo