Skip to content
Prev 286320 / 398502 Next

data frame manipulation with condition

On 24.02.2012 16:25, Arnaud Gaboury wrote:
Change
to

  df <- data.frame(x = c("AA","BB","CC","AA"), y = 1:4)

to make your object a sensible data.frame.
df$y[df$x=="AA"] <- df$y[df$x=="AA"] * 25

...


Uwe Ligges