checking examples ... ERROR
Running examples in ‘repra-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: calculate_elcc
> ### Title: Calculate effective load carrying capability (ELCC)
> ### Aliases: calculate_elcc
>
> ### ** Examples
>
> # Create outage table with 200 5-MW units
> gens <- data.frame(Capacity = rep(5, 200),
+ EFOR = rep(0.08, 200))
> out.table <- outage_table(gens)
>
> # Create random load and wind data and format
> tdata <- data.frame(Time = 1:8760,
+ Load = runif(8760, 450, 850),
+ Wind = runif(8760, 0, 100),
+ Wind2 = runif(8760, 0, 200))
> td <- format_timedata(tdata)
Error in `[.data.frame`(data3, , list(Value = sum(Value)), by = cols.temp) :
unused argument (by = cols.temp)
Calls: format_timedata -> [ -> [.data.frame
Execution halted
checking tests ... ERROR
Running the tests in ‘tests/test-all.R’ failed.
Last 13 lines of output:
6: compare(actual, expected, ...) at /Users/hadley/Documents/devtools/testthat/R/expectations-equality.R:61
7: format_timedata(tdata) at /Users/hadley/Documents/devtools/testthat/R/compare.r:10
8: data3[, list(Value = sum(Value)), by = cols.temp]
9: `[.data.frame`(data3, , list(Value = sum(Value)), by = cols.temp)
testthat results ================================================================
OK: 9 SKIPPED: 0 FAILED: 3
1. Error: timedata format
2. Error: timedata column names
3. Error: WinProb value set to 1
Error: testthat unit tests failed
Execution halted
checking re-building of vignette outputs ... NOTE
Error in re-building vignettes:
...
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Quitting from lines 61-65 (repra.Rmd)
Error: processing vignette 'repra.Rmd' failed with diagnostics:
unused argument (by = cols.temp)
Execution halted
DONE
Status: 2 ERRORs, 1 NOTE