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

auto-detect number of pvs in pv file #4

Open
markdly opened this issue Mar 28, 2018 · 0 comments
Open

auto-detect number of pvs in pv file #4

markdly opened this issue Mar 28, 2018 · 0 comments

Comments

@markdly
Copy link
Owner

markdly commented Mar 28, 2018

Currently users need to specify the number of plausible values contained in a file when importing.

library(conquestr)
fname <- cq_example(display = FALSE, example_name = "ex1_10.pv") 
pv <- cq_pv(fname, np = 10)  
head(pv)
#> # A tibble: 6 x 4
#>   index val   recid field
#>   <chr> <chr> <int> <chr>
#> 1 1     10001     1 pid  
#> 2 1     3.02      1 pv1  
#> 3 2     3.16      1 pv2  
#> 4 3     2.43      1 pv3  
#> 5 4     5.34      1 pv4  
#> 6 5     2.85      1 pv5

Created on 2018-03-28 by the reprex package (v0.2.0).

It would be better if this was auto-detected on import. Or, at the very least provide a warning if the number of pvs appears to be incorrect for the file specified...

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

No branches or pull requests

1 participant