asciiruler | R Documentation |
'
' v borders ' +-----------------------------------------------------------------+<-borders ' |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<-dense_ticks ' | | | | | | | | | | | | | | |<-sparse_ticks ' |-30 -20 -10 0 10 20 30 | ' +-----------------------------------------------------------------+<-borders '
asciiruler(low = 0L, high = 50L, sparse_ticks = 5L, dense_ticks = TRUE, block_space = 0L, borders = FALSE, numbers_down = TRUE, line_break = "\n", strict_width = FALSE) default.asciiruler(x)
low |
the range start, can be negative |
high |
the range end, can be negative |
sparse_ticks |
intermittent ticks appear every sparse_ticks, set to 0 to hide row |
dense_ticks |
display a row of ticks at every position |
block_space |
break up the ruler with a space every block_space blocks encountered, a multiple of sparse_ticks, set to 0 to disable |
borders |
display borders |
numbers_down |
display the ruler so the numbers are below the ticks |
line_break |
the line break character(s) |
strict_width |
hide numbers whose display would force the ruler to be wider than width(high-low) |
x |
the asciiruler |
asciiruler object with the following slots:
delimited ruler string ready to cat
vector of lines comprising the ruler
width of ruler
position of the first tick relative to the left edge of the ruler
Inspired by http://codegolf.stackexchange.com/questions/4910/ascii-ruler-generation
asciiruler(low=-30,high=30,borders=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.