Thomas Lumley 6/23/2022

Getting strings into code in base R

Read Original

This technical article addresses a common R programming challenge: using the value of a character string as a variable name in code, particularly within model formulas. It contrasts the fragile approach using `paste()` with the more robust `bquote()` function for quasiquotation, demonstrating its application with the `survey` package's `svyglm` function.

Getting strings into code in base R

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser