I40 defaultdatareformatting localchanges#41
Open
solveigvandervegt wants to merge 8 commits into
Open
Conversation
Sumali helpfully pointed out that I had it switched, and that in the data tables, contrary to in the heatmaps, the rows are individuals and that columns represent their contacts. This has now been corrected in the documentation.
Wrote a function (create_excel) that takes an excel template (Template_CoMo_CountryData_temp.xlsx), edits it to be country-specific and then saves it as a new excel file. The name of the new excel file is returned so the file can be processed as it is now. Documentation of the data sets cases, population, country_demog is added. mort_sever_data is standard across countries and thus already in the excel template. age_categories is not required, but I do not know how to delete mort_sever_data and age_categories from the data_CoMo.RData file.
Forgot to add line with data files to last three additions to data documentation
to specify that this package is required for running the model (particularly you need it for the create_excel())
Instead of requiring and loading XLConnect within the function, now XLConnect:: is used to call the specific functions from this package. Hopefully this will fix the issues in testing.
the excel templates were moved to a new inst/extdata folder. The country-specific excel sheet is also saved to this folder as excel data appearantly needs to be kept separate from R data. I foresee some problems with this as the internet says that during installation of the package, folders within inst are copied into the main folder, in which case the function is directing to the wrong folder as it specifically directs to inst/extdata. If this does turn out to be a problem, there will be another commit fixing this :)
Contributor
Author
|
I seem to have gotten all the tests to pass now @ben18785 |
|
@solveigvandervegt I could be wrong, but I don't think you intended to add the file R/Untitled.RData to your branch. |
Contributor
Author
|
@cosmicnet Tbh I haven't looked at this in months so not entirely sure how it got there or why I put it there but looking at it quickly, I don't think anything will immediately break if you want to delete it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created the function create_excel(country) which takes a specific country for the input and creates a country-specific excel sheet from the template file. It returns the name of the new excel file so it can be processed the same as now. I tested that this function works as desired on my laptop but I haven't put it into any CoMo code (mainly cause I couldn't find any code to put it into).
Documentation of data sets was updated as well.