powered by
Returns case-level information in order specified by user.
sortC(data, id, by, descending = TRUE)
Dataset to be sorted.
A variable in the dataset (data) that identfies individual cases, typically the name of states, countries, etc.
Variable the dataset should be sorted by.
Should the cases be sorted in descending order? By default, set to TRUE.
A data frame of sorted observations.
# NOT RUN { library(poliscidata) sortC(data=states, id=state, by=abortlaw10) sortC(data=states, id=state, by=abortlaw10, descending=FALSE) # }
Run the code above in your browser using DataLab