Running examples in ‘RchivalTag-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_thermalstrat
> ### Title: estimate thermal stratification indices
> ### Aliases: get_thermalstrat
> 
> ### ** Examples
> 
> #### example 1) run on PDT file:
> ## step I) read sample PDT data file:
> setwd(system.file("example_files",package="RchivalTag"))
> PDT <- read_PDT("104659-PDTs.csv")
running pdt_file 104659-PDTs.csv 
> head(PDT)
         pdt_file DeployID    Ptt NumBins Depth MinTemp MaxTemp
1 104659-PDTs.csv  15P1019 104659       8     0    18.0    23.2
2 104659-PDTs.csv  15P1019 104659       8    24    15.0    21.8
3 104659-PDTs.csv  15P1019 104659       8   104    13.4    14.0
4 104659-PDTs.csv  15P1019 104659       8   176    13.4    13.8
5 104659-PDTs.csv  15P1019 104659       8   192    13.4    13.8
6 104659-PDTs.csv  15P1019 104659       8   288    13.6    13.8
            date.long       date MeanPDT
1 2016-08-07 08:00:00 2016-08-07    20.6
2 2016-08-07 08:00:00 2016-08-07    18.4
3 2016-08-07 08:00:00 2016-08-07    13.7
4 2016-08-07 08:00:00 2016-08-07    13.6
5 2016-08-07 08:00:00 2016-08-07    13.6
6 2016-08-07 08:00:00 2016-08-07    13.7
> # 
> # ## step II) interpolate average temperature fields (MeanPDT) from PDT file:
> # m <- interpolate_PDTs(PDT)
> # str(m)
> # m$sm
> # 
> # ## step III) calculate thermal stratifcation indicators per day (and tag):
> # get_thermalstrat(m, all_info = TRUE)
> # get_thermalstrat(m, all_info = FALSE)
> # 
> # 
> # #### example 2) run on time series data:
> # ## step I) read sample time series data file:
> # DepthTempTS <- read.table(system.file("example_files/104659-Series.csv",
> #                                       package="RchivalTag"),header = TRUE,sep=',')
> # DepthTempTS$date <- as.Date(DepthTempTS$Day,"%d-%b-%Y")
> # head(DepthTempTS)
> # 
> # 
> # ## step Ib) bin temperature data on 10m depth bins 
> # ##          to increase later estimate accuracy (see Bauer et al. 2015):
> # # DepthTempTS_binned <- bin_TempTS(DepthTempTS,res=10)
> # 
> # ## step II) interpolate average temperature fields (MeanTemp) from binned data:
> # m <- interpolate_TempDepthProfiles(DepthTempTS)
> # # m <- interpolate_PDTs(DepthTempTS_binned)
> # str(m)
> # m$sm
> # 
> # ## step III) calculate thermal stratifcation indicators per day (and tag):
> # get_thermalstrat(m, all_info = TRUE)
> # get_thermalstrat(m, all_info = FALSE)
> 
> 
> 
> 
> 
> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
> base::cat("get_thermalstrat", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
Calls: <Anonymous> -> file
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
  cannot open file 'RchivalTag-Ex.timings': Read-only file system
Execution halted