Description Usage Arguments Details Value Examples
View source: R/pos_names_extract.R
This function takes a Provider of Services Record Layout file (in .txt form) and parses it to extract the descriptive variable names instead of generic ones. For example, the 2006 file variable PROV0085, which is the name of the variable in the raw dataset downloaded from CMS, has a more descriptive name in the layout file: CATEGORY-SUBTYPE-IND.
1 | pos_names_extract(layout_file, data_file)
|
layout_file |
The file location of the layout file |
data_file |
The year's data file |
This uses regular expressions to find variable names. It works with years
2000-2010. Later years seem to have descriptive names already, though they
aren't necessarily identical across years (nor do they match the names
produced here). This code can be run to produce variable names fresh, but
pre-computed variable names can also be accessed by names_pos_20XX()
functions also in this package.
A vector of names, ordered to match the corresponding year's data file
1 2 3 4 | ## Not run:
pos_names_extract("pos_2006_layout.txt", pos_2006_data)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.