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

Misnamed covariate column #37

Open
cstawitz opened this issue Dec 24, 2019 · 2 comments
Open

Misnamed covariate column #37

cstawitz opened this issue Dec 24, 2019 · 2 comments

Comments

@cstawitz
Copy link

on lines 39 of make_covariates() you have:

 DF_ip = cbind(sample_data, covariate_data[rep(1, nrow(sample_data)), 
    covariate_names])

Instead of making the covariate column name covariate_names, the covariate column name is covariate_data[rep(1, nrow(sample_data)), covariate_names. This leads to creation of duplicate covariate columns later on and then the rbind(DF_ip,DF_zp) fails. I think you need a statement like the following on the next line to name the covariate column(s) correctly:

names(df)[4:(3+length(covariate_names)] <- covariate_names
@James-Thorson-NOAA
Copy link
Owner

I think this is already fixed on the development branch. Perhaps I should also push this to the main branch for now as a bug-fix (incrementing the last digit on the semantic version-number). I'll think about doing that in January and feel free to remind me then.

@cstawitz
Copy link
Author

cstawitz commented Dec 24, 2019

Thanks - I will use development for now. The result is that make_covariates is broken in the master branch. if you don't want to push as a hotfix to master, you could make the Remotes: field in the DESCRIPTION of VAST call the development branch of FishStatsUtils instead so those installing it as a VAST dependency get the fix.

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

2 participants