Replace Value of Data Frame Variable Using dplyr Package in R (Example) | mutate & replace Functions

preview_player
Показать описание
R code of this video:

x2 = "XX",
x3 = 66)

library("dplyr") # Load dplyr package

data_new <- data %>% # Replacing values
mutate(x1 = replace(x1, x1 == 2, 99))

Follow me on Social Media:
Рекомендации по теме
Комментарии
Автор

another great video used this just now very fast very quickly. Starting to finally dig into dplyr

vanhoot
Автор

I'm busy with outlier values on a certain variable, i did replace the outlier values such that the variable doesn't have outliers now, but how do i replace that non-outlier variable now on my data set?

aphiwemagaya
Автор

How can i replace all values of a column with e.g. value / 1000 ?

graykaufmann
Автор

Great video. How would you replace multiple numerical values efficiently?

sebbikankondi