to.wide: Functions to convert between long and wide representations of...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These functions are merely wrappers for reshape. Given the complicated syntax of reshape and the particularly simple structure of this problem, the functions facilitate the conversion enormously.

Usage

1
2
3
  to.wide( data, warn=TRUE )
  to.long( data, vars )
  

Arguments

data

A Meth object.

warn

Logical. Should a warning be printed when replicates are taken as items?

vars

The variables representing measurements by different methods. Either a character vector of names, or a numerical vector with the number of the variables in the dataframe.

Details

If data represents method comparisons with exchangeable replicates within method, the transformation to wide format does not necessarily make sense. Also recognizes a

Value

A dataframe.

Author(s)

Bendix Carstensen, Steno Diabetes Center, http://BendixCarstensen.com

See Also

perm.repl

Examples

1
2
3
4
5
6
data( milk )
str( milk )
mw <- to.wide( milk )
str( mw )
( mw <- subset( mw, as.integer(item) < 3 ) )
to.long( mw, 3:4 )

MethComp documentation built on May 2, 2019, 5:06 p.m.

Related to to.wide in MethComp...