I'm quite new to R, but I'm trying to make a "randomizer" of sorts.
I have a vector
- names <- c('Name1', 'Name2', [...], 'Name13')
I then sample 6 names from the vector to another vector
- name_sample_1 <- sample(names, 6)
What i want is to then update the "names" vector by a line of code, and not have to do it manually. I tried running:
- names <- names - name_sample_1
But this returned the error 'non-numeric argument to binary operator'. Any ideas on how to do this effectively?