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

changes output of ncbi_children when there are no children #420

Merged
merged 1 commit into from
May 2, 2015
Merged

changes output of ncbi_children when there are no children #420

merged 1 commit into from
May 2, 2015

Conversation

zachary-foster
Copy link
Collaborator

When there are no children for a given taxon, NULL was being returned. This is fine when out_type = "uid", sense length(NULL) = 0 so something like sapply(ncbi_children_output, length) will give the expected results. However, if out_type = "summary" and a list of data.frames are the expected output, sapply(ncbi_children_output, nrow) will have NULLs where 0 would logically be. I changed it so that when out_type = "summary", taxa with no children are represented by a data.frame with no rows, thus producing the expected result.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 569c8af on zachary-foster:master into * on ropensci:master*.

@sckott
Copy link
Contributor

sckott commented May 2, 2015

looks good, thanks @zachary-foster

sckott added a commit that referenced this pull request May 2, 2015
changes output of ncbi_children when there are no children
@sckott sckott merged commit e3d9943 into ropensci:master May 2, 2015
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

3 participants