reformat: Reformat HDRs and confidence intervals objects

Description Usage Arguments Value

View source: R/utils.R

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

1
2
3
4
5
6
7
reformat(OBJ)

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

## S3 method for class '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


stat.extend documentation built on Nov. 23, 2021, 5:06 p.m.