powered by
list.sample(.data, size, replace = FALSE, weight = 1, prob = NULL)
list
vector
integer
logical
prob
NULL
x <- list(a = 1, b = c(1,2,3), c = c(2,3,4)) list.sample(x, 2, weight = sum(.))
Run the code above in your browser using DataLab