Skip to content

create new variable with ifelse? (reproducible example)

3 messages · Stephen Politzer-Ahles, Rui Barradas, Niklas Fischer

#
Hello,

Here's another one.

logic.result <- with(rep_data, know %in% c("very well", "fairly well") & 
getalong %in% c(4,5))
rep_data$clo <- 1*logic.result # coerce to numeric

Rui Barradas

Em 16-09-2012 13:29, Stephen Politzer-Ahles escreveu: