79095757

Date: 2024-10-16 20:43:24
Score: 1
Natty:
Report link

Using ifelse and base R:

dat <- data.frame(Count = round(runif(100, 1, 100)))
dat$even_or_odd <- ifelse(dat$Count %% 2 == 0, "even", "odd")
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jsumner