Hello,
I tried to use the function mutate(completed=ifelse()) w/o succes.
You will find below the reprex
rm(list = ls())
library(dplyr)
#>
#> Attachement du package : 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(rlang)
data<- data.frame(stringsAsFactors = FALSE,
A= c("A","B","C"),
B=c("17/05/19","","")
)
tab<-data %>%
mutate(completed=ifelse(!is.null(.data$B),"Yes","On progress"))
I should obtained "Yes" for the row A and "On progress" for the row B,C.
But that's not the fact. I obtain "Yes" in each rows.
Have you an idea?
Thanks in advance