Open WSKQ23 opened 3 years ago
Are you ever assigning salary back to d?
remove_dollar<- gsub( "\\$", " ", d$Salary )
dollar_removed <- gsub(",", "", remove_dollar)
salary <- head(dollar_removed %>% as.numeric())
salary
Try something like:
unstring_salary <- function(x)
{
x <- gsub( "\\$", " ", x )
x <- gsub(",", "", x )
x <- as.numeric( x )
return( x )
}
d$salary <- unstring_salary( d$Salary )
Hello @lecy I am having challenge with the cleaning of my salary data that I used to produce my salary summaries. I used the codes below to clean;
but while producing my report I realized that all the values for
q25, q50 and q75
are the same. I think I have issue with cleaning the salary that I used forPlease any help sir