Hello stackoverflow Community,
I have the following problem in the data set. There are values in the data set that are incorrect e.g. 2.5 where the value should be 20.5. So I multiply the values that are less than 10 by 10. But the result is not correct. For example, in 2007 I get the value 666 for Indonesia instead of 20.5.
library(mosaic)
path <- "/Users/Admin/Desktop/LifeExpectancyData.csv"
df_lifeExpectancy <- read.csv(path)
df_lifeExpectancy1 <- df_lifeExpectancy %>%
select(Country, Year, Status, Life.expectancy, BMI) %>%
rename("year" = "Year",
"status" = "Status",
"life_expectancy" = "Life.expectancy",
"country" = "Country",
)
df_lifeExpectancy1 <- na.omit(df_lifeExpectancy1)
df_lifeExpectancy1$BMI[df_lifeExpectancy1$BMI < 10] <- df_lifeExpectancy1$BMI * 10.0
Problem:
Without data manipulation With data manipulation
Thank you for helping.