I'm pretty new to coding, but it seems that my subset is missing values and I'm wondering what i am doing wrong. So, I have a data frame called «df_envel» with 4 colums : Elevation, distance, profil, date. I am trying to subset this dataframe to get only values that equals -0.1 m. I have tried multiple subset methods but all methods misses some -0.1 values and put some NA's instead. Here's the subset code lines I tried which all returns to the same number of values:
Here is my code:
f<- df_envel[which(df_envel$Elevation=='-0.1'),] f<- df_envel %>% filter(Elevation == '-0.1') f<- subset(df_envel, Elevation %in% '-0.1')
Does anybody know what I might be doing wrong?