From dba15fc3c90456b204496c78fda055f4520861ef Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:56:41 +0200 Subject: [PATCH 1/6] change doi to latest version of db --- code/download_data.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/download_data.R b/code/download_data.R index 672b686..aaea2f8 100644 --- a/code/download_data.R +++ b/code/download_data.R @@ -2,6 +2,6 @@ # download latest version of the database from Zenodo, https://zenodo.org/doi/10.5281/zenodo.10782428 cat("Downloading raw data\n") -zen4R::download_zenodo("10.5281/zenodo.10782428", path = "data/") +zen4R::download_zenodo("10.5281/zenodo.12698765", path = "data/") cat("Data successfully downloaded! \n") \ No newline at end of file From de460bf393e1f4653c6e7cd6b35f4e873d5efa43 Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:57:04 +0200 Subject: [PATCH 2/6] update necton/benthos definition --- code/make_maps.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/make_maps.R b/code/make_maps.R index e7908b2..bbbb9f9 100644 --- a/code/make_maps.R +++ b/code/make_maps.R @@ -113,12 +113,12 @@ ggsave("othermolluscs.pdf",width=9,height=5) # plot groups split into plankton, benthos, necton and large marine vertebrates # plankton: planktic_foraminifera, nanoplankton, dinocysts -# benthos: benthic_foraminifera, bryozoans, molluscs, echinoids, corals -# necton: fish, ostracods +# benthos: benthic_foraminifera, ostracods, bryozoans, molluscs, echinoids, corals +# necton: fish # large marine vertebrates: sharks, marine mammals plankton<-rbind(pforams,nano,dino) -benthos<-rbind(bforams,bryo,othermolluscs,gastr,biv,echinoids,corals) -necton<-rbind(fish,ostracods) +benthos<-rbind(bforams,ostracods,bryo,othermolluscs,gastr,biv,echinoids,corals) +necton<-rbind(fish) large_mar_vert<-rbind(sharks,mmammals) ggmap(Med_map)+geom_point(data=plankton,color="gold1",aes(shape=Age))+geom_point(data=benthos,color="red",aes(shape=Age))+geom_point(data=necton,color="blue",aes(shape=Age))+geom_point(data=large_mar_vert,color="green",aes(shape=Age)) From 1f3e0085b3132a0624077cf2476343615474b905 Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:57:18 +0200 Subject: [PATCH 3/6] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16285ac..82f629e 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ in the console. Details on producing the map are given in the file `code/make_ma * _make_table.R_ : script to generate table 1 * _make_maps.R_ : script to generate the maps * _download_data.R_ : script to download data from Zenodo -* _data_ : folder for raw data. Initially empty, will be filled with downloaded data after the script in `code/download_data` is run. +* _data_ : folder for raw data. Initially empty, will be filled with downloaded data after the script in `code/download_data.R` is run. * _figs_ : folder for figures. Initially empty * _renv_ : folder used by the `renv` package * _.gitignore_ : untracked files From 449cf9e1c243afd397fdeb5f9e9a7e8fc5ff692a Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:57:33 +0200 Subject: [PATCH 4/6] update recorded packages --- renv.lock | 241 +++++++++++++++++++++++------------------------- renv/activate.R | 80 ++++++++++++---- 2 files changed, 175 insertions(+), 146 deletions(-) diff --git a/renv.lock b/renv.lock index 84e91ca..50548df 100644 --- a/renv.lock +++ b/renv.lock @@ -11,14 +11,14 @@ "Packages": { "DBI": { "Package": "DBI", - "Version": "1.2.2", + "Version": "1.2.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "164809cd72e1d5160b4cb3aa57f510fe" + "Hash": "065ae649b05f1ff66bb0c793107508f5" }, "MASS": { "Package": "MASS", @@ -85,7 +85,7 @@ }, "XML": { "Package": "XML", - "Version": "3.99-0.16", + "Version": "3.99-0.17", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -93,7 +93,7 @@ "methods", "utils" ], - "Hash": "131e2febe15d5bbca3a37bd69e71b873" + "Hash": "bc2a8a1139d8d4bd9c46086708945124" }, "askpass": { "Package": "askpass", @@ -136,13 +136,13 @@ }, "backports": { "Package": "backports", - "Version": "1.4.1", + "Version": "1.5.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "c39fbec8a30d23e721980b8afb31984c" + "Hash": "e1e1b9d75c37401117b636b7ae50827a" }, "base64enc": { "Package": "base64enc", @@ -206,14 +206,13 @@ }, "broom": { "Package": "broom", - "Version": "1.0.5", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "backports", "dplyr", - "ellipsis", "generics", "glue", "lifecycle", @@ -223,17 +222,18 @@ "tibble", "tidyr" ], - "Hash": "fd25391c3c4f6ecf0fa95f1e6d15378c" + "Hash": "a4652c36d1f8abfc3ddf4774f768c934" }, "bslib": { "Package": "bslib", - "Version": "0.6.1", + "Version": "0.7.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "cachem", + "fastmap", "grDevices", "htmltools", "jquerylib", @@ -244,22 +244,22 @@ "rlang", "sass" ], - "Hash": "c0d8599494bc7fb408cd206bbdd9cab0" + "Hash": "8644cc53f43828f19133548195d7e59e" }, "cachem": { "Package": "cachem", - "Version": "1.0.8", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "fastmap", "rlang" ], - "Hash": "c35768291560ce302c0a6589f92e837d" + "Hash": "cd9a672193789068eb5a2aad65a0dedf" }, "callr": { "Package": "callr", - "Version": "3.7.5", + "Version": "3.7.6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -268,7 +268,7 @@ "processx", "utils" ], - "Hash": "9f0e4fae4963ba775a5e5c520838c87b" + "Hash": "d7e13f49c19103ece9e58ad2d83a7354" }, "cellranger": { "Package": "cellranger", @@ -284,14 +284,14 @@ }, "cli": { "Package": "cli", - "Version": "3.6.1", + "Version": "3.6.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "89e6d8219950eac806ae0c489052048a" + "Hash": "b21916dd77a27642b447374a5d30ecf3" }, "clipr": { "Package": "clipr", @@ -319,10 +319,10 @@ }, "commonmark": { "Package": "commonmark", - "Version": "1.9.0", + "Version": "1.9.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "d691c61bff84bd63c383874d2d0c3307" + "Hash": "5d8225445acb167abf7797de48b2ee3c" }, "conflicted": { "Package": "conflicted", @@ -349,7 +349,7 @@ }, "crayon": { "Package": "crayon", - "Version": "1.5.2", + "Version": "1.5.3", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -357,32 +357,32 @@ "methods", "utils" ], - "Hash": "e8a1e41acf02548751f45c718d55aa6a" + "Hash": "859d96e65ef198fd43e82b9628d593ef" }, "curl": { "Package": "curl", - "Version": "5.2.0", + "Version": "5.2.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "ce88d13c0b10fe88a37d9c59dba2d7f9" + "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" }, "data.table": { "Package": "data.table", - "Version": "1.15.2", + "Version": "1.15.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "536dfe4ac4093b5d115caed7a1a7223b" + "Hash": "8ee9ac56ef633d0c7cab8b2ca87d683e" }, "dbplyr": { "Package": "dbplyr", - "Version": "2.4.0", + "Version": "2.5.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -406,7 +406,7 @@ "vctrs", "withr" ], - "Hash": "59351f28a81f0742720b85363c4fdd61" + "Hash": "39b2e002522bfd258039ee4e889e0fd1" }, "desc": { "Package": "desc", @@ -423,14 +423,14 @@ }, "digest": { "Package": "digest", - "Version": "0.6.34", + "Version": "0.6.36", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "7ede2ee9ea8d3edbf1ca84c1e333ad1a" + "Hash": "fd6824ad91ede64151e93af67df6376b" }, "dplyr": { "Package": "dplyr", @@ -474,27 +474,16 @@ ], "Hash": "54ed3ea01b11e81a86544faaecfef8e2" }, - "ellipsis": { - "Package": "ellipsis", - "Version": "0.3.2", - "Source": "Repository", - "Repository": "CRAN", - "Requirements": [ - "R", - "rlang" - ], - "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" - }, "evaluate": { "Package": "evaluate", - "Version": "0.23", + "Version": "0.24.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "daf4a1246be12c1fa8c7705a0935c1a0" + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" }, "fansi": { "Package": "fansi", @@ -510,17 +499,17 @@ }, "farver": { "Package": "farver", - "Version": "2.1.1", + "Version": "2.1.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "8106d78941f34855c440ddb946b8f7a5" + "Hash": "680887028577f3fa2a81e410ed0d6e42" }, "fastmap": { "Package": "fastmap", - "Version": "1.1.1", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "f7736a18de97dea803bde0a2daaafb27" + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" }, "filelock": { "Package": "filelock", @@ -562,14 +551,14 @@ }, "fs": { "Package": "fs", - "Version": "1.6.3", + "Version": "1.6.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "methods" ], - "Hash": "47b5f30c720c23999b913a1a635cf0bb" + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" }, "gargle": { "Package": "gargle", @@ -634,7 +623,7 @@ }, "ggplot2": { "Package": "ggplot2", - "Version": "3.5.0", + "Version": "3.5.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -655,7 +644,7 @@ "vctrs", "withr" ], - "Hash": "52ef83f93f74833007f193b2d4c159a2" + "Hash": "44c6a2f8202d5b7e878ea274b1092426" }, "ggthemes": { "Package": "ggthemes", @@ -742,7 +731,7 @@ }, "gtable": { "Package": "gtable", - "Version": "0.3.4", + "Version": "0.3.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -753,7 +742,7 @@ "lifecycle", "rlang" ], - "Hash": "b29cf3031f49b04ab9c852c912547eef" + "Hash": "e18861963cbc65a27736e02b3cd3c4a0" }, "haven": { "Package": "haven", @@ -778,14 +767,14 @@ }, "highr": { "Package": "highr", - "Version": "0.10", + "Version": "0.11", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "xfun" ], - "Hash": "06230136b2d2b9ba5805e1963fa6e890" + "Hash": "d65ba49117ca223614f71b60d85b8ab7" }, "hms": { "Package": "hms", @@ -803,20 +792,19 @@ }, "htmltools": { "Package": "htmltools", - "Version": "0.5.7", + "Version": "0.5.8.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "base64enc", "digest", - "ellipsis", "fastmap", "grDevices", "rlang", "utils" ], - "Hash": "2d7b3857980e0e0d0a1fd6f11928ab0f" + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" }, "httr": { "Package": "httr", @@ -907,7 +895,7 @@ }, "knitr": { "Package": "knitr", - "Version": "1.45", + "Version": "1.48", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -919,7 +907,7 @@ "xfun", "yaml" ], - "Hash": "1ec462871063897135c1bcbe0fc8f07d" + "Hash": "acf380f300c721da9fde7df115a5f86f" }, "labeling": { "Package": "labeling", @@ -934,7 +922,7 @@ }, "lattice": { "Package": "lattice", - "Version": "0.22-5", + "Version": "0.22-6", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -945,7 +933,7 @@ "stats", "utils" ], - "Hash": "7c5e89f04e72d6611c77451f6331a091" + "Hash": "cc5ac1ba4c238c7ca9fa6a87ca11a7e2" }, "lifecycle": { "Package": "lifecycle", @@ -1041,18 +1029,18 @@ }, "munsell": { "Package": "munsell", - "Version": "0.5.0", + "Version": "0.5.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "colorspace", "methods" ], - "Hash": "6dfe8bf774944bd5595785e3229d8771" + "Hash": "4fd8900853b746af55b81fda99da7695" }, "nlme": { "Package": "nlme", - "Version": "3.1-164", + "Version": "3.1-165", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1062,17 +1050,17 @@ "stats", "utils" ], - "Hash": "a623a2239e642806158bc4dc3f51565d" + "Hash": "2769a88be217841b1f33ed469675c3cc" }, "openssl": { "Package": "openssl", - "Version": "2.1.1", + "Version": "2.2.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "askpass" ], - "Hash": "2a0dc8c6adfb6f032e4d4af82d258ab5" + "Hash": "2bcca3848e4734eb3b16103bc9aa4b8e" }, "pillar": { "Package": "pillar", @@ -1093,7 +1081,7 @@ }, "pkgbuild": { "Package": "pkgbuild", - "Version": "1.4.3", + "Version": "1.4.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1104,7 +1092,7 @@ "desc", "processx" ], - "Hash": "c0143443203205e6a2760ce553dafc24" + "Hash": "a29e8e134a460a01e0ca67a4763c595b" }, "pkgconfig": { "Package": "pkgconfig", @@ -1118,24 +1106,25 @@ }, "pkgload": { "Package": "pkgload", - "Version": "1.3.4", + "Version": "1.4.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "cli", - "crayon", "desc", "fs", "glue", + "lifecycle", "methods", "pkgbuild", + "processx", "rlang", "rprojroot", "utils", "withr" ], - "Hash": "876c618df5ae610be84356d5d7a5d124" + "Hash": "2ec30ffbeec83da57655b850cf2d3e0e" }, "plyr": { "Package": "plyr", @@ -1170,7 +1159,7 @@ }, "processx": { "Package": "processx", - "Version": "3.8.3", + "Version": "3.8.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1179,7 +1168,7 @@ "ps", "utils" ], - "Hash": "82d48b1aec56084d9438dbf98087a7e9" + "Hash": "0c90a7d71988856bad2a2a45dd871bb9" }, "progress": { "Package": "progress", @@ -1197,14 +1186,14 @@ }, "ps": { "Package": "ps", - "Version": "1.7.6", + "Version": "1.7.7", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "dd2b9319ee0656c8acf45c7f40c59de7" + "Hash": "878b467580097e9c383acbb16adab57a" }, "purrr": { "Package": "purrr", @@ -1223,14 +1212,14 @@ }, "ragg": { "Package": "ragg", - "Version": "1.2.7", + "Version": "1.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "systemfonts", "textshaping" ], - "Hash": "90a1b8b7e518d7f90480d56453b4d062" + "Hash": "e3087db406e079a8a2fd87f413918ed3" }, "rappdirs": { "Package": "rappdirs", @@ -1260,7 +1249,7 @@ }, "readr": { "Package": "readr", - "Version": "2.1.4", + "Version": "2.1.5", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1279,7 +1268,7 @@ "utils", "vroom" ], - "Hash": "b5047343b3825f37ad9d3b5d89aa1078" + "Hash": "9de96463d2117f6ac49980577939dfb3" }, "readxl": { "Package": "readxl", @@ -1327,17 +1316,14 @@ }, "renv": { "Package": "renv", - "Version": "1.0.3", - "Source": "Repository", + "Version": "1.0.7", + "OS_type": null, "Repository": "CRAN", - "Requirements": [ - "utils" - ], - "Hash": "41b847654f567341725473431dd0d5ab" + "Source": "Repository" }, "reprex": { "Package": "reprex", - "Version": "2.0.2", + "Version": "2.1.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1355,22 +1341,22 @@ "utils", "withr" ], - "Hash": "d66fe009d4c20b7ab1927eb405db9ee2" + "Hash": "97b1d5361a24d9fb588db7afe3e5bcbf" }, "rlang": { "Package": "rlang", - "Version": "1.1.1", + "Version": "1.1.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "utils" ], - "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb" + "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.25", + "Version": "2.27", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1383,18 +1369,17 @@ "jsonlite", "knitr", "methods", - "stringr", "tinytex", "tools", "utils", "xfun", "yaml" ], - "Hash": "d65e35823c817f09f4de424fcdfa812a" + "Hash": "27f9502e1cdbfa195f94e03b0f517484" }, "roxygen2": { "Package": "roxygen2", - "Version": "7.2.3", + "Version": "7.3.2", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1416,7 +1401,7 @@ "withr", "xml2" ], - "Hash": "7b153c746193b143c14baa072bae4e27" + "Hash": "6ee25f9054a70f44d615300ed531ba8d" }, "rprojroot": { "Package": "rprojroot", @@ -1430,14 +1415,14 @@ }, "rstudioapi": { "Package": "rstudioapi", - "Version": "0.15.0", + "Version": "0.16.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "5564500e25cffad9e22244ced1379887" + "Hash": "96710351d642b70e8f02ddeb237c46a7" }, "rvest": { "Package": "rvest", - "Version": "1.0.3", + "Version": "1.0.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1450,14 +1435,13 @@ "rlang", "selectr", "tibble", - "withr", "xml2" ], - "Hash": "a4a5ac819a467808c60e36e92ddf195e" + "Hash": "0bcf0c6f274e90ea314b812a6d19a519" }, "sass": { "Package": "sass", - "Version": "0.4.8", + "Version": "0.4.9", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1467,7 +1451,7 @@ "rappdirs", "rlang" ], - "Hash": "168f9353c76d4c4b0a0bbf72e2c2d035" + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" }, "scales": { "Package": "scales", @@ -1511,7 +1495,7 @@ }, "stringi": { "Package": "stringi", - "Version": "1.8.3", + "Version": "1.8.4", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1520,7 +1504,7 @@ "tools", "utils" ], - "Hash": "058aebddea264f4c99401515182e656a" + "Hash": "39e1144fd75428983dc3f63aa53dfa91" }, "stringr": { "Package": "stringr", @@ -1548,26 +1532,28 @@ }, "systemfonts": { "Package": "systemfonts", - "Version": "1.0.5", + "Version": "1.1.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", - "cpp11" + "cpp11", + "lifecycle" ], - "Hash": "15b594369e70b975ba9f064295983499" + "Hash": "213b6b8ed5afbf934843e6c3b090d418" }, "textshaping": { "Package": "textshaping", - "Version": "0.3.7", + "Version": "0.4.0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R", "cpp11", + "lifecycle", "systemfonts" ], - "Hash": "997aac9ad649e0ef3b97f96cddd5622b" + "Hash": "5142f8bc78ed3d819d26461b641627ce" }, "tibble": { "Package": "tibble", @@ -1590,7 +1576,7 @@ }, "tidyr": { "Package": "tidyr", - "Version": "1.3.0", + "Version": "1.3.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1609,11 +1595,11 @@ "utils", "vctrs" ], - "Hash": "e47debdc7ce599b070c8e78e8ac0cfcf" + "Hash": "915fb7ce036c22a6a33b5a8adb712eb1" }, "tidyselect": { "Package": "tidyselect", - "Version": "1.2.0", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1625,7 +1611,7 @@ "vctrs", "withr" ], - "Hash": "79540e5fcd9e0435af547d885f184fd5" + "Hash": "829f27b9c4919c16b593794a6344d6c0" }, "tidyverse": { "Package": "tidyverse", @@ -1680,13 +1666,13 @@ }, "tinytex": { "Package": "tinytex", - "Version": "0.49", + "Version": "0.51", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "xfun" ], - "Hash": "5ac22900ae0f386e54f1c307eca7d843" + "Hash": "d44e2fcd2e4e076f0aac540208559d1d" }, "tzdb": { "Package": "tzdb", @@ -1711,13 +1697,13 @@ }, "uuid": { "Package": "uuid", - "Version": "1.1-1", + "Version": "1.2-0", "Source": "Repository", "Repository": "CRAN", "Requirements": [ "R" ], - "Hash": "3d78edfb977a69fc7a0341bee25e163f" + "Hash": "303c19bfd970bece872f93a824e323d9" }, "vctrs": { "Package": "vctrs", @@ -1783,14 +1769,15 @@ }, "xfun": { "Package": "xfun", - "Version": "0.41", + "Version": "0.45", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "grDevices", "stats", "tools" ], - "Hash": "460a5e0fe46a80ef87424ad216028014" + "Hash": "ca59c87fe305b16a9141a5874c3a7889" }, "xml2": { "Package": "xml2", @@ -1807,14 +1794,14 @@ }, "yaml": { "Package": "yaml", - "Version": "2.3.8", + "Version": "2.3.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "29240487a071f535f5e5d5a323b7afbd" + "Hash": "9cb28d11799d93c953f852083d55ee9e" }, "zen4R": { "Package": "zen4R", - "Version": "0.9", + "Version": "0.10", "Source": "Repository", "Repository": "CRAN", "Requirements": [ @@ -1822,22 +1809,24 @@ "R6", "XML", "atom4R", + "cli", "httr", "jsonlite", "keyring", "methods", + "plyr", "tools", "utf8", "xml2" ], - "Hash": "c276a810a7fc656e140c79051c69fbbf" + "Hash": "e985844f4518bc1cb3abd116693c11e4" }, "zip": { "Package": "zip", - "Version": "2.3.0", + "Version": "2.3.1", "Source": "Repository", - "Repository": "CRAN", - "Hash": "d98c94dacb7e0efcf83b0a133a705504" + "Repository": "RSPM", + "Hash": "fcc4bd8e6da2d2011eb64a5e5cc685ab" } } } diff --git a/renv/activate.R b/renv/activate.R index cb5401f..d13f993 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,11 +2,13 @@ local({ # the requested version of renv - version <- "1.0.3" + version <- "1.0.7" attr(version, "sha") <- NULL # the project directory - project <- getwd() + project <- Sys.getenv("RENV_PROJECT") + if (!nzchar(project)) + project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE") @@ -31,6 +33,14 @@ local({ if (!is.null(override)) return(override) + # if we're being run in a context where R_LIBS is already set, + # don't load -- presumably we're being run as a sub-process and + # the parent process has already set up library paths for us + rcmd <- Sys.getenv("R_CMD", unset = NA) + rlibs <- Sys.getenv("R_LIBS", unset = NA) + if (!is.na(rlibs) && !is.na(rcmd)) + return(FALSE) + # next, check environment variables # TODO: prefer using the configuration one in the future envvars <- c( @@ -50,9 +60,22 @@ local({ }) - if (!enabled) + # bail if we're not enabled + if (!enabled) { + + # if we're not enabled, we might still need to manually load + # the user profile here + profile <- Sys.getenv("R_PROFILE_USER", unset = "~/.Rprofile") + if (file.exists(profile)) { + cfg <- Sys.getenv("RENV_CONFIG_USER_PROFILE", unset = "TRUE") + if (tolower(cfg) %in% c("true", "t", "1")) + sys.source(profile, envir = globalenv()) + } + return(FALSE) + } + # avoid recursion if (identical(getOption("renv.autoloader.running"), TRUE)) { warning("ignoring recursive attempt to run renv autoloader") @@ -108,6 +131,21 @@ local({ } + heredoc <- function(text, leave = 0) { + + # remove leading, trailing whitespace + trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text) + + # split into lines + lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]] + + # compute common indent + indent <- regexpr("[^[:space:]]", lines) + common <- min(setdiff(indent, -1L)) - leave + paste(substring(lines, common), collapse = "\n") + + } + startswith <- function(string, prefix) { substring(string, 1, nchar(prefix)) == prefix } @@ -610,6 +648,9 @@ local({ # if the user has requested an automatic prefix, generate it auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA) + if (is.na(auto) && getRversion() >= "4.4.0") + auto <- "TRUE" + if (auto %in% c("TRUE", "True", "true", "1")) return(renv_bootstrap_platform_prefix_auto()) @@ -801,24 +842,23 @@ local({ # the loaded version of renv doesn't match the requested version; # give the user instructions on how to proceed - remote <- if (!is.null(description[["RemoteSha"]])) { + dev <- identical(description[["RemoteType"]], "github") + remote <- if (dev) paste("rstudio/renv", description[["RemoteSha"]], sep = "@") - } else { + else paste("renv", description[["Version"]], sep = "@") - } # display both loaded version + sha if available friendly <- renv_bootstrap_version_friendly( version = description[["Version"]], - sha = description[["RemoteSha"]] + sha = if (dev) description[["RemoteSha"]] ) - fmt <- paste( - "renv %1$s was loaded from project library, but this project is configured to use renv %2$s.", - "- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.", - "- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.", - sep = "\n" - ) + fmt <- heredoc(" + renv %1$s was loaded from project library, but this project is configured to use renv %2$s. + - Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile. + - Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library. + ") catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote) FALSE @@ -1041,7 +1081,7 @@ local({ # if jsonlite is loaded, use that instead if ("jsonlite" %in% loadedNamespaces()) { - json <- catch(renv_json_read_jsonlite(file, text)) + json <- tryCatch(renv_json_read_jsonlite(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -1050,7 +1090,7 @@ local({ } # otherwise, fall back to the default JSON reader - json <- catch(renv_json_read_default(file, text)) + json <- tryCatch(renv_json_read_default(file, text), error = identity) if (!inherits(json, "error")) return(json) @@ -1063,14 +1103,14 @@ local({ } renv_json_read_jsonlite <- function(file = NULL, text = NULL) { - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") jsonlite::fromJSON(txt = text, simplifyVector = FALSE) } renv_json_read_default <- function(file = NULL, text = NULL) { # find strings in the JSON - text <- paste(text %||% read(file), collapse = "\n") + text <- paste(text %||% readLines(file, warn = FALSE), collapse = "\n") pattern <- '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' locs <- gregexpr(pattern, text, perl = TRUE)[[1]] @@ -1118,14 +1158,14 @@ local({ map <- as.list(map) # remap strings in object - remapped <- renv_json_remap(json, map) + remapped <- renv_json_read_remap(json, map) # evaluate eval(remapped, envir = baseenv()) } - renv_json_remap <- function(json, map) { + renv_json_read_remap <- function(json, map) { # fix names if (!is.null(names(json))) { @@ -1152,7 +1192,7 @@ local({ # recurse if (is.recursive(json)) { for (i in seq_along(json)) { - json[i] <- list(renv_json_remap(json[[i]], map)) + json[i] <- list(renv_json_read_remap(json[[i]], map)) } } From ea3bc3ec52ca6dc2ba0677dc7a606d77419acf67 Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:20:53 +0200 Subject: [PATCH 5/6] update doi --- code/download_data.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/download_data.R b/code/download_data.R index aaea2f8..9d3f264 100644 --- a/code/download_data.R +++ b/code/download_data.R @@ -1,5 +1,5 @@ #### download data from Zenodo #### -# download latest version of the database from Zenodo, https://zenodo.org/doi/10.5281/zenodo.10782428 +# download latest version of the database from Zenodo, https://doi.org/10.5281/zenodo.12698765 cat("Downloading raw data\n") zen4R::download_zenodo("10.5281/zenodo.12698765", path = "data/") From 7237b5dcbabb650d9f7b382eae24fdf030b7335e Mon Sep 17 00:00:00 2001 From: Niklas Hohmann <67792281+NiklasHohmann@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:21:13 +0200 Subject: [PATCH 6/6] save maps to dedicated folder --- code/make_maps.R | 38 +++++++++++++++++++------------------- figs/maps/.gitkeep.txt | 0 2 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 figs/maps/.gitkeep.txt diff --git a/code/make_maps.R b/code/make_maps.R index bbbb9f9..a0cdd4d 100644 --- a/code/make_maps.R +++ b/code/make_maps.R @@ -26,21 +26,21 @@ class(coord) qmplot(lon,lat,data=coord,maptype="stamen_toner_lite",color=I("red")) # OR ggmap(Med_map)+geom_point(data=coord,aes(color="darkred",shape=Age)) -ggsave("dataset_map.pdf",width=9,height=5) +ggsave("figs/maps/dataset_map.pdf",width=9,height=5) # Color by stage Tortonian<-filter(coord,Age=="Tortonian") Messinian<-filter(coord,Age=="pre-evaporitic Messinian") Zanclean<-filter(coord,Age=="Zanclean") ggmap(Med_map)+geom_point(data=Tortonian,color="darkblue")+geom_point(data=Messinian,color="darkred")+geom_point(data=Zanclean,color="gold2") -ggsave("locs_by_stage_map.pdf",width=9,height=5) +ggsave("figs/maps/locs_by_stage_map.pdf",width=9,height=5) # Color by region wMed<-filter(coord,region=="Western Mediterranean") eMed<-filter(coord,region=="Eastern Mediterranean") PoA<-filter(coord,region=="Po Plain-Northern Adriatic") ggmap(Med_map)+geom_point(data=wMed,color="green4")+geom_point(data=eMed,color="pink4")+geom_point(data=PoA,color="orange3") -ggsave("locs_by_region_map.pdf",width=9,height=5) +ggsave("figs/maps/locs_by_region_map.pdf",width=9,height=5) # Color by stage and region ggmap(Med_map)+ @@ -50,7 +50,7 @@ ggmap(Med_map)+ labs(x="longitude",y="latitude")+ theme(legend.position="bottom") -ggsave("stage_region_map2.pdf",width=9,height=5) +ggsave("figs/maps/stage_region_map2.pdf",width=9,height=5) # plot for each group separately tax_groups<-unique(coord$group.name) @@ -70,46 +70,46 @@ bryo<-filter(coord,group.name=="bryozoans") othermolluscs<-filter(coord, group.name=="scaphopod_chitons_cephalopods") ggmap(Med_map)+geom_point(data=pforams,aes(color=Age)) -ggsave("pforams.pdf",width=9,height=5) +ggsave("figs/maps/pforams.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=nano,aes(color=Age)) -ggsave("nano.pdf",width=9,height=5) +ggsave("figs/maps/nano.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=ostracods,aes(color=Age)) -ggsave("ostracods.pdf",width=9,height=5) +ggsave("figs/maps/ostracods.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=bforams,aes(color=Age)) -ggsave("bforams.pdf",width=9,height=5) +ggsave("figs/maps/bforams.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=gastr,aes(color=Age)) -ggsave("gastro.pdf",width=9,height=5) +ggsave("figs/maps/gastro.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=echinoids,aes(color=Age)) -ggsave("echinoids.pdf",width=9,height=5) +ggsave("figs/maps/echinoids.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=fish,aes(color=Age)) -ggsave("fish.pdf",width=9,height=5) +ggsave("figs/maps/fish.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=mmammals,aes(color=Age)) -ggsave("marine_mammals.pdf",width=9,height=5) +ggsave("figs/maps/marine_mammals.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=biv,aes(color=Age)) -ggsave("bivalves.pdf",width=9,height=5) +ggsave("figs/maps/bivalves.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=corals,aes(color=Age)) -ggsave("corals.pdf",width=9,height=5) +ggsave("figs/maps/corals.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=dino,aes(color=Age)) -ggsave("dino.pdf",width=9,height=5) +ggsave("figs/maps/dino.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=sharks,aes(color=Age)) -ggsave("sharks.pdf",width=9,height=5) +ggsave("figs/maps/sharks.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=bryo,aes(color=Age)) -ggsave("bryo.pdf",width=9,height=5) +ggsave("figs/maps/bryo.pdf",width=9,height=5) ggmap(Med_map)+geom_point(data=othermolluscs,aes(color=Age)) -ggsave("othermolluscs.pdf",width=9,height=5) +ggsave("figs/maps/othermolluscs.pdf",width=9,height=5) # plot groups split into plankton, benthos, necton and large marine vertebrates # plankton: planktic_foraminifera, nanoplankton, dinocysts @@ -122,4 +122,4 @@ necton<-rbind(fish) large_mar_vert<-rbind(sharks,mmammals) ggmap(Med_map)+geom_point(data=plankton,color="gold1",aes(shape=Age))+geom_point(data=benthos,color="red",aes(shape=Age))+geom_point(data=necton,color="blue",aes(shape=Age))+geom_point(data=large_mar_vert,color="green",aes(shape=Age)) -ggsave("fgroups.pdf",width=9,height=5) +ggsave("figs/maps/fgroups.pdf",width=9,height=5) diff --git a/figs/maps/.gitkeep.txt b/figs/maps/.gitkeep.txt new file mode 100644 index 0000000..e69de29