Relative Content

Tag Archive for rif-statement

R language – ifelse() doesn’t work with is.na() or is.null()

I don’t know what I am doing wrong here.
I want to concatenate a name of resource associated to the current operation or in case the OP is added and not present on an original route I want to add a short explanatory text.
When I used is.null() instead is.na() I had “NA” string added as a result.
I tried to replace NA but if selection >>> routeDetails[routeDetails$op == i, ‘resource’] <<< cant find the value I have empty string now.

How to use R to find if the value exist in a column

if (‘k_flg’ %in% flag_type == True){tkmessageBox(title = “Flag Exist”, message = “k flag exist”, icon = “info”, type = “ok”) Error: object ‘flag_type’ not found how can I use R to detect if the k_flag is exist in flag_type column. I try to use if but i got the error above. I expect the if […]