Category:OpasnetUtils: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(text moved to OpasnetUtils)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Opasnet]]
Pages that relate to the [[R]] package [[OpasnetUtils]] (previously called OpasnetBaseUtils).
[[Category:R tools]]
 
==OpasnetUtils features==
[[Modelling in Opasnet]] is done using R and the OpasnetUtils package provides most of the actual tools. Most of the package revolves around the [[Ovariable]]-class.
 
Defining and analyzing endpoints of a model can be as easy as Fetching a relevant variable, evaluating it (using EvalOutput) and using some of the available functions (i.e. summary() for ovariables).
 
...
 
==List/Glossary of package contents==
Find more about each function or method using ?<topic> in the R console or search the [[#Manual]]. Topics are in approximate order of prevalency.
 
===Ovariable functionalities===
*EvalOutput - is the method used to evaluate ovariables.
*ComputeDependencies - is automatically run when evaluating ovariables to fetch and evaluate any dependencies they have.
*CheckMarginals - is automatically run when evaluating ovariables to check the marginal status of output indices.
*CheckInput - is automatically run when evaluating ovariables to incorporate input definitions if available.
*CheckCollapse - is automatically run when evaluating ovariables. Uses CollapseMarginal if orders are present.
*CheckDecisions - is automatically run when evaluating ovariables. Adds scenarios to output if their definitions are present.
*CollapseMarginal - is used to streamline large models by removing indices through summation etc.
 
===Assessment tools===
*DecisionTableParser - parses scenarios used in decision analysis from data.frames.
*CollapseTableParser - parses collapse orders from data.frames.
*Optimize - finds optimal combination of index values.
*Minimize - finds optimal combination of index values so that the resulting value is minimal.
 
===Custom methods for Opasnet and ovariables===
*oprint - prints a data.frame or the output of an ovariable as a html formatted table so it looks nice on the web page.
*oapply - uses tapply on ovariable output. Instead of defining INDEX you can define cols as the column names you want to remove.
*orbind - uses rbind on the output slots two ovariables. Differing columns are allowed (missing ones are added automatically).
*combine - is similar to orbind, but more efficient and combines source columns.
*merge - merges ovariable outputs.
*summary - provides common statistics about the data using tapply. Defaults to describing the distribution about each ovariable index.
*plot - plots ovariable output. Defaults to comparison of data and formula results.
*Ops - methods for mathematical operations between ovariables (i.e. X * Y).
*Math - methods for single variable mathematical operations (i.e. exp(X)).
 
===External (serverside) data and objects===
*opbase.data - downloads data from the Opasnet database.
*opbase.upload - uploads data to the Opasnet database.
*opbase.locations - downloads the index information of a particular dataset.
*opbase.obj.exists - checks whether object (as identified by page identifier) exists in the database.
*opbase.series - downloads list of datasets for a particular object.
*opasnet.data - downloads data from any file uploaded to Opasnet as text.
*opasnet.csv - downloads data from any .csv file uploaded to Opasnet.
*objects.get - downloads saved R objects matching a key.
*objects.latest - downloads latest saved R objects matching a code block in Opasnet.
*objects.put - uploads R objects. Returns key.
*objects.store - uploads public R objects in Opasnet code block.
*objects.encode - encrypts R objects.
*objects.decode - decrypts R objects.
 
===General tools===
*Ovariable - constructs ovariables. More feature than new("ovariable", ...).
*Fetch - downloads saved R objects in batch fashion.
*tidy - makes common adjustments to data.frames used for ovariable data slots.
*interpret - forms a probability distributions based on regular expressions [[OpasnetUtils/Interpret]].
*result - accesses the result column of the output slot of an ovariable. Result(X) <- y -shortcut is possible.
*ddata_apply - updates data slot of an ovariable based on a link in the ddata slot. Does not overwrite unless force_ddata = TRUE.
*convert.units - is a unit conversion engine.
*fillna - looks for empty column values (NA) in specified data.frame columns and replaces them with all other values in the same column.
*dropall - cleans factors of unused levels.
 
===Health impact assessment===
*GIS.Exposure - does spatial exposure mapping.
*GIS.Concentration.matrix - does spatial concentration mapping based on point emission.
 
==Installation==
OpasnetUtils is available for any platforms capable for running R from the CRAN repository. Use the drop down menu in the RGui or the R command install.packages("OpasnetUtils") to download the most recent official release.
 
===SVN repository===
If you would like to acquire the most recent version, you are welcome to download and compile our source code which is available at https://www.opasnet.org/svn/opasnet_utils/trunk/. For most recent function definitions see [https://www.opasnet.org/svn/opasnet_utils/trunk/R/ the R sub folder]. Compilation on Windows machines requires R tools (See the CRAN homepage for more information).
 
==Manual==
 
[[File:OpasnetUtils-manual.pdf]]

Latest revision as of 08:02, 30 November 2016

Pages that relate to the R package OpasnetUtils (previously called OpasnetBaseUtils).