df$freq.gt.100 = as.integer(df$freq >= 100)
The bit inside brackets evaluates to TRUE
or FALSE
which can be converted to 1 or 0 via as.integer
.
There's nothing to be "afraid" of: you can test the right-hand side of the expression on its own to check it works and only when you are happy with this do you add it as a new column to the original data.
EDIT: didn't see the above answer as I was creating this one and had a call to take!