It's possibly a very stupid question, but I'm getting an error message for this very simple piece of code in R:
S20_1 = E[sample(1:17260(E), 20),]
The error message is:
Error in sample(1:17260(E), 20) : attempt to apply non-function
E
is a data frame with 17260 rows. The code is based on the one found here.