After the 10th variable 11-14 are void results from the dataset. There were no survey answers with the options to pick 11,12,13, 14 as a preset answer on levels of trust in this research. Does anyone know how to remove this using the NA function. How would I tell R not to use 11, 12, 13 etc in data from tables I am trying to generate?
I think you are misreading the output. Your has the numbers 1 - 10 and 77, 88, and 99. The numbers at the left edge are row numbers of the data frame. Here is an example of a similar result.
A handy way to remove rows from a data frame is to use the filter() function from the dplyr package. The following code will keep all rows where the value of the trstun column is <= 10. The result is stored in the new data frame df_clean.