Add Or Change Columns

We frequently require new calculations that we want to add as new columns. Sometimes we just want to update a column's data type. Let's look at how we can do both in R.

circle-info

This lesson is coming soon. In the meantime, refer to the provided code examples on GitHubarrow-up-right as well as the chapter on data transformationarrow-up-right from the book "R for Data Science" (2nd edition).

Drawing
Adding new columns increases the horizontal size of the data frame.
Drawing
Adding a new column and dropping the old ones at the same time.

Last updated