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