Posts by Laura • 123 points
2 posts
-
3
votes2
answers15918
viewsA: Delete lines containing NA in a data frame
Another option is to use the function complete.cases df2 <- df[complete.cases(df),] The function complete.cases returns a logical vector of TRUE and FALSE. As used in the example above, only…
-
9
votes1
answer159
viewsQ: How to find a table by category with minimum observations?
Suppose you have the following data: a<-c(rep("agosto",3),rep("janeiro",4),rep("maio",6)) table(a) I want to know the month with the minimum of observations? With the function min(table(a)) the…