Skip to content

Commit

Permalink
upload testing files
Browse files Browse the repository at this point in the history
  • Loading branch information
c3h3 committed Aug 30, 2017
1 parent faf758c commit 90eac27
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stocks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2330
2454
1 change: 1 addition & 0 deletions test-bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
for i in `seq 1 10`; do echo a$i; done
28 changes: 28 additions & 0 deletions test-dplyr-ggplot2.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
library(readr)
titanic <- read_csv("https://raw.githubusercontent.com/haven-jeon/introduction_to_most_usable_pkgs_in_project/master/bicdata/data/titanic.csv",
col_types = cols(survived = col_character()))


library(dplyr)
library(tidyr)
library(magrittr)
library(ggplot2)

dim(titanic)
titanic %>% dim

# select sex, count(*) as N from titanic group by sex
titanic %>% group_by(sex) %>% summarise(N=n())
summarise(group_by(titanic,sex),N=n())

# select sex, survived, count(*) as N from titanic group by sex, survived
titanic %>% group_by(sex,survived) %>% summarise(N=n())

titanic %>%
ggplot(mapping = aes(x=sex)) +
geom_bar() + facet_grid(survived~pclass)


titanic %>%
ggplot(mapping = aes(x=sex,fill=survived)) +
geom_bar()
2 changes: 2 additions & 0 deletions test-get-all-stocks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
for stock in $(cat stocks.txt); do STOCK_ID=$stock Rscript.exe test-exe-getStockMajorData.R; done

0 comments on commit 90eac27

Please sign in to comment.