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

Error in ncol(p_matrix) : could not find function "ncol" #26

Open
jules32 opened this issue Sep 12, 2017 · 0 comments
Open

Error in ncol(p_matrix) : could not find function "ncol" #26

jules32 opened this issue Sep 12, 2017 · 0 comments

Comments

@jules32
Copy link
Contributor

jules32 commented Sep 12, 2017

Question from @rroxana10 from the UKI assessment:

unfortunately while the CalculateAll function is running, I get an error when it tries to calculate pressures for each region:
Calculating Pressures for each region...
Error in ncol(p_matrix) : could not find function "ncol"
As usual, I tried to fix it, added the base package again and tried to figure out what is wrong, but I really can't figure it out. I even tried to add up the base library again but it still doesn't work. I have updated the repository with the changes I've made, if you want to take a look.
Do you have any ideas why this error is occuring?

This is actually due to a known issue in the tidyr package. But in the meantime, have improved the affected code in the ohicore package. This fix is currently in the @dev branch of ohicore but you can install that directly from GitHub.
So, you can do the following:

## uninstall ohicore
remove.packages("ohicore") 

## reinstall ohicore from the dev branch: 
source('install_ohicore.R') # note the @dev: `devtools::install_github('ohi-science/ohicore@dev')`

## Calculate Scores
source('calculate_scores.R')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant