sortC {poliscidata} | R Documentation |
Returns case-level information in order
Description
Returns case-level information in order specified by user.
Usage
sortC(data, id, by, descending = TRUE)
Arguments
data |
Dataset to be sorted. |
id |
A variable in the dataset (data) that identfies individual cases, typically the name of states, countries, etc. |
by |
Variable the dataset should be sorted by. |
descending |
Should the cases be sorted in descending order? By default, set to TRUE. |
Value
A data frame of sorted observations.
Examples
library(poliscidata)
sortC(data=states, id=state, by=abortlaw10)
sortC(data=states, id=state, by=abortlaw10, descending=FALSE)
[Package poliscidata version 2.3.0 Index]