rename_inla2brms: Rename strings/variable from 'inla' to 'brms' equivalent

Description Usage Arguments Details Value Examples

View source: R/utils_01-A.R

Description

Rename strings/variable from inla to brms equivalent.

Usage

1

Arguments

x

Character with inla strings.

Details

Rename variables and names in inla to be easier to use in plots and summary by using the brms as closely as possible. For example (Intercept) becomes Intercept, Beta for A becomes b_A and "Precision for the Gaussian observations" becomes Precision.

Value

Character with inla strings renamed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
df <- data.frame(
 x = c(
  NA_character_,
  "Precision for the Gaussian observations",
  "SD for the Gaussian observations",
  "sd for the Gaussian observations",
  "unknown", "(Intercept)",
  "Beta for A", "Beta for B", "Beta for B"),
 y = c(NA_character_,
  "Precision", "sigma", "sigma",
  "unknown", "b_Intercept",
  "b_A","b_B", "b_B"))
z <- rename_inla2brms(df$x)
stopifnot(identical(z, df$y))

FrankLef/eflINLA documentation built on Dec. 17, 2021, 8:30 p.m.