An alert system to daily monitoring of TreeTalkers devices
Zorzi, I., Francini, S., Chirici, G., & Cocozza, C. (2021). The TreeTalkersCheck R package: An automatic daily routine to check physiological traits of trees in the forest. Ecological Informatics, 101433. https://doi.org/10.1016/j.ecoinf.2021.101433
To do it, paste the code below in the R Console and press enter
install.packages("devtools", repos = "http://cran.us.r-project.org")
devtools::install_github("saveriofrancini/TreeTalkersCheck")
To do it, paste the code below in the R Console and press enter
source(system.file("run", "run.R", package = "TreeTalkersCheck"))
If everything went fine, outputs are now in C:\TreeTalkerDB. Note that obtained TreeTalkerCheck outputs refer to server links and TT serial numbers distributed within the package for testing purpose. If you want to run the package to check the status of your own devices see the next section.
The parameters folder is in your TreeTalkersCheck installation folder. To find the path, paste the code below in the R Console and press enter.
system.file("parameters", package = "TreeTalkersCheck")
Just edit the serverLinks.txt and TTid.txt files with your own server links, sites, TT serial numbers and the id you want to give to each TT.
If you want to use the package with new parameters you defined, paste the code below in the R Console and press enter
system(paste0("R CMD BATCH ", system.file("run", "run.R", package = "TreeTalkersCheck")))
Note that the procedure below is for windows operating system. If you have a different operating system, for example a mac, you can use its specific scheduler
-
Open the scheduler: START -> All Programs -> Accesories -> System Tools -> Scheduler
-
Create a new Task
-
under tab Action, create a new action
-
choose Start Program
-
browse to Rscript.exe which should be placed e.g. here: "C:\Program Files\R\R-x.x.x\bin\x64\Rscript.exe". Note that quotation marks are mandatory to specify the path.
-
input run.R in the parameters field
-
input the path where the script is to be found in the Start in field (e.g. C:/Users/userName/Documenti/R/win-library/4.0/TreeTalkersCheck/run/). If you don't find the path, paste the code below in the R Console and press enter.
system.file("run", package = "TreeTalkersCheck")
-
go to the Triggers tab
-
create new trigger
-
schedule a daily execution.
For more information on the package and on functions it includes, use the help.
?TreeTalkersCheck::checkCloud
?TreeTalkersCheck::checkRequirements
?TreeTalkersCheck::checkTT
?TreeTalkersCheck::DownloadNaturetalkers
?TreeTalkersCheck::Plot
?TreeTalkersCheck::ReadServerData
?TreeTalkersCheck::TreeTalkersCheck