Exploring Medical Data Science with R

Exploring Medical Data Science with R

Basic

Sec.B-Ch.2-Subsec.9:Data Transformation and Variable Engineering in R

Data Reshaping in R, Adding Variables, Value Assignment and Modification, and Advanced Uses of the mutate() Function

Dr. Xie YJ's avatar
Dr. Xie YJ
Apr 04, 2026
∙ Paid

During the process of data analysis, adding new variables and modifying existing variables are common and important tasks. The dplyr package in R provides powerful tools to simplify these operations. In this section, we will introduce in detail how to use the mutate() function in the dplyr package to add new variables, as well as how to modify existing variables in a dataset through value assignment.

User's avatar

Continue reading this post for free, courtesy of Dr. Xie YJ.

Or purchase a paid subscription.
© 2026 Xie Yaojue · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture