| labels_SPSS {r2spss} | R Documentation |
Format axis tick labels similar to SPSS
Description
Format axis tick labels in a similar manner to SPSS to mimic the look of SPSS graphs.
Usage
number_SPSS(x, big.mark = "", ...)
numberSPSS(x, big.mark = "", ...)
substr_SPSS(x, start = 1, stop = 8)
substrSPSS(x, start = 1, stop = 8)
Arguments
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. |
Details
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.
Value
A character vector of the same length as x