powered by
Visualizes the top entries for a given field in a data frame. Count and percentage statistics is also shown as needed.
top_plot( x, field = NULL, ntop = NULL, highlight = NULL, max.char = Inf, show.rest = FALSE, show.percentage = FALSE, log10 = FALSE )
ggplot object
Data frame, vector or factor
Field to show
Number of top entries to show
Entries from the 'field' to be highlighted
Max number of characters in strings. Longer strings will be cut and only max.char first characters are shown. No cutting by default
Show the count of leave-out samples (not in top-N) as an additional bar.
Show the proportion of each category with respect to the total sample count.
Show the counts on log10 scale (default FALSE)
Leo Lahti leo.lahti@iki.fi
See citation("bibliographica")
if (FALSE) p <- top_plot(x, field, 50)
Run the code above in your browser using DataLab