From cc394ac94574fb884cf3ac4305c6bffd7e670ab4 Mon Sep 17 00:00:00 2001 From: Joel Nitta Date: Sun, 14 Mar 2021 09:23:01 +0900 Subject: [PATCH 1/4] Update README.md --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f8c2fd7..2a0883a 100644 --- a/README.md +++ b/README.md @@ -24,32 +24,25 @@ The analysis code requires various packages to be installed, and may not work pr [Docker image is provided](https://hub.docker.com/r/joelnitta/moorea_filmies) to run the code reproducibly. You can [install docker from here](https://docs.docker.com/install/). -Navigate to the cloned repository (where `/path/to/repo` is the path on your machine), and launch the container: +First, navigate to the cloned repository (where `/path/to/repo` is the path on your machine). ``` cd /path/to/repo -docker-compose up -d ``` -Unzip the data (this only has to be done once): +Unzip the data: ``` -docker exec moorea_filmies_analysis_1 Rscript R/unzip_data.R +docker run --rm -v ${PWD}:/tmpdir -w /tmpdir joelnitta/moorea_filmies:0.0.1 Rscript R/unzip_data.R ``` Run `targets::tar_make()`: ``` -docker exec moorea_filmies_analysis_1 Rscript -e "targets::tar_make()" +docker run --rm -v ${PWD}:/tmpdir -w /tmpdir joelnitta/moorea_filmies:0.0.1 Rscript -e 'targets::tar_make()' ``` -You will see the targets being built by `targets`, and the final manuscript should be compiled at the end as `manuscript.pdf` and `manuscript.docx` in the `results/ms` folder. Other figure and table files will also be compiled. - -When it's finished, take down the container: - -``` -docker-compose down -``` +You will see the targets being built by `targets`. The final manuscript should be compiled at the end as `manuscript.docx` (MS for journal submission) and `moorea_filmies_preprint.pdf` (preprint PDF) in the `results/ms` folder. Other figure and table files will also be compiled. Supplemental information will be written to the `results/si` folder. ## Licenses From e426b2016aefe782c02f48e4e091280dac3d9f3c Mon Sep 17 00:00:00 2001 From: Joel Nitta Date: Sun, 14 Mar 2021 09:24:17 +0900 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a0883a..c808df9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The analysis code requires various packages to be installed, and may not work pr [Docker image is provided](https://hub.docker.com/r/joelnitta/moorea_filmies) to run the code reproducibly. You can [install docker from here](https://docs.docker.com/install/). -First, navigate to the cloned repository (where `/path/to/repo` is the path on your machine). +Navigate to the cloned repository (where `/path/to/repo` is the path on your machine). ``` cd /path/to/repo From e8d01a6fd7f630a3ca96825f1be468f012fbc384 Mon Sep 17 00:00:00 2001 From: Joel Nitta Date: Sun, 14 Mar 2021 09:24:41 +0900 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c808df9..e63e976 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The analysis code requires various packages to be installed, and may not work pr [Docker image is provided](https://hub.docker.com/r/joelnitta/moorea_filmies) to run the code reproducibly. You can [install docker from here](https://docs.docker.com/install/). -Navigate to the cloned repository (where `/path/to/repo` is the path on your machine). +Navigate to the cloned repository (where `/path/to/repo` is the path on your machine): ``` cd /path/to/repo From f940be645a3d621ed3e345563f96f3b714677df4 Mon Sep 17 00:00:00 2001 From: Joel Nitta Date: Mon, 15 Mar 2021 14:01:01 +0900 Subject: [PATCH 4/4] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index e63e976..640719b 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,22 @@ docker run --rm -v ${PWD}:/tmpdir -w /tmpdir joelnitta/moorea_filmies:0.0.1 Rscr You will see the targets being built by `targets`. The final manuscript should be compiled at the end as `manuscript.docx` (MS for journal submission) and `moorea_filmies_preprint.pdf` (preprint PDF) in the `results/ms` folder. Other figure and table files will also be compiled. Supplemental information will be written to the `results/si` folder. +## Interacting with the code + +If you want to interact with the code in the Docker container, you can launch the container in the background using `docker-compose`: + +``` +docker-compose up -d +``` + +Navigate to http://localhost:8787/ in your browser of choice (firefox or google chrome recommended). There, you should be able to access an instance of the [RStudio](https://rstudio.com/) IDE, which can be used to inspect and manipulate objects in R. + +When you're done, take down the container: + +``` +docker-compose down +``` + ## Licenses - All code in this repository is licensed under the [MIT license](LICENSE)