I'm trying to subset some data by those that reported an improvement in mood, but for some reason when using the subset function, it misses out 4 people. Initially, I just added these observations to the new dataframe I wanted to create however, now I'm trying to run some analyses on this new dataframe its treating the 4 people I added as a separate group.
This is what I did to subset the data initially (which missed out 4 participants):
df_Improved <- subset(dataframe, Mood == "Improved")
I looked at the original dataframe (to see if the issue stemmed from there) and manually filtered it by the term Improved. This showed the correct amount of observations so it's only when I try to subset it does it come out with the incorrect number.
Is there a way around this or is there way that I can get R to read these added 4 observations as falling under the same group as all the other observations?
I hope this makes sense, thanks in advance!