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)
for number_SPSS
, a numeric vector to format. For
substr_SPSS
, a vector of character strings to be cut.
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
number
.
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.
A character vector of the same length as x
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
.