> a <- data.frame(col.a = c(1, 2, 3), col.b = c(4, 5, 6))
> a.bak <- a
> print(a)
col.a col.b
1 1 4
2 2 5
3 3 6
> print(a.bak)
col.a col.b
1 1 4
2 2 5
3 3 6
> a <- a %>% mutate(col.c = c(7, 8, 9))
> a
col.a col.b col.c
1 1 4 7
2 2 5 8
3 3 6 9
> a.bak
col.a col.b
1 1 4
2 2 5
3 3 6
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
10