Something like this:
x[x$f1 > 3,] <- data.frame('x', 0, 0)
should do the trick!
as per @DWin's comment, this won't work with a factor id
column. Using this same technique can work like this though:
levels(x$id) <- c(levels(x$id), 'x')
x[x$f1 > 3,] <- data.frame('x', 0, 0)
droplevels(x$id)