Skip to content

Commit

Permalink
Merge pull request #24 from gertstulp/patch-2
Browse files Browse the repository at this point in the history
consistency corrections.R
  • Loading branch information
AdrienneMendrik authored Mar 26, 2024
2 parents 8b85842 + 342249f commit b5dfb09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions submission.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# List your packages here. Don't forget to update packages.R!
library(dplyr) # as an example, not used here

clean_df <- function(df, background_df=NULL){
clean_df <- function(df, background_df = NULL){
# Preprocess the input dataframe to feed the model.
### If no cleaning is done (e.g. if all the cleaning is done in a pipeline) leave only the "return df" command

Expand All @@ -35,9 +35,9 @@ clean_df <- function(df, background_df=NULL){
df <- df[ !is.na(df$new_child), ]

# Selecting variables for modelling
keepcols = c('nomem_encr', # ID variable required for predictions,
'age', # newly created variable
'new_child') # outcome variable
keepcols <- c('nomem_encr', # ID variable required for predictions,
'age', # newly created variable
'new_child') # outcome variable

## Keeping data with variables selected
df <- df[ , keepcols ]
Expand Down

0 comments on commit b5dfb09

Please sign in to comment.