Skip to content
Alexander Babenchuk edited this page Sep 2, 2016 · 12 revisions

Welcome to the Springboard wiki!

Important Links: Google Style Guide R: https://google.github.io/styleguide/Rguide.xml#comments
Simple examples: http://www.endmemo.com/program/R/replace.php
http://r-pkgs.had.co.nz/git.html
https://www.rstudio.com/wp-content/uploads/2015/02/data-wrangling-cheatsheet.pdf
http://www.statmethods.net/
http://adv-r.had.co.nz/Style.html
http://rseek.org/

https://github.com/gimoya/theBioBucket-Archives/blob/master/R/RegEx_Examples.R

Vectors are one-dimension arrays that can hold numeric data, character data, or logical data. In other words, a vector is a simple tool to store data. For example, you can store your daily gains and losses in the casinos.

Roulette winnings from Monday to Friday


roulette_vector <- c(-24, -50, 100, -350, 10)

# Assign days as names of
poker_vector names(poker_vector) <- c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")

# Assign the names of the day to roulette_vector and poker_vector
names(poker_vector) <- days_vector
names(roulette_vector) <- days_vector

Typical Aesthetics

ggplot Explained:

ggplot(data = <default data set>, 
     aes(x = <default x axis variable>,
         y = <default y axis variable>,
         ... <other default aesthetic mappings>),
     ... <other plot defaults>) +

     geom_<geom type>(aes(size = <size variable for this geom>, 
                    ... <other aesthetic mappings>),
                data = <data for this point geom>,
                stat = <statistic string or function>,
                position = <position string or function>,
                color = <"fixed color specification">,
                <other arguments, possibly passed to the _stat_ function) +

scale_<aesthetic>_<type>(name = <"scale label">,
                   breaks = <where to put tick marks>,
                   labels = <labels for tick marks>,
                   ... <other options for the scale>) +

theme(plot.background = element_rect(fill = "gray"),
      ... <other theme elements>)
Clone this wiki locally