Learn R Programming

stat.extend (version 0.2.1)

reformat: Reformat HDRs and confidence intervals objects

Description

This function reformats HDRs and confidence intervals back and forth between set format and data frame format. If the object is a 'hdr' object (HDR presented as a set) it is reformatted into a 'hdr.df' object (HDR presented as a data frame) and *vice versa*. If the object is a 'ci' object (confidence interval as a set) it is reformatted into a 'ci.df' object (confidence interval presented as a data frame) and *vice versa*. All attributes and information is preserved when changing formats. If the object is not of a recognised kind (or is of multiple recognised kinds) then it is returned unchanged and the function gives a warning.

Usage

reformat(OBJ)

# S3 method for hdr as.data.frame(x, ...)

# S3 method for ci as.data.frame(x, ...)

Arguments

OBJ

An object to reformat (either a HDR or a confidence interval)

x

an R object

...

unused

Value

Returns the reformatted object