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

read.fstat and read.genepop do not treat missing data correctly #71

Closed
zkamvar opened this issue Jul 16, 2015 · 3 comments
Closed

read.fstat and read.genepop do not treat missing data correctly #71

zkamvar opened this issue Jul 16, 2015 · 3 comments
Assignees
Labels

Comments

@zkamvar
Copy link
Collaborator

zkamvar commented Jul 16, 2015

They both read missing data as "0"

MWE:

library(adegenet)
gobj <- read.genepop(system.file("files/nancycats.gen",package="adegenet"))
fobj <- read.fstat(system.file("files/nancycats.dat",package="adegenet"))
all(propTyped(gobj) == 1)
## [1] TRUE
all(propTyped(fobj) == 1)
## [1] TRUE
data(nancycats)
all(propTyped(nancycats) == 1)
## [1] FALSE
@zkamvar zkamvar added the bug label Jul 16, 2015
@zkamvar
Copy link
Collaborator Author

zkamvar commented Jul 16, 2015

@thibautjombart thibautjombart self-assigned this Jul 16, 2015
@thibautjombart
Copy link
Owner

Thanks for the report! I'll sort this out today.

thibautjombart added a commit that referenced this issue Jul 16, 2015
@thibautjombart
Copy link
Owner

Fixed. As of 2ab99e3:

> sum(is.na(tab(nancycats)))
[1] 617
> sum(is.na(tab(gobj)))
[1] 617
> sum(is.na(tab(fobj)))
[1] 617

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

2 participants