This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Make A New Column With Description

the question is posted in Stackoverflow

r

You should ask questions like this on stackoverflow (responses should be quicker and more helpful).

And not double post it would be better

the question is posted in SO, so no question here...

I would rather revert the first revision, to honor the effort of the answer and give appropriate context, trying to find the revert button... looks like it doesn't exist.

But you have the revisions to know what was posted. But yes, there are many functionalities that don't exist here and in SO yes... Many of them would be very nice to have, I don't understand why biostar is out of the stackExchange...

1 answer

You can create nested ifelse statements, for example:

df$new <- ifelse(df$times.x>=1 & is.na(times.y) & times.z==0, 
                 "located.up",
                 ifelse(*some other condition*, 
                        "located.down",
                        ifelse(*some other condition*,
                               "not.located",NA)))

Log in to answer this question.