-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from sylvainschmitt/main
0.1.1
- Loading branch information
Showing
90 changed files
with
2,085 additions
and
975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ inst/figures/lidr_fig.R | |
inst/gsl | ||
LICENSE.md | ||
.covrignore | ||
.vscode | ||
.lintr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: lint | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::lintr, local::. | ||
needs: lint | ||
|
||
- name: Lint | ||
run: lintr::lint_package() | ||
shell: Rscript {0} | ||
env: | ||
LINTR_ERROR_ON_LINT: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ config.status | |
simulations | ||
supplementary.html | ||
inst/gsl | ||
*.las |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
linters: linters_with_defaults() # see vignette("lintr") | ||
encoding: "UTF-8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
LD_LIBRARY_PATH=/usr/lib/R/lib:/usr/lib/x86_64-linux-gnu:/usr/lib/jvm/default-java/lib/server | ||
R_ARCH= | ||
R_BROWSER=xdg-open | ||
R_BZIPCMD=/bin/bzip2 | ||
R_DOC_DIR=/usr/share/R/doc | ||
R_GZIPCMD=/bin/gzip -n | ||
R_HOME=/usr/lib/R | ||
R_INCLUDE_DIR=/usr/share/R/include | ||
R_LIBS_SITE=/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library | ||
R_LIBS_USER=~/R/x86_64-pc-linux-gnu-library/4.1 | ||
R_PAPERSIZE=letter | ||
R_PAPERSIZE_USER=a4 | ||
R_PDFVIEWER=/usr/bin/xdg-open | ||
R_PLATFORM=x86_64-pc-linux-gnu | ||
R_PRINTCMD=/usr/bin/lpr | ||
R_RD4PDF=times,inconsolata,hyper | ||
R_SESSION_TMPDIR=/tmp/RtmpKdLxpi | ||
R_SHARE_DIR=/usr/share/R/share | ||
R_STRIP_SHARED_LIB=strip --strip-unneeded | ||
R_STRIP_STATIC_LIB=strip --strip-debug | ||
R_SYSTEM_ABI=linux,gcc,gxx,gfortran,gfortran | ||
R_TEXI2DVICMD=/usr/bin/texi2dvi | ||
R_UNZIPCMD=/usr/bin/unzip | ||
R_ZIPCMD=/usr/bin/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"${env:HOME}/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include", | ||
"/usr/share/R/include" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "c11", | ||
"cppStandard": "c++17" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env <- Sys.getenv() | ||
envnames <- names(env) | ||
rnames <- envnames[startsWith(envnames, "R_")] | ||
cached_names <- rnames | ||
ld_lib_path <- Sys.getenv("LD_LIBRARY_PATH") | ||
if (ld_lib_path != "") { | ||
cached_names <- c("LD_LIBRARY_PATH", rnames) | ||
} | ||
writeLines(paste0(cached_names, "=", env[cached_names]), ".vscode/.env") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(gdb) Launch", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "/usr/lib/R/bin/exec/R", | ||
"args": [ | ||
"--vanilla", | ||
"-e", | ||
"devtools::test(filter = 'cpp')" | ||
], | ||
"stopAtEntry": false, | ||
"envFile": "${workspaceFolder}/.vscode/.env", | ||
"cwd": "${workspaceFolder}", | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
"preLaunchTask": "debug" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "debug", | ||
"type": "shell", | ||
"command": "Rscript ${workspaceFolder}/.vscode/debug.R", | ||
"problemMatcher": [] | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: rcontroll | ||
Type: Package | ||
Title: Individual-Based Forest Growth Simulator 'TROLL' | ||
Version: 0.1.0 | ||
Version: 0.1.1 | ||
Authors@R: c( | ||
person("Sylvain", "Schmitt", email="[email protected]", role=c("aut", "cre"), comment = c(ORCID = "0000-0001-7759-7106")), | ||
person("Guillaume", "Salzet", email="[email protected]", role="aut", comment = c(ORCID = "0000-0003-4548-5673")), | ||
|
@@ -52,6 +52,7 @@ Suggests: | |
rmarkdown, | ||
testthat, | ||
covr | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 | ||
Collate: | ||
'RcppExports.R' | ||
|
@@ -75,12 +76,13 @@ Collate: | |
'generate_lidar.R' | ||
'generate_parameters.R' | ||
'get_forest.trollsim.R' | ||
'get_log.trollsim.R' | ||
'load_stack.R' | ||
'load_sim.trollsim.R' | ||
'print.trollsim.R' | ||
'rcontroll-package.R' | ||
'rcontroll.R' | ||
'stack.R' | ||
'summary.trollsim.R' | ||
'update_parameters.trollsim.R' | ||
VignetteBuilder: knitr | ||
Depends: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
#' TROLL climate parameters over months | ||
#' `TROLL` climate parameters over months | ||
#' | ||
#' Climate parameters used by TROLL model over months. | ||
#' Climate parameters used by `TROLL` model over months. | ||
#' | ||
#' @format A data frame with 12 rows and 12 variables: \describe{ | ||
#' \item{Temperature}{temperature (degree C)} | ||
#' \item{DaytimeMeanTemperature}{mean day temperature (degree C)} | ||
#' \item{NightTemperature}{night temperature (degree C)} | ||
#' \item{Rainfall}{rainfall (mm)} \item{WindSpeed}{wind speed (km/h)} | ||
#' \item{DaytimeMeanIrradiance}{daytime mean irradiance} | ||
#' \item{MeanIrradiance}{mean irradiance} | ||
#' \item{SaturatedVapourPressure}{saturated vapour pressure (Pa)} | ||
#' \item{VapourPressure}{vapour pressure (Pa)} | ||
#' \item{VaporPressureDeficit}{vapour pressure deficit (VPD, Pa)} | ||
#' \item{DayTimeVapourPressureDeficitVPDbasic}{daytime basic VPD (Pa)} | ||
#' \item{DaytimeMeanVapourPressureDeficit}{daytime mean VPF (Pa)} } | ||
#' \item{Temperature}{monthly average of temperature (degree C)} | ||
#' \item{DaytimeMeanTemperature}{the monthly average of daytime temperature | ||
#' (degree C, 7am-7pm)} \item{NightTemperature}{the monthly average of | ||
#' temperature at night (degree C, 8pm-6am)} \item{Rainfall}{monthly average | ||
#' of cumulative rainfall (cm)} \item{WindSpeed}{monthly average of wind speed | ||
#' (m/s)} \item{DaytimeMeanIrradiance}{monthly average of cumulative solar | ||
#' irradiance averaged over one day (W/m2, 7am-7pm)} | ||
#' \item{MeanIrradiance}{monthly average of cumulative solar irradiance over | ||
#' 24 hours (W/m2)} \item{SaturatedVapourPressure}{monthly average of | ||
#' saturation vapour pressure (hPa)} \item{VapourPressure}{monthly average of | ||
#' vapour pressur (hPa)} \item{VaporPressureDeficit}{monthly average of vapour | ||
#' pressure deficit (VPD, hPa)} | ||
#' \item{DayTimeVapourPressureDeficitVPDbasic}{monthly average of daytime | ||
#' vapour pressure deficit (7am-7pm) according to basic formula (hPa)} | ||
#' \item{DaytimeMeanVapourPressureDeficit}{monthly average of daytime vapour | ||
#' pressure deficit (7am-7pm) according to advanced formula (hPa)} } | ||
#' | ||
#' @seealso [generate_climate()], [TROLLv3_daytimevar] | ||
#' | ||
"TROLLv3_climatedaytime12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
#' TROLL daytime variation parameters | ||
#' `TROLL` daytime variation parameters | ||
#' | ||
#' Daytime variation parameters used by TROLL models. | ||
#' Daytime variation parameters used by `TROLL`s models. | ||
#' | ||
#' @format A data frame with 24 rows and 5 variables: \describe{ | ||
#' \item{starttime}{starting time} \item{endtime}{ending time} | ||
#' \item{vardaytime_light}{daytime variation in light} | ||
#' \item{vardaytime_vpd}{daytime variation in vapour pressure deficit} | ||
#' \item{vardaytime_T}{daytime variation in temperature}} | ||
#' \item{vardaytime_light}{daily variation in irradiance relative to the mean | ||
#' value of the day} \item{vardaytime_vpd}{daily variation in vapour pressure | ||
#' deficit relative to the mean value of the day} \item{vardaytime_T}{daily | ||
#' variation in temperature relative to the mean value of the day}} | ||
#' | ||
#' @seealso [generate_climate()], [TROLLv3_climatedaytime12] | ||
#' | ||
"TROLLv3_daytimevar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#' TROLL global parameters | ||
#' `TROLL` global parameters | ||
#' | ||
#' Global parameters definition used by TROLL model. | ||
#' Global parameters definition used by `TROLL` model. | ||
#' | ||
#' @format A data frame with 61 rows and 3 variables: \describe{ | ||
#' \item{param}{global parameter} \item{value}{value of the parameter} | ||
#' \item{description}{description of the parameter} } | ||
#' | ||
#' @seealso [generate_parameters()] | ||
#' | ||
"TROLLv3_input" | ||
|
||
# TROLLv3_input <- readr::read_tsv("inst/extdata/TROLLv3_input.txt") | ||
# usethis::use_data(TROLLv3_input, overwrite = T) | ||
# TROLLv3_input <- readr::read_tsv("inst/extdata/TROLLv3_input.txt") # nolint | ||
# usethis::use_data(TROLLv3_input, overwrite = T) # nolint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#' TROLL lidar parameters | ||
#' `TROLL` lidar parameters | ||
#' | ||
#' Lidar parameters definition used by TROLL model for lidar simulations. | ||
#' Lidar parameters definition used by `TROLL` for lidar simulations. | ||
#' | ||
#' @format A data frame with 5 rows and 3 variables: \describe{ | ||
#' \item{param}{global parameter} \item{value}{value of the parameter} | ||
#' \item{param}{lidar parameter} \item{value}{value of the parameter} | ||
#' \item{description}{description of the parameter} } | ||
#' | ||
#' @seealso [generate_lidar()] | ||
#' | ||
"TROLLv3_pointcloud" | ||
|
||
# TROLLv3_pointcloud <- readr::read_tsv("inst/extdata/TROLLv3_pointcloud.txt") | ||
# usethis::use_data(TROLLv3_pointcloud, overwrite = T) | ||
# TROLLv3_pointcloud <- readr::read_tsv("inst/extdata/TROLLv3_pointcloud.txt") # nolint | ||
# usethis::use_data(TROLLv3_pointcloud, overwrite = T) # nolint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.