knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
An R package to make it easy to view, copy, interact and publish the data products resulting from the Access to Care analysis. It also contains handly utlity functions, and the data needed to create a consistent set of examples across the multiple data product types.
This project combines US CENSUS population data with hospital data provided by Medicare. A linear model is used to determine if a county is over, or under served based on the size of the population.
Install accesstocare
from GitHub using:
devtools::install_github("sol-eng/accesstocare")
library(accesstocare)
To view the available examples, use atc_packate_content()
. It returns a list
object with all of the available content. It is presented in the console, or RMarkdown, as a table.
atc_package_content()
There are three ways to use the examples:
atc_open_content()
atc_copy_content()
atc_copy_all_content()
atc_open_content()
atc_package_content() cat("17 Cancel ") cat("Enter the content number: ")
Enter the number to the left of the example in order to run it. For example, to open the flexdashboard
example, type 3 and press enter.
To run an example without the prompt, pass the content_no
argument with the number. Again, to open the flexdashboard
use:
atc_open_content(3)
An example can be copied to your working directory by using atc_copy_content()
. It will create a new sub-folder and load the files for that particular example.
It has the same interactive mechanism as the open example function.
atc_copy_content()
atc_package_content() cat("17 Cancel ") cat("Enter the content number: ")
To avoid the interactive menu, pass the number to the left of the example, as an argument of the function:
atc_copy_content(3) # Copies the `flexdashboard` folder
atc_copy_all_content()
will copy all of the examples. It will as many sub-folders as there are examples available.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.