Displaying 1 result from an estimated 1 matches for "numdir".
Did you mean:
numdi
2007 Sep 25
5
Am I misunderstanding the ifelse construction?
I have a function like this:
changedir <- function(dataframe) {
dir <- dataframe$dir
gc_content <- dataframe$gc_content
d <- ifelse(dir == "-",
gc_content <- -gc_content,gc_content <- gc_content)
return(d)
}
The goal of this function is to be able to input a data frame like this:
> lala
dir gc_content
1 + 0.5
2 - 0.5
3 +