Closed alapo closed 6 years ago
data(faces)
does not work for you?
if not, they are here https://github.com/achetverikov/APAstats/tree/master/apastats/data
Hi,
Thanks for such a quick reply. Once again I firmly believe it is something that I am doing wrong. But here's what I https://www.youtube.com/watch?v=wVG89hPlj24
Thanks for the detailed feedback. This example file was outdated, I've updated it.
hi @alapo, does it work for you now?
Thanks for the followup @achetverikov. It does work for the stats I want to run. But some of the examples are not running independently, there's a problem with plot.pointrange
. Here's a video showing it.
I think the solution might be calling ggplot directly. Here's what I did that gets close.
data <- summarySEwithin(faces, measurevar="logAT", withinvars="user_gender",
idvar="uid", na.rm=FALSE, conf.interval=.95)
p1 <- ggplot(data, aes(x=user_gender, y=logAT, group=1)) +
geom_line() +
geom_errorbar(width=.1, aes(ymin=logAT-ci, ymax=logAT+ci)) +
geom_point(shape=21, size=3, fill="white")
p1
But this does work with the geom_bar.
datac <- summarySEwithin(faces[correct==1, ], measurevar="logAT", withinvars=c("stim_gender","user_gender"), idvar="uid")
datac
p1 <- ggplot(datac, aes(x=user_gender, y=logAT, fill=stim_gender)) +
geom_bar(position=position_dodge(.9), colour="black", stat="identity") +
geom_errorbar(position=position_dodge(.9), width=.25, aes(ymin=logAT-ci, ymax=logAT+ci)) +
scale_fill_manual(values=c("#CCCCCC","#FFFFFF")) +
scale_y_continuous(breaks=seq(1:100)) +
theme_bw()
p1
I'm not really sure what creates the error. I've just tested it again - seem to work fine for me. A couple of thoughts: 1) did you install the updated version of apastats before trying the examples again? 2) did you try to run chunks one by one? Getting the exact line in that chunk that creates the error would be helpful.
And sure, you can do the same with summarySEwithin and ggplot, plot.pointrange is just a wraparound with some bells and whistles
Thanks for the followup @achetverikov. Thanks for taking a look. I did as you suggested. First I uninstalled apastats
and then I reinstalled it. Here's a video showing my whole process.
Please let me know if this is helpful in anyway.
Hi @alapo ! Sorry for a long delay, it seems that the error was brought by a conflict due to changes in the updated version of plyr/ggplot2. I started getting it when I reinstalled R. Should be fixed by the latest commit.
I'm closing this, as I think it was fixed in August. If you still have this problem, please let me know.
Quick and silly question but does anyone have access to the datasets that were used in the examples.md file. I'm trying to troubleshoot how some of the code works.
Thanks