bar graphs

199 views
Skip to first unread message

Maarten de Groot

unread,
Feb 18, 2011, 5:40:46 AM2/18/11
to ggp...@googlegroups.com

Dear list,

I am trying to prepare a bar graph with error bars for males and
females that are nested in treatments. However, then I get a error
function that the dll file "digest" can not be found. It worked before
and I already reinstalled ggplot2 on my computer but I have still the
same problem. Did something changed in newer versions of ggplot2 and how
can solve this problem? The script and the error message can be found below.

>p <- ggplot(mydata, aes(fill=gender,y=average, x=treatment))
>limits <- aes(ymax = average + se, ymin=average - se)
>p + geom_bar(position="dodge", stat="identity")
>dodge <- position_dodge(width=0.9)

>p + geom_bar(position="dodge") +
> geom_errorbar(limits, position=dodge, width=0.25)


Error in library.dynam(lib, package, package.lib) :
DLL 'digest' not found: maybe not installed for this architecture?

thanks in advance for your help.

Kind regards,

Maarten

Brandon Hurr

unread,
Feb 18, 2011, 5:51:33 AM2/18/11
to Maarten de Groot, ggp...@googlegroups.com
Maarten, 

Sounds like an installation problem to me. Can you copy/paste your sessionInfo() in a reply? 

B


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

Dennis Murphy

unread,
Feb 18, 2011, 5:59:56 AM2/18/11
to Maarten de Groot, ggp...@googlegroups.com
Hi:

This is what I get when loading ggplot2 in a fresh session:

> library(ggplot2)
Loading required package: reshape
Loading required package: plyr

Attaching package: 'plyr'

The following object(s) are masked _by_ '.GlobalEnv':

    ozone


Attaching package: 'reshape'

The following object(s) are masked from 'package:plyr':

    round_any

Loading required package: grid
Loading required package: proto

Attaching package: 'ggplot2'

The following object(s) are masked _by_ '.GlobalEnv':

    mpg

> sessionInfo()
R version 2.12.1 Patched (2010-12-18 r53869)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252  
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                         
[5] LC_TIME=English_United States.1252   

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods 
[8] base    

other attached packages:
[1] ggplot2_0.8.9 proto_0.3-8   reshape_0.8.4 plyr_1.4 

Notice that it does not depend any longer on the digest package. I'm guessing you have a fairly out of date R version; perhaps you need to upgrade R before you upgrade ggplot2.

As for your proposed dynamite plot, I'd suggest losing the bars and replacing them with a center point on the error bar. This is especially true if you hope to detect interactions or patterns between your two factors.

http://biostat.mc.vanderbilt.edu/wiki/Main/DynamitePlots
http://emdbolker.wikidot.com/blog:dynamite

HTH,
Dennis

Maarten de Groot

unread,
Feb 18, 2011, 6:25:26 AM2/18/11
to Dennis Murphy, ggp...@googlegroups.com
Here my session info and what happens what
> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
States.1252 LC_MONETARY=English_United States.1252
LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] grid stats graphics grDevices datasets utils
methods base

other attached packages:
[1] ggplot2_0.8.9 proto_0.3-8 reshape_0.8.3 plyr_1.4

loaded via a namespace (and not attached):
[1] lattice_0.19-13 lme4_0.999375-37 Matrix_0.999375-46
nlme_3.1-97 stats4_2.12.1


> library(ggplot2)
Loading required package: reshape
Loading required package: plyr

Attaching package: 'reshape'

The following object(s) are masked from 'package:plyr':

round_any

Loading required package: grid
Loading required package: proto

I already upgraded R, but the problems are still there...

Maarten

On 2/18/2011 11:59 AM, Dennis Murphy wrote:
> d package: reshape
> Loading required pack

Brandon Hurr

unread,
Feb 18, 2011, 6:23:27 AM2/18/11
to Maarten de Groot, ggplot2, Dennis Murphy
Maarten, 

It looks ok to me, perhaps someone else can spot the problem. 

Dennis, 

I'm trying to make a bar plot with error bars, but with two scales for the Y axis.  You interested? :P

Brandon

On Fri, Feb 18, 2011 at 11:03, Maarten de Groot <Maarten...@nib.si> wrote:
Here it is...


> sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                           LC_TIME=English_United States.1252

attached base packages:
[1] grid      stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] ggplot2_0.8.9 proto_0.3-8   reshape_0.8.3 plyr_1.4

loaded via a namespace (and not attached):
[1] lattice_0.19-13    lme4_0.999375-37   Matrix_0.999375-46 nlme_3.1-97        stats4_2.12.1


Maarten

romunov

unread,
Feb 18, 2011, 6:25:25 AM2/18/11
to Maarten de Groot, Dennis Murphy, ggp...@googlegroups.com
Can you give us some dummy data to play with?


Cheers,
Roman


--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442

To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2



--
In God we trust, all others bring data.

Dennis Murphy

unread,
Feb 18, 2011, 7:32:24 AM2/18/11
to Maarten de Groot, ggp...@googlegroups.com
Hi:

The only difference I can see is that your version of the reshape package is one behind mine. Upgrade that, try again and see if that fixes the problem.

Dennis

Maarten de Groot

unread,
Feb 18, 2011, 7:51:25 AM2/18/11
to Dennis Murphy, ggp...@googlegroups.com
Hi,

Thanks to Roman It is all working again. At the end I put my libraries in another folder and re installed R and now it is working. Maybe there was a clash with another library...

Still thanks for all the suggestions.

Maarten
Reply all
Reply to author
Forward
0 new messages