tot_plot(dataframe, text.var, grouping.var = NULL, facet.vars = NULL, tot = TRUE, transform = FALSE, ncol = NULL, ylab = NULL, xlab = NULL, bar.space = 0, scale = NULL, space = NULL, plot = TRUE)
NULL
colors everything in "black". Also takes a single grouping variable or a list
of 1 or more grouping variables.TRUE
(assumes "tot" is the variable name), FALSE
(use row numbers), or a
character string of the turn of talk column.TRUE
the repeated facets will be
transformed from stacked to side by side.gantt_wrap
uses facet_wrap
rather than facet_grid
."fixed"
, the default), free
("free"
), or free in one dimension ("free_x"
, "free_y"
)"fixed"
, the default, all panels have the same size.
If "free_y"
their height will be proportional to the length of the y
scale; if "free_x"
their width will be proportional to the length of
the x scale; or if "free"
both height and width will vary. This
setting has no effect unless the appropriate scales also vary.TRUE
the plot will automatically plot.
The user may wish to set to FALSE
for use in knitr, sweave, etc.
to add additional plot layers.Invisibly returns the ggplot2 object.
Uses a bar graph to visualize patterns in sentence length and grouping variables by turn of talk.
## <strong>Not run</strong>: # dataframe <- sentSplit(DATA, "state") # tot_plot(dataframe, "state") # tot_plot(DATA, "state", tot=FALSE) # tot_plot(dataframe, "state", bar.space=.03) # tot_plot(dataframe, "state", "sex") # tot_plot(dataframe, "state", "person", tot = "sex") # tot_plot(mraja1, "dialogue", "fam.aff", tot=FALSE) # tot_plot(mraja1, "dialogue", "died", tot=FALSE) # tot_plot(mraja1, "dialogue", c("sex", "fam.aff"), tot=FALSE) + # scale_fill_hue(l=40) # tot_plot(mraja1, "dialogue", c("sex", "fam.aff"), tot=FALSE)+ # scale_fill_brewer(palette="Spectral") # tot_plot(mraja1, "dialogue", c("sex", "fam.aff"), tot=FALSE)+ # scale_fill_brewer(palette="Set1") # # ## repeated measures # rajSPLIT2 <- do.call(rbind, lapply(split(rajSPLIT, rajSPLIT$act), head, 25)) # tot_plot(rajSPLIT2, "dialogue", "fam.aff", facet.var = "act") # # ## add mean and +/- 2 sd # tot_plot(mraja1, "dialogue", grouping.var = c("sex", "fam.aff"), tot=FALSE)+ # scale_fill_brewer(palette="Set1") + # geom_hline(aes(yintercept=mean(word.count))) + # geom_hline(aes(yintercept=mean(word.count) + (2 *sd(word.count)))) + # geom_hline(aes(yintercept=mean(word.count) + (3 *sd(word.count)))) + # geom_text(parse=TRUE, hjust=0, vjust=0, family="serif", size = 4, aes(x = 2, # y = mean(word.count) + 2, label = "bar(x)")) + # geom_text(hjust=0, vjust=0, family="serif", size = 4, aes(x = 1, # y = mean(word.count) + (2 *sd(word.count)) + 2, label = "+2 sd")) + # geom_text(hjust=0, vjust=0, family="serif", size = 4, aes(x = 1, # y = mean(word.count) + (3 *sd(word.count)) + 2, label = "+3 sd")) # ## <strong>End(Not run)</strong>