Skip to content

Documentation for NA term #109

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

Closed
koperagen opened this issue May 13, 2022 · 1 comment
Closed

Documentation for NA term #109

koperagen opened this issue May 13, 2022 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation (not KDocs)
Milestone

Comments

@koperagen
Copy link
Collaborator

This term is used in valueCounts and statistical operations: std, mean, varianceAndMean
https://kotlin.github.io/dataframe/valuecounts.html
In documentation, there is no explanation of what it means. What's the difference from NaN?
In the following function, skipNA used when the value is NaN.

public fun Sequence<Float>.mean(skipNA: Boolean = skipNA_default): Double {
    var count = 0
    var sum: Double = 0.toDouble()
    for (element in this) {
        if (element.isNaN()) {
            if (skipNA) continue
            else return Double.NaN
        }
        sum += element
        count++
    }
    return if (count > 0) sum / count else Double.NaN
}
@Jolanrensen
Copy link
Collaborator

I mentioned it in the KDocs in #214, but indeed, we need it on the documentation website too.

@zaleslaw zaleslaw added this to the 0.11.0 milestone Apr 17, 2023
@zaleslaw zaleslaw added the documentation Improvements or additions to documentation (not KDocs) label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation (not KDocs)
Projects
None yet
Development

No branches or pull requests

3 participants