I hereby claim:
- I am bhive01 on github.
- I am bhive01 (https://keybase.io/bhive01) on keybase.
- I have a public key whose fingerprint is 8786 42F9 9118 5EAB 328A 14DE 3733 D0FF 46A0 E89F
To claim this, I am signing this object:
| library(tidyverse) | |
| library(plotly) | |
| df1 <- | |
| structure(list(L = c(70.3645369132914, 65.4398664741782, 68.666743417908, | |
| 77.365430427141, 70.0547601723453, 70.6484131213004, 71.4986501504573, | |
| 66.1120379621642, 73.2774689981553, 69.562646734966, 69.1207716412117, | |
| 70.0365107157227, 70.5193220131868, 64.283933268896, 61.3740110269355, | |
| 68.0741114422373, 68.5654828591618, 70.8832243213418, 64.2919216622958, | |
| 69.292675612121, 68.8174984026827, 66.8429923577925, 74.8780440157137, |
| library(Rvision) | |
| library(tidyverse) | |
| vid_loc <- paste0(find.package("Rvision"), "/sample_vid/SampleVideo_1080x720_5mb.mp4") | |
| vid1 <- video(vid_loc) | |
| res <- data.frame(frame_pos = seq(2,nframes(vid1), 5), total_movement = NA) | |
| old <- readFrame(vid1, 1) |
I hereby claim:
To claim this, I am signing this object:
| torso <- function(d, n=5L, ...) { | |
| stopifnot(length(n) == 1L) | |
| center <- as.integer(nrow(d)/2) | |
| left <- as.integer(center-n/3) | |
| right <- as.integer(center + n/3) | |
| d[seq.int(from= left, to = right, by = 1L),] | |
| } | |
| topntail <- function(d, n=4L) { | |
| rbind(head(d,n), tail(d,n)) |
| library(tidyverse) | |
| library(GGally) | |
| nba = read.csv("http://datasets.flowingdata.com/ppg2008.csv") | |
| nba1 <- | |
| sample_n(nba, 40) %>% | |
| as_tibble() %>% | |
| mutate(league = 1) |
| library(tidyverse) | |
| # This is the example I used to show pwalk iterating and printing out things | |
| #perhaps this is a horrible example and I'm using it incorrectly? | |
| # if you substitute pmap for pwalk, you get exactly the same output. | |
| # make a simple plotting function | |
| plot_points <- function(t) ggplot(t, aes(mpg, wt)) + geom_point() | |
| #function that prints cylinder info, ggplot, and table |
| library(tidyverse) | |
| library(animation) | |
| library(tweenr) | |
| library(gtools) | |
| income <- read_csv("income.csv") | |
| income_levels <- mixedsort(unique(income$income_level)) | |
| income_levels <- c(income_levels[16], income_levels[1:15]) | |
| income <- income %>% mutate(income_level=factor(income_level, |
| library(tidyverse) | |
| lagshow <- | |
| data.frame(x= rep(1:10, 14), | |
| y = rep(1:10, 14), | |
| color = rep(rep(c("A", "B"), each = 10), 7), | |
| lag = rep(-3:3, each=20) | |
| ) %>% | |
| mutate(x = if_else(color == "A", x-lag, x)) | |
| ggplot(lagshow, aes(x = x, y = y, colour = color, shape = color)) + |
| ################################################ | |
| #Correlation matrix plot | |
| raw.data <- raw.data[complete.cases(raw.data),] | |
| c<-cor(raw.data[colstart:colend]) | |
| #Correlation p-value tests | |
| cor.pvalues <- function(X){ |
| library(tidyverse) | |
| #----------------------------------------------------------------------------- | |
| # Some complicated function to calculate things. | |
| #----------------------------------------------------------------------------- | |
| complex_func <- function(df) { | |
| cat("processing: ", first(df[['ID']]), "\n") | |
| # 100 lines of code go here. |