Skip to content

Commit

Permalink
[Feature] correction to derivedVariables.Rmd, change ref branch of bl…
Browse files Browse the repository at this point in the history
…lflow to latest version of RecWTable()
  • Loading branch information
wyusuf068 committed Nov 25, 2019
1 parent 5edbf20 commit ca6ce16
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
9 changes: 8 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# cchsflow 0.2.1 (Latest build)
# cchsflow 0.2.2 (Latest build)

## Features:

- Updated ref branch of bllflow to match latest version of `RecWTable()`
- Minor corrections to derived variables article

# cchsflow 0.2.1

## Features:

Expand Down
4 changes: 2 additions & 2 deletions Vignettes/derivedVariables.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ data(cchs2010)
variables <- read.csv(file.path(getwd(), '../inst/extdata/variables.csv'))
variableDetails <- read.csv(file.path(getwd(), '../inst/extdata/variableDetails.csv'))
BMI2003 <- RecWTable(dataSource = cchs2003, variableDetails = variableDetails, datasetName = "cchs2003", log = TRUE, variables = c("HWTGHTM", "HWTGWTK", "HWTGBMI_derived"))
BMI2003 <- RecWTable(dataSource = cchs2003, variableDetails = variableDetails, datasetName = "cchs2003", log = TRUE, variables = c("HWTGHTM", "HWTGWTK", "HWTGBMI_der"))
BMI2010 <- RecWTable(dataSource = cchs2010, variableDetails = variableDetails, datasetName = "cchs2010", log = TRUE, variables = c("HWTGHTM", "HWTGWTK", "HWTGBMI_derived"))
BMI2010 <- RecWTable(dataSource = cchs2010, variableDetails = variableDetails, datasetName = "cchs2010", log = TRUE, variables = c("HWTGHTM", "HWTGWTK", "HWTGBMI_der"))
```

Since derived variables are based on previously transformed variables, if you want to only transform your derived variable, you must also specify its base CCHS variables in `RecWTable()` as shown above. So for the derived BMI variable, you will have to also specify the height (`HWTGHTM`) and weight (`HWTGWTK`) variables.
Expand Down
2 changes: 1 addition & 1 deletion Vignettes/usingcchsflow.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The `RecWTable` and `SetDataLabels` functions are part of the [bllflow](https://
```{r eval= FALSE}
install.packages("devtools")
library(devtools)
install_github("Big-Life-Lab/bllflow", ref = "derived-variable-creation")
install_github("Big-Life-Lab/bllflow", ref = "dev")
```

```{r results= 'hide', message = FALSE, warning=FALSE}
Expand Down

0 comments on commit ca6ce16

Please sign in to comment.