Code Monkey home page Code Monkey logo

ggxmean's Introduction

ggxmean

The goal of ggxmean is plot the mean of x - and some other things like y!

Installation

The development version from GitHub with:

# install.packages("devtools")
devtools::install_github("EvaMaeRey/ggxmean")

Examples

Open flipbook in a new tab

# knitr::opts_chunk$set(eval = F)
options(gganimate.nframes = 60)
library(tidyverse)
library(ggxmean)
#library(transformr) might help w/ animate

## basic example code
cars %>% 
  ggplot() +
  aes(x = speed,
      y = dist) +
  geom_point() + 
  ggxmean::geom_x_mean() +
  ggxmean::geom_x_mean_label() +
  ggxmean::geom_y_mean() +
  ggxmean::geom_xy_means(color = "red",
                size = 5) +
  ggxmean::geom_lm_fitted(color = "goldenrod3",
                          size = 3) +
  ggxmean::geom_lm_pred_int() +
  ggxmean::geom_lm() +
  ggxmean::geom_lm_residuals(linetype = "dashed") +
  ggxmean::geom_lm_conf_int() +
  ggxmean::geom_lm_formula()


palmerpenguins::penguins %>% 
  ggplot() +
  aes(x = bill_length_mm) +
  geom_rug(alpha = .3) +
  geom_histogram(alpha = .4) +
  geom_x_mean() +
  aes(fill = species) + # unexpected behavior here
  aes(color = species) +
  facet_wrap(facets = vars(species)) +
  gganimate::transition_layers()

library(ggxmean)
palmerpenguins::penguins %>% 
  drop_na() %>% 
  ggplot() +
  aes(x = bill_length_mm) +
  aes(y = flipper_length_mm) +
  geom_point() +
  ggxmean:::geom_x_mean() +
  ggxmean:::geom_y_mean() +
  ggxmean:::geom_y_line(alpha = .2) +
  ggxmean:::geom_x_line(alpha = .2) +
  ggxmean:::geom_xdiff() +
  ggxmean:::geom_ydiff() +
  ggxmean:::geom_x1sd(linetype = "dashed") +
  ggxmean:::geom_y1sd(linetype = "dashed") +
  ggxmean:::geom_diffsmultiplied() +
  ggxmean:::geom_xydiffsmean(alpha = 1) +
  ggxmean:::geom_rsq1() +
  ggxmean:::geom_corrlabel() +
  gganimate::transition_layers()

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.