OpasnetUtils (version 1.3)

tidy: Format database output for use in ovariables

Description

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

Usage

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

Value

Returns a data.frame

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/

Examples


var1 <- opbase.data("Op_en5674")
var1 <- tidy(var1, "var1")
var1