EveryNth | R Documentation |
This function is particularly useful function for placing tick marks between labels in ggplot objects
EveryNth(x, nth, empty = TRUE, inverse = FALSE)
x |
vector |
nth |
specify which elements are removed, i.e., every nth |
empty |
logical specifying where elements are dropped or replaced |
inverse |
logical specifying whether to drop every nth (FALSE; default) or save every nth (TRUE) |
I found this function on Stack Overflow while looking for a way to add tick marks to ggplot plots. URL provided in references. Post with function code was created by user *adamdsmith*.
Vector with every nth value removed or made into an empty string
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.