Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing "avgdist silently drops observations" #251

Merged
merged 4 commits into from
Sep 16, 2017

Conversation

Microbiology
Copy link
Contributor

As described in issue #246, samples were being dropped silently if they failed to meet the subsampling threshold. I fixed that by including printed text identifying the removed samples.

Copy link
Contributor

@jarioksa jarioksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails with error in running examples.

@@ -11,7 +11,10 @@
transf <- match.fun(transf)
# Get the list of iteration matrices
distlist <- lapply(seq_len(iterations), function(i) {
inputcast <- rrarefy(x, sample = sample)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails examples: no inputcast found. You removed it from this line, and reference it later.

R/avgdist.R Outdated
# Print any samples that were removed, if they were removed
if(nrow(x) != nrow(output)) {
dropsamples <- setdiff(row.names(inputcast), row.names(output))
write(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

canonical way of printing warnings is to use warning().

@Microbiology
Copy link
Contributor Author

Thanks for the comments. I went back and fixed the typos that were losing the data frames, and used warnings to print the warnings. Let me know how it looks, and thanks so much for your feedback! :)

@jarioksa jarioksa merged commit 2bcd09e into vegandevs:master Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants