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

Fix technical issues #27

Merged
merged 33 commits into from
Nov 21, 2024
Merged

Fix technical issues #27

merged 33 commits into from
Nov 21, 2024

Conversation

wlangera
Copy link
Collaborator

No description provided.

@wlangera wlangera mentioned this pull request Nov 12, 2024
@wlangera
Copy link
Collaborator Author

@LBreugelmans I have merged your code with my fixes. There are no errors anymore, but there are still some issues:

  • I cannot run the README.Rmd. This is because this path does not exist (empty): pa_filepath <- system.file("extdata","protected_areas_NPHogeKempen.shp", package = "pdindicatoR")
  • get_pd() uses mcube object which does not exist. You should only use variables from the function itself.

image

@wlangera
Copy link
Collaborator Author

Just to clarify. It is not so urgent that I can run the README.Rmd. It is just that I cannot create the README.md file.
You can knit the README.Rmd file and commit the README.md. This way we do not have to worry at this time about the large files.

The second part about get_pd() using the global variable mcube is most important.

Optional data argument added and code updated to allow for selection of example dataset

Signed-off-by: LBreugelmans <[email protected]>
- pull in pa (Protected Area) shapefile within function
- make sure map is saved correctly when no cutoff is provided

Signed-off-by: LBreugelmans <[email protected]>
Use function retrieve_example_data() to read in example data files

Signed-off-by: LBreugelmans <[email protected]>
- In order to resolve problem with argument mcube, the aggregate_cube() and calculate_faithpd functions are now being called in the function get_pd_cube() which replaces get_pd()
Mostly due to incorrect specifications in function examples
@LBreugelmans LBreugelmans merged commit 186f066 into main Nov 21, 2024
5 of 6 checks passed
@LBreugelmans LBreugelmans deleted the fix-technical-issues branch November 21, 2024 15:34
@LBreugelmans
Copy link
Collaborator

LBreugelmans commented Nov 22, 2024

@wlangera I have solved the issues you mentioned:

  • the example data shapefile should be available from the mentioned path once the package is installed
  • I have created the overarching function get_pd_cube() to replace get_pd(), which takes mcube as a parameter and calls on the functions aggregate_cube() and calculate_faithpd()

I am running into problems knitting README.Rmd because in the second chunk the package gets loaded from the repo main branch, which currently contains an older version. I need to first merge this branch with main in order to knit the README.Rmd.

Unsure why Mac OS check did not pass.

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

Successfully merging this pull request may close these issues.

2 participants