I have to run a t-test and need to remove the group of people that responded with "no answer" which generated a third, 99 group. I keep getting an error message saying the grouping factor needs to have exactly two groups. And I want to keep groups 1 and 2. Here is an example of the type of result I am looking for:
I've tried the select and keeps functions but they either do not work or don't do what i want.
FollowPoliticians <- as.factor(dataset$Q18)
SatisfactionDemocracy <- as.numeric(dataset$Q27)
table(FollowPoliticians)
psych::describeBy(SatisfactionDemocracy, FollowPoliticians)
Dataframe <- data.frame(SatisfactionDemocracy, FollowPoliticians)
could anybody help me?