Skip to content

R new syntax for ECMEN#229

Merged
ValerioGiuffrida merged 1 commit intomainfrom
R-new-syntax-for-ECMEN
Feb 27, 2026
Merged

R new syntax for ECMEN#229
ValerioGiuffrida merged 1 commit intomainfrom
R-new-syntax-for-ECMEN

Conversation

@odai-saleh
Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +60 to +65
# If your HH size variable is not HHSize, rename here:
hh_size_var <- "HHSize" # <-- change if needed (e.g., "hh_size")

# If your MEB variables are named differently, rename here:
meb_var <- "MEB" # per capita MEB
smeb_var <- "sMEB" # per capita SMEB (optional)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would approach this differently.
It should be done so that not having MEB and SMEB prevents a silent failure.
Rather, we should have a noisy error, gracefully handled, as the data to complete the procedure is missing.
We must assume variables are standard at this stage, as the normalization of the dataset should have been already executed at this stage.

#240

Comment on lines +77 to +84
# 4) (Optional) quick overview for outliers (min/max/mean)
# -----------------------------
exp_overview <- df %>%
summarise(across(all_of(all_exp_inputs),
list(min = ~min(.x, na.rm = TRUE),
max = ~max(.x, na.rm = TRUE),
mean = ~mean(.x, na.rm = TRUE))))
exp_overview
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Data quality control and validation do not belong here.
#240

Comment on lines +67 to +70
# Set these to your actual names if different
hh_size_var <- "HHSize" # household size
meb_var <- "MEB" # per-capita MEB
smeb_var <- "sMEB" # per-capita SMEB (optional)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above, at this stage variables must be already standardized or fail noisily as the dataset is incomplete to execute this.

#240

@ValerioGiuffrida ValerioGiuffrida merged commit d490acc into main Feb 27, 2026
@ValerioGiuffrida ValerioGiuffrida deleted the R-new-syntax-for-ECMEN branch February 27, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants