reshape_ci {datawizard} | R Documentation |
Reshape CI between wide/long formats
Description
Reshape CI between wide/long formats.
Usage
reshape_ci(x, ci_type = "CI")
Arguments
x |
A data frame containing columns named |
ci_type |
String indicating the "type" (i.e. prefix) of the interval
columns. Per easystats convention, confidence or credible intervals are
named |
Value
A data frame with columns corresponding to confidence intervals reshaped either to wide or long format.
Examples
x <- data.frame(
Parameter = c("Term 1", "Term 2", "Term 1", "Term 2"),
CI = c(.8, .8, .9, .9),
CI_low = c(.2, .3, .1, .15),
CI_high = c(.5, .6, .8, .85),
stringsAsFactors = FALSE
)
reshape_ci(x)
reshape_ci(reshape_ci(x))
[Package datawizard version 0.12.2 Index]