Package reval. May 26, 2015

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package preprosim. July 26, 2016

Package datasets.load

Package fastdummies. January 8, 2018

Package splithalf. March 17, 2018

Package rsppfp. November 20, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package ECctmc. May 1, 2018

Package vinereg. August 10, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package robotstxt. November 12, 2017

Package bisect. April 16, 2018

Package canvasxpress

Package NFP. November 21, 2016

Package purrrlyr. R topics documented: May 13, Title Tools at the Intersection of 'purrr' and 'dplyr' Version 0.0.2

Package simtool. August 29, 2016

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package queuecomputer

Package modules. July 22, 2017

Package strat. November 23, 2016

Package mdftracks. February 6, 2017

Package catenary. May 4, 2018

Package weco. May 4, 2018

Package loggit. April 9, 2018

Package sfc. August 29, 2016

Package calpassapi. August 25, 2018

Package gtrendsr. October 19, 2017

Package rgho. R topics documented: January 18, 2017

Package autoshiny. June 25, 2018

Package TrafficBDE. March 1, 2018

Package githubinstall

Package fitbitscraper

Package validara. October 19, 2017

Package SNPediaR. April 9, 2019

Package dat. January 20, 2018

Package eply. April 6, 2018

Package fastqcr. April 11, 2017

Package clipr. June 23, 2018

Package gtrendsr. August 4, 2018

Package facerec. May 14, 2018

Package UNF. June 13, 2017

Package GetITRData. October 22, 2017

Package jstree. October 24, 2017

Package tidyimpute. March 5, 2018

Package docxtools. July 6, 2018

Package preprocomb. June 26, 2016

Package cosinor. February 19, 2015

Package rivr. March 15, 2016

Package RODBCext. July 31, 2017

Package opencage. January 16, 2018

Package crochet. January 8, 2018

Package jpmesh. December 4, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package BiocManager. November 13, 2018

Package nngeo. September 29, 2018

Package internetarchive

Package dkanr. July 12, 2018

Package widyr. August 14, 2017

Package lumberjack. R topics documented: July 20, 2018

Package optimus. March 24, 2017

Package barcoder. October 26, 2018

Package profvis. R topics documented:

Package QCAtools. January 3, 2017

Package diagis. January 25, 2018

Package qualmap. R topics documented: September 12, Type Package

Package clustvarsel. April 9, 2018

Package dgo. July 17, 2018

Package enpls. May 14, 2018

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package GetHFData. November 28, 2017

Package tibble. August 22, 2017

Package dbx. July 5, 2018

Package kdtools. April 26, 2018

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package ProgGUIinR. February 19, 2015

Package censusapi. August 19, 2018

Package editdata. October 7, 2017

Package repec. August 31, 2018

Package messaging. May 27, 2018

Package voxel. R topics documented: May 23, 2017

Package knitrprogressbar

Package PCADSC. April 19, 2017

Package curry. September 28, 2016

Package climber. R topics documented:

Package svalues. July 15, 2018

Package labelled. December 19, 2017

Package FSelectorRcpp

Package narray. January 28, 2018

Package spcadjust. September 29, 2016

Package SEMrushR. November 3, 2018

Package OLScurve. August 29, 2016

Package ggloop. October 20, 2016

Package meme. December 6, 2017

Package customlayout

Package EFDR. April 4, 2015

Package ggmosaic. February 9, 2017

Package Rspc. July 30, 2018

Package reportr. October 6, 2016

Transcription:

Package reval May 26, 2015 Title Repeated Function Evaluation for Sensitivity Analysis Version 2.0.0 Date 2015-05-25 Author Michael C Koohafkan [aut, cre] Maintainer Michael C Koohafkan <michael.koohafkan@gmail.com> Description Simplified scenario testing and sensitivity analysis with R via a generalized function for one-factor-at-a-time (OFAT) sensitivity analysis, evaluation of parameter sets and (sampled) parameter permutations. Options for formatting output and parallel processing are also provided. URL https://github.com/mkoohafkan/reval BugReports https://github.com/mkoohafkan/reval/issues License GPL (>= 3) Depends R (>= 3.1.3) Imports doparallel (>= 1.0.8), foreach (>= 1.4.2) Suggests knitr, ggplot2, dplyr, rivr VignetteBuilder knitr NeedsCompilation no Repository CRAN Date/Publication 2015-05-26 08:24:24 R topics documented: reval-package........................................ 2 evalmany.......................................... 2 Index 5 1

2 evalmany reval-package This package provides the function evalmany to simplify scenario testing and sensitivity analysis with R. Description This package provides the function evalmany to simplify scenario testing and sensitivity analysis with R. evalmany Repeated evaluations Description Usage Evaluate a function repeatedly across argument sets or permutations. evalmany(fun,..., method = c("ofat", "permute", "set"), sample = 0L, default.args = list(), collate = TRUE, collate.id = c("single", "multi"), collate.prepend = "", collate.fun = identity, clusters = 1L, packages = NULL) Arguments fun The function to be evaluated.... Arguments to be varied when evaluating fun, where each argument in... is a (named) vector or list of values. Lists of multi-value objects (e.g. data.frames) should be named explicitly and may otherwise produce unexpected or incorrect names. method sample default.args collate The sensitivity analysis method to be used. Can be either one-factor-at-a-time ("ofat") evaluation, evaluation of parameter sets ("set"), or (sampled) permutations of parameter sets ("permute"). When method = "ofat", the first element of each argument in... is assumed to be the "default" value of that argument. If method = "permute", the number of parameter permutations to evaluate (sampling without replacement). If sample < 1 (the default) then all possible permutations are evaluated. The default values of arguments passed to fun. Whether to collate the results or not. If TRUE, output elements will be coerced into data.frames using as.data.frame. Otherwise, the raw outputs will be returned as a named list. collate.id If collate = TRUE, the method used to store the evaluation identifiers. If collate.id = "single", a single column named id is used. If collate.id = "multi", one column is created for each argument in..., e.g. arg1, arg2, etc.

evalmany 3 Value collate.prepend A character string prepended to the identifier column. If collate.id = "single", the identifier column will be named <collate.prepend>id. If collate.id = "multi", identifier columns will be named as <collate.prepend><arg> where arg is an element of... collate.fun clusters packages If collate = TRUE, an optional function for reshaping the output of each evaluation prior to coercing and collating the outputs. Number of clusters to use for parallel processing. Default is 1 (serial computation). For parallel processing. Character vector of packages that fun depends on. If collate = TRUE, a data.frame. Otherwise, a named list. Examples myfun = function(n, mean=0, sd = 1){ x = rnorm(n, mean, sd) data.frame(sample.mean = mean(x), sample.sd = sd(x)) } evalmany(myfun, mean = c(5, 9), sd = c(2, 3), default.args = list(n = 1e6)) evalmany(myfun, mean = seq(20), sd = seq(1, 4, by = 0.1), default.args = list(n = 1e6), method = "permute", sample = 10, collate.id = "multi", collate.prepend = "arg.") # vector recycling evalmany(myfun, mean = c(0, 3, 5), sd = c(1, 10), default.args = list(n = 1e6), method = "set", collate.id = "multi") # Parallel processing evalmany(myfun, mean = seq(0, 50, by = 10), sd = seq(1, 10, by = 1.5), default.args = list(n = 1e5), method = "permute", collate.id = "multi", clusters = 2) ## Not run: # Complex objects formulas = list(y ~ 1, y ~ x, y ~ x + z) datasets = list( A = data.frame(x = seq(0, 99), y = seq(0, 99) + rnorm(100)), B = data.frame(x = seq(0, 99), y = seq(0, 99) + rnorm(100, mean = 5)), C = data.frame(x = seq(0, 99), y = seq(0, 99) + rlnorm(100, meanlog = 1), z = seq(0, 99) - rlnorm(100, meanlog = -1)) ) # raw output evalmany(lm, formula = formulas, data = datasets, method = "set", collate = FALSE) # data extraction and error handling evalmany(lm, formula = formulas, data = datasets, method = "permute", collate.id = "multi", collate.fun = function(x) data.frame(param = names(x$coefficients), value = x$coefficients,

4 evalmany row.names=null)) ## End(Not run)

Index evalmany, 2 reval-package, 2 5