labels_SPSS | R Documentation |
Format axis tick labels in a similar manner to SPSS to mimic the look of SPSS graphs.
number_SPSS(x, big.mark = "", ...) numberSPSS(x, big.mark = "", ...) substr_SPSS(x, start = 1, stop = 8) substrSPSS(x, start = 1, stop = 8)
x |
for |
big.mark |
a character string to be inserted every 3 digits to separate thousands. The default is an empty string for no separation. |
... |
additional arguments to be passed to
|
start, stop |
integers giving the first and last character to remain in the cut string, respectively. The default is to cut strings to the first 8 characters. |
number_SPSS
is a wrapper for number
that by
default does not put a separator every 3 digits so separate thousands. It
mainly exists to prevent scientific notation in axis tick labels, hence it
is typically supplied as the labels
argument of
scale_x_continuous
or
scale_y_continuous
.
substr_SPSS
is a wrapper for substr
to cut character
strings by default to the first 8 characters, which is SPSS behavior for
the tick labels of a discrete axis in some (but not all) plots. It is
typically supplied as the labels
argument of
scale_x_discrete
or
scale_y_discrete
.
A character vector of the same length as x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.