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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: analysisOrganizeData
> ### Title: Analysis Organization & Data Preparation
> ### Aliases: analysisOrganizeData
> 
> ### ** Examples
> 
> # run analysis relying on default specifications, examine analySpec for
> # default options
> dfr <- analysisOrganizeData(dataCensored)

### Record Count


 

`Beginning Number of Records:  13062`

 

`Number of Records After Processing:  13062`

 


### Parameters


 

*Table: List of Parameters.*

 



Dep. Var.  Parameter Name                Units  Log Tran.  GAM Dep. Var.
---------  ----------------------------  -----  ---------  -------------
secchi     Secchi Depth                  m      FALSE      secchi       
chla       Chlorophyll a (Corrected)     ug/L   TRUE       lnchla       
do         Dissolved Oxygen              mg/L   FALSE      do           
tn         Total Nitrogen                mg/L   TRUE       lntn         
tp         Total Phosphorus              mg/L   TRUE       lntp         
po4        Orthophosphorus               mg/L   TRUE       lnpo4        
tdp        Total Dissolved Phosphorus    mg/L   TRUE       lntdp        
no23       Nitrite + Nitrate             mg/L   TRUE       lnno23       
nh4        Ammonium                      mg/L   TRUE       lnnh4        
tdn        Total Dissolved Nitrogen      mg/L   TRUE       lntdn        
din        Dissolved Inorganic Nitrogen  mg/L   TRUE       lndin        
salinity   Salinity                      ppt    FALSE      salinity     
tss        Total Suspended Solids        mg/L   TRUE       lntss        
wtemp      Water Temperature             deg C  FALSE      wtemp        

### Layers


 

*Table: List of Layers.*

 



Layer ID  Layer Name      
--------  ----------------
S         Surface         
AP        Above Pycnocline
BP        Below Pycnocline
B         Bottom          

## 

### Stations


 

*Table: List of Stations.*

 



Station ID  Latitude  Longitude  CB 92 Seg.  Flow Adj. Gage  Mth. Group
----------  --------  ---------  ----------  --------------  ----------
CB3.3C       38.9960   -76.3597  CB3MH       01578310        MD-Main   
CB4.1C       38.8259   -76.3995  CB4MH       01578310        MD-Main   
CB5.4        37.8001   -76.1747  CB5MH_VA    01578310        VA-All    
TF5.5        37.3126   -77.2328  JMSTF1      02035000        VA-All    
EE2.1        38.6549   -76.2643  CHOMH1      01491000        MD-Trib   
EE3.0        38.2809   -76.0103  FSBMH       01578310        MD-Trib   
TF2.2        38.6907   -77.1111  POTTF_MD    01646500        MD-Potomac
LE2.2        38.1576   -76.5980  POTMH_MD    01646500        MD-Potomac
> df        <- dfr[["df"]]
> analySpec <- dfr[["analySpec"]]
> 
> # analyze bottom dissolved oxygen at 2 stations
> analySpec <-list()
> analySpec$parameterFilt <- c('do')
> analySpec$layerFilt     <- c('B')
> analySpec$stationFilt   <- c('CB3.3C', 'CB5.4')
> dfr <- analysisOrganizeData(dataCensored, analySpec)
Error in `[<-.data.frame`(`*tmp*`, depVarList$logTrans, "depsGAM", value = "ln") : 
  replacement has 1 row, data has 0
Calls: analysisOrganizeData -> [<- -> [<-.data.frame
Execution halted