I'm a new user of R, trying to do subsetting to one of my column. However some of the values are missing / not subsetted to the new subset.
I tried different variations of spelling of the code but it does not seem to work (i.e. :)
df_Location = df[df$Location == "Samarinda" | df$Location == "Samarinda " df$Location == "Samarinda. " df$Location == " Samarinda",]
df_Location
summary(df)
df_Location = df[df$Location == "Samarinda",]
df_Location
summary(df)
df_Location = df[df$Location == "Samarinda",]
df_Location
summary(df)
These codes only resulted in a subset of 7 rows --> There should be 37 rows in the original data
When I used rPivotTable, this is what it shows (Samarinda is listed twice, with values of 30 and 7, respectively):
Samarinda 30
Samarinda 7
Totals 221
Can anyone advise on how to fix this problem?
Thank you very much