I have a little question concerning value replacement in a DF. I know how to replace value using ifelse statement but does exist some function which allows us to don't specify the else condition.
df <- data.frame(ID = paste0("ID",1:10),VAL = sample(10,10,replace=T),stringsAsFactors = F)
df$VAL <- ifelse(df$VAL == 1,"*",df$VAL)
Thanks
df$VAL[df$VAL == 1] <- '*'?