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

Provide API to query for polymorphic and uncertain states #175

Closed
hlapp opened this issue Oct 14, 2018 · 0 comments
Closed

Provide API to query for polymorphic and uncertain states #175

hlapp opened this issue Oct 14, 2018 · 0 comments
Labels

Comments

@hlapp
Copy link
Contributor

hlapp commented Oct 14, 2018

To enable users to make their own decisions about how to code and how to count polymorphic and uncertain character states in downstream analysis, should provide an API along the following capabilities:

  • is_polymorphic() and is_uncertain(): predicate functions, would return a TRUE/FALSE matrix in the same arrangement as the character matrix.

This is carved out from #172. Originally this included the ability to include member states as well, which is now moved to #187.

@hlapp hlapp added the use-case label Oct 14, 2018
@hlapp hlapp changed the title Provide API to query for polymorphic and uncertain states and their member states Provide API to query for polymorphic and uncertain states Oct 26, 2018
hlapp added a commit that referenced this issue Oct 26, 2018
The algorithm implemented here keeps the previous mechanism for column
type coercion, however it is now only applied for characters that don't
have a polymorpic or uncertain state.

Accomplishing this without depending on correctly second-guessing the
symbol requires knowing for each state whether it is polymorphic,
uncertain, or "standard". To not have do this work again if the user
wants to have this knowledge as well, we return this on demand in the
form of a second matrix whose columns are factors with levels `standard`,
`polymorphic`, and `uncertain`. The matrix will have `NA` where the
state is `NA`.

Fixes #186. Closes #175.
cboettig pushed a commit that referenced this issue Oct 26, 2018
…tes (#188)

* Fixes type coercion for morphological characters with polymorphic states

The algorithm implemented here keeps the previous mechanism for column
type coercion, however it is now only applied for characters that don't
have a polymorpic or uncertain state.

Accomplishing this without depending on correctly second-guessing the
symbol requires knowing for each state whether it is polymorphic,
uncertain, or "standard". To not have do this work again if the user
wants to have this knowledge as well, we return this on demand in the
form of a second matrix whose columns are factors with levels `standard`,
`polymorphic`, and `uncertain`. The matrix will have `NA` where the
state is `NA`.

Fixes #186. Closes #175.

* Adds tests for obtaining state type matrix from get_characters

* Regenerates man page for get_characters()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant