get_pufyear | R Documentation |
This column notes the file from which the record came.
get_pufyear(df, filename)
df |
a data table to append the new column to |
filename |
the file name from which the record was derived |
Matches the year of the file from the file name using a regular expression. Requires that the original file names are not changed.
a data table with a new ordered factor column called pufyear
x <- data.table::data.table(x = rep("name", 10))
nsqipr:::get_pufyear(x, "acs_nsqip_puf12.txt")
x$pufyear < "2013"
x$pufyear > "2005-2006"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.