Skip to content
Discussion options

You must be logged in to vote

Maybe its your (mis)usage of sample?
I believe you are supposed to provide a vector of values to sample from. so it should be
sample(x = c(1:length(cellNames(CD4Test)), size = cellRange[i]*2+22)
Otherwise, with the way you are using it, you randomly sample (without replacement) the numbers from 1 to cellRange[i]*2+22

for ex.

> sample(5)
[1] 4 2 1 5 3

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@markphillippebworth
Comment options

Answer selected by rcorces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants