Skip to content

Commit 6a4b2da

Browse files
committed
Import project
1 parent 53d6b7a commit 6a4b2da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7582
-0
lines changed

.Rprofile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source("renv/activate.R")

.gitignore

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# History files
2+
.Rhistory
3+
.Rapp.history
4+
5+
# Session Data files
6+
.RData
7+
8+
# User-specific files
9+
.Ruserdata
10+
11+
# Example code in package build process
12+
*-Ex.R
13+
14+
# Output files from R CMD build
15+
/*.tar.gz
16+
17+
# Output files from R CMD check
18+
/*.Rcheck/
19+
20+
# RStudio files
21+
.Rproj.user/
22+
23+
# produced vignettes
24+
vignettes/*.html
25+
vignettes/*.pdf
26+
27+
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
28+
.httr-oauth
29+
30+
# knitr and R markdown default cache directories
31+
*_cache/
32+
/cache/
33+
34+
# Temporary files created by R markdown
35+
*.utf8.md
36+
*.knit.md
37+
38+
# R Environment Variables
39+
.Renviron
40+
41+
# Custom
42+
models/*.rds
43+
results/*
44+
results*
45+
docs/*
46+
*.html

Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Take inspiration from
2+
# https://github.com/jrnold/docker-stan/blob/master/rstan/Dockerfile
3+
4+
FROM rocker/tidyverse:4.1.3
5+
6+
RUN apt-get update \
7+
&& apt-get install -y --no-install-recommends apt-utils ed libnlopt-dev \
8+
&& apt-get clean \
9+
&& rm -rf /var/lib/apt/lists/
10+
11+
# Global site-wide config -- neeeded for building packages
12+
RUN mkdir -p $HOME/.R/ \
13+
&& echo "CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto -ffat-lto-objects -Wno-unused-local-typedefs \n" >> $HOME/.R/Makevars \
14+
&& echo "CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto -ffat-lto-objects -Wno-unused-local-typedefs -Wno-ignored-attributes -Wno-deprecated-declarations\n" >> $HOME/.R/Makevars
15+
16+
# Install rstan
17+
# Instead, we can install rstan by restoring package library with renv (remove dependency on EczemaPredPOEM first)
18+
RUN install2.r --error --deps TRUE \
19+
rstan \
20+
rstantools \
21+
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
22+
23+
# Create a user variable
24+
ENV USER=rstudio
25+
26+
# Create project directory and set it as working directory
27+
WORKDIR /home/$USER/EczemaTreat
28+
29+
# Install R packages to local library using renv
30+
COPY [".Rprofile", "renv.lock", "./"]
31+
COPY renv/activate.R ./renv/
32+
RUN chown -R rstudio . \
33+
&& sudo -u rstudio R -e 'renv::restore(confirm = FALSE, exclude = "TanakaData")'

EczemaTreat.Rproj

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX

0 commit comments

Comments
 (0)