Description Usage Arguments Details Value Author(s) See Also Examples
A wrapper of the subset
function that
preserves the xtdata
attribute.
1 2 |
data |
a data frame with the |
formula |
a logical formula to subset to. |
select |
the names of the variables to keep. |
drop |
passed on to |
... |
other methods passed to |
The method is explained at https://github.com/hadley/devtools/wiki/Computing-on-the-language#non-standard-evaluation-in-subset.
a data frame
Francois Briatte f.briatte@ed.ac.uk
1 2 3 4 5 6 7 8 9 10 | # Load QOG demo datasets.
data(qog.demo)
# Subset to two countries.
QOG = xtsubset(qog.ts.demo, cname %in% c("China", "India"))
if(require(ggplot2)) {
# Plot log-population curves.
qplot(data = QOG, y = unna_pop, x = year, colour = cname, geom = "step") +
scale_colour_brewer(palette = "Set1") +
scale_y_log10()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.