@@ -29,11 +29,11 @@ stacked_plot <- function(df, variable, fill_vars, facet_vars=NULL, facet_wrap=FA
2929
3030 p <- if (is.factor(index )| is.logical(index )) {
3131 p1 <- if (rotate_axis == TRUE ) {
32- ggplot(data = df , aes(x = forcats :: fct_rev(index ), fill = forcats :: fct_rev( forcats :: fct_infreq(index_fill ) ),
32+ ggplot(data = df , aes(x = forcats :: fct_rev(index ), fill = forcats :: fct_infreq(index_fill ),
3333 by = forcats :: fct_rev(index ))
3434 ) +
3535 coord_flip()
36- } else { ggplot(data = df , aes(x = index , fill = forcats :: fct_rev( forcats :: fct_infreq(index_fill ) ),
36+ } else { ggplot(data = df , aes(x = index , fill = forcats :: fct_infreq(index_fill ),
3737 by = index )
3838 )
3939 }
@@ -109,11 +109,11 @@ stacked_plot <- function(df, variable, fill_vars, facet_vars=NULL, facet_wrap=FA
109109
110110 p <- if (is.factor(index )| is.logical(index )) {
111111 p1 <- if (rotate_axis == TRUE ) {
112- ggplot(data = df , aes(x = forcats :: fct_rev(index ), fill = forcats :: fct_rev( forcats :: fct_infreq(index_fill ) ),
112+ ggplot(data = df , aes(x = forcats :: fct_rev(index ), fill = forcats :: fct_infreq(index_fill ),
113113 by = forcats :: fct_rev(index ))
114114 ) +
115115 coord_flip()
116- } else { ggplot(data = df , aes(x = index , fill = forcats :: fct_rev( forcats :: fct_infreq(index_fill ) ),
116+ } else { ggplot(data = df , aes(x = index , fill = forcats :: fct_infreq(index_fill ),
117117 by = index )
118118 )
119119 }
0 commit comments