Skip to contents

Installation from GitHub

charite is a minimal R package with a custom ggplot2 theme, colour palettes styled to match the visual identity of Charité – Universitätsmedizin Berlin and publication-ready plot rendering.
The package was developed by Johannes Julius Mohn.

You can install the package directly from GitHub.

# install.packages("devtools") # install `devtools` if not yet available
devtools::install_github("johannesjuliusm/charite")

Installation from source

If you are working on a computer with proxies, installation requires a little workaround. A proxy is an intermediary server that handles your internet traffic. This setup is common in corporate, university, or government networks where internet access is controlled or filtered.

Go to the GitHub page and download the package tarball (.tar.gz) from the Releases tab in the navigation pane on the right. Unzip the file in a chosen location on your computer, e.g., the Downloads folder, and install the package from source.

# install `charite` from tarball
# replace with your path
install.packages("~/Downloads/charite_0.4.0.tar.gz", repos = NULL, type = "source")

Working on a computer with proxies

charite requires the ggplot2, svglite, grid, and grDevices packages. To install them from the CRAN, simply use install.packages("packageName"). To install R packages on a machine behind a proxy, you first need to configure the proxy settings so R can connect to the CRAN or GitHub through it.

# create or write to existing .Rprofile
path2rprofile <- file.path(Sys.getenv("HOME"), ".Rprofile")
file.edit(path2rprofile)

# set proxies
# if your proxy requires authentication, use username:password@proxy.charite.de:8080
cat('Sys.setenv(http_proxy = "http://proxy.charite.de:8080")\n',
    'Sys.setenv(https_proxy = "http://proxy.charite.de:8080")\n',
    file = path2rprofile,
    append = TRUE)

# reload the .Rprofile settings
source(path2rprofile)

Once set, in RStudio go to Tools > Global Options > Packages and untick “Use Internet Explorer library/proxy for HTTP” and restart your R session. Note that this option may no longer be available in the latest versions of R/RStudio. Instead, try downloading and installing packages using wininet (Windows only) or libcurl.

# use "wininet" (a Windows-specific internet method) when installing a package
install.packages("packageName", method = "wininet")

# make this option permanent by saving it to your .Rprofile
cat('options(download.file.method = "wininet")\n', 
    file = file.path(Sys.getenv("HOME"), ".Rprofile"),
    append = TRUE)