I created a plot with function facet_grid() as below. And I am wondering is it possible to change the default "NA" to some other words?
gender.labs <- c("Female","Male")
names(gender.labs) <- c("0","1")
native_speaker.labs <-c("Non Native-speaker","Native-speaker")
names(native_speaker.labs) <- c("0","1")
ggplot(df_plot, aes(x = Platform_joined, y = sum_mastery)) +
geom_boxplot() +
geom_point() +
labs(x = "Teaching Motality", y = "Total Mastery Gained") +
scale_y_continuous(limits = c(20,60)) +
theme(axis.title.x = element_blank()) +
facet_grid(gender~native_speaker, margins = TRUE,
labeller = labeller(gender = gender.labs, native_speaker = native_speaker.labs))
