OpasnetBaseUtils: Difference between revisions

From Opasnet
Jump to navigation Jump to search
mNo edit summary
(ideas about structuring R functionalities)
Line 1: Line 1:
{{tool|moderator=Teemu R|stub=Yes}}
{{tool|moderator=Teemu R|stub=Yes}}
OpasnetBaseUtils is a collection of [[R]] functions for interaction with the [[Opasnet Base]] and manipulating data of multiple variables with multiple matching or unmatching dimensions, fitted into a neat package.  
 
==Scope==
 
OpasnetBaseUtils is a collection of [[R]] functions for interaction with the [[Opasnet Base]] and manipulating data of multiple variables with multiple matching or unmatching dimensions, fitted into a neat package. What should such a package contain?
 
==Rationale==
 
A suggestion about the structure and content:
 
There should be just one package (at least for the time being) from Opasnet developers, namely ''OpasnetUtils''. This contains different things:
* OpasnetBaseUtils for connections to and from [[Opasnet Base]].
** Suggested function names: opbase.read (previously op_baseGetData), opbase.write (previously op_baseWrite).
* Functions for some particular tasks needed in Opasnet assessments, such as functions for calculating health impacts from ERF (the function takes in RR or OR or both and automatically calculates a synthesis), exposure and background disease.
** Suggested function names: ophia.lifetable (for life table calculation), ophia.hia (for simple impact calculation), opgis.population (for slicing population data from a database for a case), opmath.sip and opmath.unsip (for turning a random sample into a [[SIPs and SLURPs|SIP]] and a SIP into a random sample, respectively, etc.
* Outdated functions for compatibility reasons, such as [[Operating intelligently with multidimensional arrays in R|IntArray]].
* Functions or practices for handling uncertain variables: how to merge run/obs index into a data.frame.
 
If the suggestion is accepted, the following things could be done to organise pages:
* [[:File:OpasnetBaseUtils 0.8.0.zip]] is moved to [[:File:OpasnetUtils.zip]] (version numbers should NOT be in the filename).
* The content of [[OpasnetBaseUtils]] is copied and the page is redirected to [[:file:OpasnetUtils.zip]].
* [[OpasnetUtils]] is redirected to [[:file:OpasnetUtils.zip]].
* [[File:OpasnetUtils.zip]] contains an explanation and links back to the archived pages mentioned above.
 


== Instructions ==
== Instructions ==

Revision as of 05:39, 7 May 2011


Scope

OpasnetBaseUtils is a collection of R functions for interaction with the Opasnet Base and manipulating data of multiple variables with multiple matching or unmatching dimensions, fitted into a neat package. What should such a package contain?

Rationale

A suggestion about the structure and content:

There should be just one package (at least for the time being) from Opasnet developers, namely OpasnetUtils. This contains different things:

  • OpasnetBaseUtils for connections to and from Opasnet Base.
    • Suggested function names: opbase.read (previously op_baseGetData), opbase.write (previously op_baseWrite).
  • Functions for some particular tasks needed in Opasnet assessments, such as functions for calculating health impacts from ERF (the function takes in RR or OR or both and automatically calculates a synthesis), exposure and background disease.
    • Suggested function names: ophia.lifetable (for life table calculation), ophia.hia (for simple impact calculation), opgis.population (for slicing population data from a database for a case), opmath.sip and opmath.unsip (for turning a random sample into a SIP and a SIP into a random sample, respectively, etc.
  • Outdated functions for compatibility reasons, such as IntArray.
  • Functions or practices for handling uncertain variables: how to merge run/obs index into a data.frame.

If the suggestion is accepted, the following things could be done to organise pages:


Instructions

  1. Download File:OpasnetBaseUtils 0.8.0.zip
  2. Open R
  3. Click "Packages" on the topbar and choose "Install package(s) from local zip files..." from the drop-down menu
  4. Locate the downloaded .zip file and install

Usage

library(OpasnetBaseUtils)

Dependencies

  • You need to have installed another package called RODBC which in turn requires the utils package. These packages are available from the CRAN repositories and can be easily installed from within R.

See also