I hereby claim:
- I am stillmatic on github.
- I am hua (https://keybase.io/hua) on keybase.
- I have a public key whose fingerprint is 6334 1815 CDA1 CE92 9D08 90F8 1EA6 17AD CD6D 0FBF
To claim this, I am signing this object:
``` r | |
library(ggplot2) | |
#> Warning: package 'ggplot2' was built under R version 3.3.2 | |
library(dplyr) | |
#> | |
#> Attaching package: 'dplyr' | |
#> The following objects are masked from 'package:stats': | |
#> | |
#> filter, lag | |
#> The following objects are masked from 'package:base': |
playerID | yearID | stint | teamID | lgID | G | AB | R | H | X2B | X3B | HR | RBI | SB | CS | BB | SO | IBB | HBP | SH | SF | GIDP | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
colboji01 | 1976 | 1 | ML4 | AL | 32 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | |
goodmiv01 | 1941 | 1 | CIN | NL | 42 | 149 | 14 | 40 | 5 | 2 | 1 | 12 | 1 | NA | 16 | 15 | NA | 1 | 2 | NA | 4 | |
hoilech01 | 1994 | 1 | BAL | AL | 99 | 332 | 45 | 82 | 10 | 0 | 19 | 53 | 2 | 0 | 63 | 73 | 2 | 5 | 1 | 4 | 6 | |
pujolal01 | 2003 | 1 | SLN | NL | 157 | 591 | 137 | 212 | 51 | 1 | 43 | 124 | 5 | 1 | 79 | 65 | 12 | 10 | 0 | 5 | 13 | |
barnoed01 | 1965 | 1 | BAL | AL | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
library(dplyr) | |
library(magrittr) | |
# dummy data | |
df <- data_frame( | |
a = c("1", "1", "2"), | |
b = c("a", "b", "c") | |
) | |
# convert to factor |
library(rvest) | |
library(dplyr) | |
library(magrittr) | |
urls <- c("http://www.imdb.com/title/tt1375666/", | |
"http://www.imdb.com/title/tt0499549/", | |
"http://www.imdb.com/title/tt6057032/") | |
dir_nom <- function(u) { | |
movie <- read_html(u) |
library(rvest) | |
library(magrittr) | |
library(dplyr) | |
#RTR Dresses All Pages Attempt 2 - Worked | |
#page 1 url = https://www.renttherunway.com/products/dress?action=click_all_dresses&nav_location=mainmenu&object_type=top_nav | |
#page 2 url = https://www.renttherunway.com/products/dress?action=click_all_dresses&nav_location=mainmenu&object_type=top_nav&page=2 | |
urlsRTRDresses <- paste0( | |
"https://www.renttherunway.com/products/dress?page=", 1:59 | |
) |
# written during an interview | |
# assumes your data is in coords | |
library(dplyr) | |
set.seed(1) | |
k <- 2 | |
initial_points <- base::sample(nrow(coords), k) | |
euclid <- function(one, two) { |
simulate_lm <- function(n) { | |
# note: `n` is an input but not used (don't worry about this hack) | |
x <- seq(0, 1, length = 40) | |
y <- 1 + 1.2 * x + rnorm(40, sd = 2) | |
t_star <- qt(0.975, 38) | |
lse <- lm(y ~ x) | |
lse_out <- summary(lse)$coefficients | |
se <- lse_out[2, 2] | |
b1 <- lse_out[2, 1] | |
upper_CI = b1 + t_star * se |
# at least they're not loops | |
fizzbuzz <- function(x) { | |
mod_five <- (x %% 5) == 0 | |
if(x %% 3 == 0) { | |
if(mod_five) return("fizzbuzz") | |
else return("fizz") | |
} | |
if(mod_five) return("buzz") | |
return(x) |
I hereby claim:
To claim this, I am signing this object:
#' Wrapper function to throw OS X notifications. | |
#' | |
#' @title OSX notifier | |
#' @author \href{https://github.com/stillmatic}{Chris Hua} | |
#' | |
#' @param message Body text of notification | |
#' @param title Title of notification | |
#' @param sound Optional. Valid sounds are in `~/Library/Sounds` or `/System/Library/Sounds` | |
#' | |
#' @return an AppleScript notification |