Last active
December 17, 2015 13:54
-
-
Save syu-id/8106d8de999d69f20052 to your computer and use it in GitHub Desktop.
学習者コーパス論 2015.12.11 作図
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
library(scales) | |
df <- read.csv('out/2015.12.04-awl_asl.csv') | |
df_plot <- df %>% | |
mutate( | |
native = plyr::revalue(native, c(en = 'L1 English ', ja='L1 Japanese')) | |
) | |
box_tokens <- ggplot(df_plot, aes(x = native, y = n_token)) + | |
geom_boxplot(outlier.colour = NA) + | |
stat_summary(fun.y = mean, geom = 'point', shape = 5, size = 4) + | |
geom_jitter(aes(color = native), alpha = 0.8) + | |
scale_y_continuous(breaks = pretty_breaks(n = 8)) + | |
labs( | |
x = 'Native Language', | |
y = 'Tokens in English Essays', | |
color = 'Native Language' | |
) | |
box_types <- ggplot(df_plot, aes(x = native, y = n_type)) + | |
geom_boxplot(outlier.colour = NA) + | |
stat_summary(fun.y = mean, geom = 'point', shape = 5, size = 4) + | |
geom_jitter(aes(color = native), alpha = 0.8) + | |
scale_y_continuous(breaks = pretty_breaks(n = 8)) + | |
labs( | |
x = 'Native Language', | |
y = 'Types in English Essays', | |
color = 'Native Language' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment