# NOT RUN {
# Subsample without replacement, keeping all taxa
sample_n_obs(unite_ex_data_3, 100)
# Subsample without replacement and remove unsampled taxa
sample_n_obs(unite_ex_data_3, 100, unobserved = FALSE)
# Subsample with taxon weight
sample_n_obs(unite_ex_data_3, 100, unobserved = FALSE, taxon_weight = 1 / n_obs)
# Sample with replacement
sample_n_obs(unite_ex_data_3, 10000, replace = TRUE)
# }
Run the code above in your browser using DataLab