R-package to be used to produce maps on the helseatlas.no web page.
# Install the data package
devtools::install_github("helseatlas/data")
# Install the maps package
devtools::install_github("helseatlas/kart")
# Install the helseatlas package
devtools::install_github("helseatlas/helseatlas")
If you are behind a proxy, you have to run the following commands before the devtools::install_github
-commands:
Sys.setenv(http_proxy="your.proxy.url:port")
Sys.setenv(https_proxy="your.proxy.url:port")
If you want to keep the proxy settings active when restarting R you can include the following in a file called .Renviron
:
http_proxy="your.proxy.url:port"
https_proxy="your.proxy.url:port"
This file has to be saved in your $HOME
directory, which typically is something like c:/Users/<username>
on Windows.
helseatlas::run_app()
git clone git@github.com:helseatlas/helseatlas
helseatlas
folder in RStudiodevtools::install_github("helseatlas/helseatlas")
. This will install the helseatlas package from github and at the same time install all the required packages.git clone git@github.com:helseatlas/helseatlas
cd helseatlas
git checkout -b super-duper-idea
git push -u origin super-duper-idea
git add .
git commit -m 'My super duper idea'
git push
The packages testhat
and shinytest
have to be installed if you want to test your local version of helseatlas
. In addition, you must install PhantomJS
. The latter can be installed with the following R command:
shinytest::installDependencies()
The package can then be tested by devtools
:
devtools::test()
Run the following command to update the documentation in man/
:
roxygen2::roxygenise()
This repository is mainly using LF (unix-style) line endings. If you are using Windows, please use git config --global core.autocrlf false
if you want full control (take a look at this post). Files can be converted from Windows-style file endings to unix-style by dos2unix filename
in git bash. In RStudio you can go into Tools/Global options/Code/Saving
and choose Line ending conversion to None.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.