Skip to content

Commit

Permalink
Updated text for readme and vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbry committed Jun 16, 2024
1 parent 39046d2 commit 35fd385
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Overview

readHCUP makes it easy to read and work with datasets from [Healthcare
readHCUP makes it easy to read and work with datasets from the [Healthcare
Cost and Utilization Project (HCUP)](https://hcup-us.ahrq.gov/).
readHCUP’s functions are designed to work with the ASC files directly,
so there is no need to preprocess the data for any of the supported
Expand All @@ -21,7 +21,7 @@ The currently supported datasets:

The current import method utilizes
[readr](https://readr.tidyverse.org/), and additional import functions
(data.table, etc) will be added in the near future.
(data.table, etc) will be added shortly.

Please feel free to create an issue if you have any questions, feedback,
or feature requests.
Expand Down Expand Up @@ -60,15 +60,15 @@ df_3dx <- read_nis("NIS_2019_test_data.ASC", 2019,
#### Corrections

By default, the `read_nis()` automatically returns the corrected version
of the data. For example, HCUP released a corrections for
`PCLASS_ORPROC` in the NIS 2019 and 2020 datasets. Usually, you’d need
download a csv file with the corrections and then update the values in
the dataset. This can be a bit of a hassle when there are 7M+ records,
of the data. For example, HCUP released corrections for
`PCLASS_ORPROC` in the NIS 2019 and 2020 datasets. Usually, you’d need to
download a CSV file with the corrections and then update the values in
the dataset. This process can be a bit of a hassle when there are 7M+ records,
so the corrections are automatically applied when using `read_nis()`.

- Note: In order for the corrections to be applied, `KEY_NIS` and
- Note: For the corrections to be applied, `KEY_NIS` and
`PCLASS_ORPROC` need to be included in your dataset. If they are not
included, `read_nis()` will still return the data and you will receive
included, `read_nis()` will still return the data, and you will receive
a warning that corrections were not applied.

If you don’t want the corrections to be automatically applied, use
Expand All @@ -89,9 +89,9 @@ find a list of readHCUP’s supported datasets by running the following:
View(supported_datasets)
```

- The `data` column is the name of the dataset and the year
- `data`is the name of the dataset and the year

- The `dataset_file_name` column is the file name that was provided by
- `dataset_file_name` is the file name that was provided by
the HCUP Central Distributor

#### Descriptions
Expand Down
12 changes: 6 additions & 6 deletions vignettes/NIS.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ library(readHCUP)

## The NIS dataset

Working with the National Inpatient Sample (NIS) database can be challenging due to its size (\>7M records per year and 170+ variables) and the limited support for non-proprietary statistical software packages. The goal of `readHCUP` is to make it easier for researchers to focus on their research, not on loading data into R. With this in mind, `readHCUP`'s `read_nis()` allows researchers to read datasets with a single function call.
Working with the National Inpatient Sample (NIS) database can be challenging due to its size (\>7M records per year and 170+ variables) and the limited support for non-proprietary statistical software packages. The goal of `readHCUP` is to make it easier for researchers to focus on their research, not loading data into R. With this in mind, `readHCUP`'s `read_nis()` allows researchers to read datasets with a single function call.

## Working with the NIS dataset

Expand All @@ -36,9 +36,9 @@ The path to the dataset and the year it was produced is all we need to read the
### Corrected datasets

By default, the `read_nis()` automatically returns the corrected version of the data. For example, HCUP released a corrections for `PCLASS_ORPROC` in the NIS 2019 and 2020 datasets. Usually, you'd need download a csv file with the corrections and then update the values in the dataset. This can be a bit of a hassle when there are 7M+ records, so the corrections are automatically applied when using `read_nis()`.
By default, the `read_nis()` automatically returns the corrected version of the data. For example, HCUP released corrections for `PCLASS_ORPROC` in the NIS 2019 and 2020 datasets. Usually, you'd need to download a CSV file with the corrections and then update the values in the dataset. This process can be a bit of a hassle when there are 7M+ records, so the corrections are automatically applied when using `read_nis()`.

- Note: In order for the corrections to be applied, `KEY_NIS` and `PCLASS_ORPROC` need to be included in your dataset. If they are not included, `read_nis()` will still return the data and you will receive a warning that corrections were not applied.
- Note: For the corrections to be applied, `KEY_NIS` and `PCLASS_ORPROC` need to be included in your dataset. If they are not included, `read_nis()` will still return the data, and you will receive a warning that corrections were not applied.

If you don't want the corrections to be automatically applied, use `corrected = FALSE`:

Expand All @@ -55,9 +55,9 @@ The structure of the NIS dataset can change each year, which means `read_nis()`
supported_datasets
```

- The `data` column is the name of the dataset and the year
- `data` is the name of the dataset and the year

- The `dataset_file_name` column is the file name that was provided by the HCUP Central Distributor
- `dataset_file_name` is the file name that was provided by the HCUP Central Distributor

If the dataset is not supported, you will receive an error message:

Expand All @@ -66,7 +66,7 @@ df_error <- read_nis("nis", 2040)
```

If you're working with a dataset that is not currently supported, please open an [issue in GitHub](https://github.com/jonbry/readHCUP/issues) and we'll work on adding it to the list of supported datasets.
If you're working with a dataset that is not currently supported, please open an [issue in GitHub](https://github.com/jonbry/readHCUP/issues), and we'll work on adding it to the list of supported datasets.

#### Descriptions

Expand Down

0 comments on commit 35fd385

Please sign in to comment.