My question is
I have to assign the variable green2 to a dataset what equals "high" if the number of days a person spent on vacation is greater than two times median number of days spent by the sample as a whole and "low" otherwise.
I am asking if I use the "assign" function to assign a variable to a function specifically? and what is the code to do that?
Is it this code:
assign(x, value, pos = -1, envir = as.environment(pos),
inherits = FALSE, immediate = TRUE)