Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

Using mutate for data processing

Creating a new variable is one of the most important tasks in data pre-processing. Creating a new variable and getting it attached to the new variable with existing data frame is called mutation in the dplyr framework. The verb mutate() is used to achieve this task. In this recipe, you will create a new variable from an existing data frame using the mutate() verb. Also, you will see the base R counter example using the transform() function.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content