HeRAMS_filter_hf | R Documentation |
Filter the HeRAMS health facility raw table for different analysis scenario and export a table that contains only the selected facilities.
HeRAMS_filter_hf(
mainPath,
location,
pathTableCode = NULL,
pathTableText = NULL,
scenario = NULL,
mostRecentObs = NULL,
defaultParameters = TRUE,
region = FALSE,
type = FALSE,
ownership = TRUE,
status = TRUE,
building = FALSE,
equipment = FALSE,
functionality = FALSE,
accessibility = FALSE,
support = FALSE,
services = FALSE,
partners = FALSE,
barriers = FALSE,
testMode = FALSE
)
mainPath |
character; the parent directory of the location folder |
location |
character; the location folder name |
pathTableCode |
character; path to the HeRAMS CSV table with text for responses ("Available") |
pathTableText |
character; path to the HeRAMS CSV table with codes for responses ("A1") |
scenario |
character; a string of three characters that correspond to the scenario folder suffix like '001', '002'...'010'...'099'...'100' The criteria for selection are those of the specified scenario. If NULL, an interactive selection by attribute is run in the console. |
mostRecentObs |
logical; should the most recent observation per health facility be taken into account? If NULL or FALSE, the user is asked to choose among four methods for selection based on time observation (most recent, date limit or case by case). |
defaultParameters |
logical; should the default HeRAMS table parameters (e.g. column names) be used? If not, the user is able to modify it. |
type |
logical; should the facilities be filtered based on their types. |
ownership |
logical; should the facilities be filtered based on their ownership. |
status |
logical; should the facilities be filtered based on their status. |
building |
logical; should the facilities be filtered based on the building condition. |
equipment |
logical; should the facilities be filtered based on the equipment condition. |
functionality |
logical; should the facilities be filtered based on their functionality. |
accessibility |
logical; should the facilities be filtered based on their accessibility. |
support |
logical; should the facilities be filtered based on whether they receive support from partners. |
services |
logical; should the facilities be filtered based on health services information. |
partners |
logical; should the facilities also be filtered on the different possible supporting partners (ignored if support is FALSE) |
barriers |
logical; should the facilities also be filtered on the causes of possible impairment (e.g. service not available). |
testMode |
logical; FALSE by default. If TRUE, and pathTableCode and pathTableText are NULL, example data is automatically loaded. |
The selection is recorded within a text file (selected_hf.txt) stored in the scenario folder. Different analysis scenario create new scenario folders. In the same scenario folder different 'raw' sub-folders may be created depending on the original Excel document modification time, and the selection of observations based on time.
# Replace workDir with the actual path to your working directory
## Not run:
mainPath <- "workDir"
initiate_project(mainPath)
## End(Not run)
# Replace myLocation with the location name you are working on (workDir subfolder)
# Replace myHeRAMScodeTable with the path of the HeRAMS table that contains codes; set to NULL to use example data
# Replace myHeRAMStextTable with the path of the HeRAMS table that contains text; set to NULL to use example data
## Not run:
location <- "myLocation"
pathTableCode <- "myHeRAMScodeTable"
pathTableText <- "myHeRAMStextTable"
HeRAMS_filter_hf(mainPath, location, pathTableCode, pathTableText, barriers = FALSE, mostRecentObs = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.