I have a Data set with many columns and rows, in am narrowing down the data as to get a specific answer. I want to remove all occurances of Names within a column. i know you can do this for columns that are Numbers, buy removing number below or over a certain number
for example: data =
ID Name sport
- ted football
- tom football
- tim hockey
- tod Track
- ben football
for numbers i would
removen <- data[data$ID < 2, ]
removen =
ID Name Sport
- tim hockey
- tod Track
- ben football
i want to assign
x <- c(all occurances of football)
so when i call x i would get
ID Name sport
- ted football
- tom football
- ben football
Thank you in advance and sorry for the formating.