tidy: Format database output for use in ovariables

Description Usage Arguments Details Value Author(s) Examples

Description

Wrapper for various standard operations applied on ovariable data from the OpasnetBase.

Usage

1
2
tidy(data, objname = "", idvar = "Obs", direction = "wide", 
    widecol = NULL, base1 = FALSE)

Arguments

data

data.frame to be formatted

objname

character prefix to be added to variable specific rows like "Result" and "Unit"

idvar

reshape idvar

direction

reshape direction

widecol

reshape timevar, specifiec column to be expanded

base1

compatibility with obsolete database

Details

Uses reshape, renames "Result" and "Unit" columns and gets rid of unwanted columns from old database merged data.

See also: http://en.opasnet.org/

Value

Returns a data.frame

Author(s)

T. Rintala teemu.rintala.a@gmail.com

Examples

1
2
3
4
5
6
## Not run: 
var1 <- opbase.data("Op_en5674")
var1 <- tidy(var1, "var1")
var1

## End(Not run)

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.