GithubHelp home page GithubHelp logo

ggrain's Introduction

Indigo Minimalist Jekyll Template - Demo · Build Status

This is a simple and minimalist template for Jekyll for those who likes to eat noodles.


What has inside | Setup | Settings | How to

What has inside

Setup

  1. ⭐ to the project. 🤘
  2. Fork the project Indigo
  3. Edit _config.yml with your data (check settings section)
  4. Write some posts :bowtie:

If you want to test locally on your machine, do the following steps also:

  1. Install Jekyll, NodeJS and Bundler.
  2. Clone the forked repo on your machine
  3. Enter the cloned folder via terminal and run bundle install
  4. Then run bundle exec jekyll serve --config _config.yml,_config-dev.yml
  5. Open it in your browser: http://localhost:4000
  6. Do you want to use the jekyll-admin plugin to edit your posts? Go to the admin panel: http://localhost:4000/admin. The admin panel will not work on GitHub Pages, only locally.

Settings

You must fill some informations on _config.yml to customize your site.

name: John Doe
bio: 'A Man who travels the world eating noodles'
picture: 'assets/images/profile.jpg'
...

and lot of other options, like width, projects, pages, read-time, tags, related posts, animations, multiple-authors, etc.

How To?

Check the FAQ if you have any doubt or problem.


License

MIT License © Sérgio Kopplin

ggrain's People

Contributors

jorvlan avatar njudd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ggrain's Issues

geom_rain, flanking & facet_wrap

Hello! I have a similar problem as mentioned here #6 (comment)
How is it possible to change the position of either the two middle violins (using rain.side = "f1x1" ) or the two middle boxplots (using rain.side = "f2x2")?

fake_d <- tibble(ID = rep(1:30,each=2), 
                 Group = factor(rep(c("young","old"),each=2, times=15)),
                 Time =  factor(rep(c("T1", "T2"),times=30)),
                 Response = rnorm(60))

fake_d %>% 
  ggplot(aes(x=Time,y=Response, fill=Time))+
  geom_rain(id.long.var = "ID", rain.side='f1x1',
            violin.args = list(color = NA,alpha = .7),
            alpha = .7) +
  facet_wrap(~Group)

image

fake_d %>% 
  ggplot(aes(x=Time,y=Response, fill=Time))+
  geom_rain(id.long.var = "ID", rain.side='f2x2',
            violin.args = list(color = NA,alpha = .7),
            alpha = .7) +
  facet_wrap(~Group)

image

Using 'f' option without explicit arg.pos arguments causes error

Hi there! I've been enjoying trying out your package to display some data for an article I'm writing. I have run into one slight issue though: when plotting some paired data points with the rain.side = 'f' condition will always trigger the warning about supplying explicit position instructions to the violin and boxplot components and default to 2 group 2 timepoint positions. This is easily fixed (after some trial and error about appropriate nudge sizes), and perhaps intended behaviour - However, after studying your vignette, it seems like at least at some point in development, it was possible to call the rain.side = 'f' argument without providing explicit positions for very simple designs (e.g. a 1 group, 2 timepoint design). Could you confirm whether this is intended behaviour or a bug?

As for the source of this 'bug', it seems like the if/else statement in lines 136-138 of geom_rain.R will always trigger when rain.side is set to 'f', because the default argumentsto violin.args.pos includes a side argument (setting it to 'r'). Again, this might be intended, to make the user explicitly state the positioning, but it seemed at odds with the vignette behaviour.

Problem conecting lines in rain.side = 'f2x2'

Hi! I wanted to report an error when trying to connect the dots of different conditions when rain.side = 'f2x2'. I followed your vignette explaining how to do it, but I don't know why it looks like the lines connect the points within each category on the x-axis.

Here is a reproducible example:

library(ggrain)

# Creating fake data:
fake_d <- expand.grid(list(ID = seq(50), Cond_1 = c("A", "B"), Cond_2 =  c("C", "D")))
fake_d$RESP <- rbinom(nrow(fake_d), size = 50, prob = .5)/50

# Raincloud Plot:
  ggplot(fake_d, aes(Cond_1, RESP, fill = Cond_2, color = Cond_2)) +
  geom_rain(alpha = .5, rain.side = 'f2x2', id.long.var = "ID") + 
  theme_classic() +
  scale_fill_manual(values=c("dodgerblue", "darkorange")) +
  scale_color_manual(values=c("dodgerblue", "darkorange")) +
  guides(color = "none", fill = "none")

And here is the output of the above code:

rain_ex

I don't know exactly where the problem is, since the data structure should be correct.

Thanks you in advance!

Possible to display mean instead of median?

Hi!

Thank you for creating this package, which enables an r noob like myself to create beautiful raincloud plots!

I'm using the ggrain package to make raincloud plots to display change across repeated measures, and we are planning to use the plots for an upcoming paper. After comparing the output plots to our data and descriptive stats, it seems to me that the raincloud plots display median values instead of mean. Is this correct? Our statistical approach compares means - as such, is there a way to display the mean values in the plots instead of the median?
Best, Silje

Space between boxplots not overlapping

Hello,

Thnak you for your remarkable package very useful 👍.

I would like to reproduce a graph from the package's vignette using the following code:

ggplot(iris, aes(1, Sepal.Width, fill = Species, color = Species)) +
    geom_rain(alpha = .5, rain.side = 'l',
              boxplot.args = list(color = "black", outlier.shape = NA),
              boxplot.args.pos = list(
                  position = ggpp::position_dodgenudge(x = .1), width = 0.1
              )) +
    theme_classic() +
    scale_fill_brewer(palette = 'Dark2') +
    scale_color_brewer(palette = 'Dark2') +
    guides(fill = 'none', color = 'none')

It produces the following plot:

Rplot

Unfortunately, the result differs significantly from what is shown in the vignette. Specifically, the boxplots appear to be widely spaced, unlike the compact arrangement depicted in the vignette. I am unsure of the parameter adjustments needed to address this discrepancy.

For your information, I used to work with R version 4.1.2, and the generated graphics were accurate.
However, after recently updating to the latest R version (4.3.2), I've observed that certain types of graphs are no longer reproducible.

Thank you for any suggestions or improvements.
Benjamin

Error generating geom_rain: 'gpar' element 'lwd' must not be length 0

I am trying to generate a raincloud plot, but I am encountering the following error:

Error in check.length(gparname) :
'gpar' element 'lwd' must not be length 0

I tried first with my own data, but this error happens even if I run the following:

ggplot(iris, aes(Species, Sepal.Width, fill = Species)) +
geom_rain(alpha = .5)

I had first tried to use the ggrain package and was being told my version of vctrs was outdated (0.4.1), so I updated to 0.5.2.

I appreciate any help.

Description includes outdated reference

Thank you for creating this package! I'm sure it will be helpful for many people.

The description currently reads:

The 'gg_rain()' function adds different geoms together using 'ggplot2' to create raincloud plots.

It doesn't seem to refer to a (current) function from ggrain.

Connecting lines across time

CRAN did not want seed arguments in the function. This means to recreate the figures with lines in the vignette you must specify the same jitter seed in point & line (example below).

ggplot(iris.long[iris.long$time %in% c('t1', 't2'),], aes(time, Sepal.Width, fill = Species)) + geom_rain(alpha = .5, rain.side = 'f2x2', id.long.var = "id", point.args.pos = list(position = position_jitter(width = 0.04, height = 0, seed = 42)), line.args.pos = list(position = position_jitter(width = 0.04, height = 0, seed = 42))) + theme_classic() + scale_fill_manual(values=c("dodgerblue", "darkorange")) + guides(fill = 'none', color = 'none')

Will attempt to find a workaround for version 0.0.3

Issue with Bandwidth Control in geom_rain

In the context of plotting density plots, I noticed that the geom_half_violin function was used. To adjust the bandwidth, I used the bw argument within this function. Here’s the sample code snippet:

library(ggrain)
library(tidyverse)
ggplot(iris, aes(1, Sepal.Width)) +
  geom_rain(bw = 0.1) +
  theme_classic() +
  theme(axis.title.x = element_blank(), 
        axis.text.x = element_blank(), axis.ticks.x = element_blank())

While I successfully modified the bandwidth, a warning message appeared:

Warning messages:
1: In (function (mapping = NULL, data = NULL, stat = "identity", position = "identity",  :
  Ignoring unknown parameters: `bw`
2: In (function (mapping = NULL, data = NULL, stat = "boxplot", position = "dodge2",  :
  Ignoring unknown parameters: `bw`

Would you kindly consider adding the bw argument directly to the geom_rain function to prevent this warning? Your attention to this matter would be greatly appreciated. Thank you! 🙏

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.