I have a dataframe m and I want to remove all the rows where the f_name column has an entry greater than 3. I assume I can use something similar to
m
f_name
To reword your question slightly, you want to retain rows where entries in f_name have length of 3 or less. So how about:
subset(m, nchar(as.character(f_name)) <= 3)