Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/xpssSortVariables.R
R implementation of the SPSS SORT VARIABLES
function.
1 | xpssSortVariables(x, by = NULL, order = "A")
|
x |
a (non-empty) data.frame or input data of class "xpssFrame". |
by |
atomic character with the name of the argument to sort by |
order |
atomic character which indicate the sort direction. |
x
can be sorted based on the following by
arguments.
NAME. Sort by variable names. Primary sort is alphabetical. Trailing digits are sorted numerically
TYPE. Sort variables by type (numeric or string). Sort string variables by width.
LABEL. Sort variables alphabetical by variable labels.
COLUMNS. Sort variables by column width.
Valid input for order are "Up" or "Down", respectively "A" or "D".
Returns x
sorted by the by
argument.
Benjamin Piest
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(fromXPSS)
xpssSortVariables(fromXPSS, by = "NAME")
xpssSortVariables(fromXPSS, by = "NAME", order = "D")
xpssSortVariables(fromXPSS, by = "TYPE", order = "A")
xpssSortVariables(fromXPSS, by = "TYPE", order = "D")
xpssSortVariables(fromXPSS, by = "COLUMNS", order = "A")
xpssSortVariables(fromXPSS, by = "COLUMNS", order = "D")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.