Closed jamie-moffatt closed 3 years ago
You can do it like that, but that wasn't what I indended. What's missing is 'list()':
vids_tib <- vids_tib %>%
dplyr::mutate(
dplyr::across(c(vid_game, caunts), list(cent = centre))
)
I also noticed some general lack of clarity in that section so I've re-written a bit and updated on here. If you reinstall you'll see the changes to that section (if it matters to you!). Thanks for pointing this out.
There appears to be an error in Tutorial 10 when using the across() function.
The tutorial asks you to create centred versions of a couple of variables in one go, and the code provided to do that is the following:
This is meant to create two variables called "vid_game_cent" and "caunts_cent", which are the centred versions of the original variables. For me it doesn't create those variables and doesn't seem to do anything else.
I had a look athe across() function and it appears the correct way to specify the names of the new variables is with the .names argument: