Novice coder here!
I am trying to sample 50 rows from a data frame with about 27,000 rows. I have tried this:
sample <- df %>%
sample_n(50)
but I get this error message:
Error: "size" must be less or equal than 1 (size of data), set "replace" = TRUE to use sampling with replacement.
It seems like the error is that the data frame is smaller than the sample size, which is obviously not the case. How can I fix this?