Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.5%) to scientific vocabulary
Keywords from Contributors
Repository
Horizontal ggplot2 components
Statistics
- Stars: 203
- Watchers: 9
- Forks: 19
- Open Issues: 6
- Releases: 8
Metadata Files
README.md
ggstance
Important: This package has been superseded by ggplot2 3.3.0, which now has full native support for horizontality. The ggstance package will continue to be maintained for some time, but please consider switching to ggplot2.
Installation
Get the development version from Github with:
```R
install.packages("devtools")
devtools::install_github("lionel-/ggstance") ```
Horizontal geoms
While coord_flip() can only flip a plot as a whole, ggstance
provides flipped versions of Geoms, Stats and Positions. This makes it
easier to build horizontal layer or use vertical positioning
(e.g. vertical dodging). Also, horizontal Geoms draw horizontal
legend keys to keep the appearance of your plots consistent.
Horizontal Geoms:
geom_barh()geom_colh()geom_histogramh()geom_linerangeh()geom_pointrangeh()geom_errorbarh()geom_crossbarh()geom_boxploth()geom_violinh()
Horizontal Stats:
stat_binh()stat_boxploth()stat_counth()stat_xdensity()stat_summaryh()
Vertical Positions:
position_dodgev()position_dodge2v()position_nudgev()position_fillv()position_stackv()position_jitterdodgev()
Examples
Basics
To create a horizontal layer in ggplot2 with coord_flip(), you have
to supply aesthetics as if they were to be drawn vertically:
```r library("ggplot2")
Vertical
ggplot(mpg, aes(class, hwy, fill = factor(cyl))) + geom_boxplot()
Horizontal with coord_flip()
ggplot(mpg, aes(class, hwy, fill = factor(cyl))) + geomboxplot() + coordflip() ```
In ggstance, you supply aesthetics in their natural order:
```r library("ggstance")
Horizontal with ggstance
ggplot(mpg, aes(hwy, class, fill = factor(cyl))) + geom_boxploth() ```

Facetting with Free Scales
Some plots are hard to produce with coord_flip(). One case is
facetting with free scales. Here is an example from @smouksassi:
```r library("ggplot2") library("ggstance")
df <- data.frame( Group = factor(rep(1:3, each = 4), labels = c("Drug A", "Drug B", "Control")), Subject = factor(rep(1:6, each = 2), labels = c("A", "B", "C", "D", "E", "F")), Result = rnorm(12) )
vertical <- ggplot(df, aes(Subject, Result))+ geomboxplot(aes(fill = Group))+ facetgrid(. ~ Group, scales = "free_x") vertical ```
How do we flip this plot? With coord_flip(), the free scales are not
flipped correctly:
r
vertical + coord_flip()
vertical + facet_grid(Group ~ ., scales = "free_x") + coord_flip()
On the other hand a ggstance horizontal layer will work properly:
r
horizontal <- ggplot(df, aes(Result, Subject))+
geom_boxploth(aes(fill = Group))+
facet_grid(Group ~ ., scales = "free_y")
horizontal

Using vertical positions
In this example we use vertical dodging to align measurements within subgroups.
```{r} data <- expand.grid( Group = c("A", "B"), Subgroup = c("a", "b", "c"), y = 1:10 ) data$y <- sample(1:4, replace = TRUE, size = nrow(data))
ggplot(data, aes(y, Group, colour = Subgroup)) + statsum(position = positiondodgev(height = 0.5)) ```

Owner
- Name: Lionel Henry
- Login: lionel-
- Kind: user
- Company: @posit-pbc
- Repositories: 175
- Profile: https://github.com/lionel-
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Lionel Henry | l****y@g****m | 135 |
| rjbgoudie | r****e | 2 |
| Michael Chirico | m****4@g****m | 2 |
| Thomas Lin Pedersen | t****5@g****m | 1 |
| Praer (Suthira Owlarn) | s****n@g****m | 1 |
| Joseph M. Burling | j****g@g****m | 1 |
| Frie | f****e@p****e | 1 |
| Frederik Tiedemann | f****n@g****m | 1 |
| Dewey Dunnington | d****y@f****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 32
- Total pull requests: 15
- Average time to close issues: 4 months
- Average time to close pull requests: 3 months
- Total issue authors: 24
- Total pull request authors: 10
- Average comments per issue: 1.69
- Average comments per pull request: 0.8
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- rpruim (3)
- lionel- (2)
- GuangchuangYu (2)
- Generalized (2)
- eipi10 (2)
- hadley (2)
- bbolker (2)
- seth-1 (1)
- Ax3man (1)
- Enchufa2 (1)
- lucyannewinder (1)
- huftis (1)
- smouksassi (1)
- krlmlr (1)
- paleolimbot (1)
Pull Request Authors
- lionel- (4)
- thomasp85 (2)
- teunbrand (2)
- MichaelChirico (2)
- paleolimbot (1)
- iamamutt (1)
- friep (1)
- sowla (1)
- erocoar (1)
- rjbgoudie (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- cran 6,832 last-month
- Total docker downloads: 54,621
-
Total dependent packages: 19
(may contain duplicates) -
Total dependent repositories: 36
(may contain duplicates) - Total versions: 16
- Total maintainers: 1
proxy.golang.org: github.com/lionel-/ggstance
- Documentation: https://pkg.go.dev/github.com/lionel-/ggstance#section-documentation
-
Latest release: v0.3.6
published over 3 years ago
Rankings
cran.r-project.org: ggstance
Horizontal 'ggplot2' Components
- Homepage: https://github.com/lionel-/ggstance
- Documentation: http://cran.r-project.org/web/packages/ggstance/ggstance.pdf
- License: GPL-3
-
Latest release: 0.3.7
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.1.0 depends
- ggplot2 >= 3.2.0 imports
- plyr * imports
- rlang * imports
- withr >= 2.0.0 imports
- Hmisc * suggests
- covr * suggests
- testthat * suggests
- vdiffr >= 0.3.0 suggests
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- r-lib/actions/pr-fetch v2 composite
- r-lib/actions/pr-push v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite