xpssSortVariables: Sorting variables

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/xpssSortVariables.R

Description

R implementation of the SPSS SORT VARIABLES function.

Usage

1

Arguments

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.

Details

x can be sorted based on the following by arguments.

Valid input for order are "Up" or "Down", respectively "A" or "D".

Value

Returns x sorted by the by argument.

Author(s)

Benjamin Piest

See Also

sort

Examples

 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")

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.