Learn R Programming

mmb (version 0.13.3)

bayesToLatex: Create a string that can be used in Latex in an e.g. equation-environment.

Description

This function can be used to generate Latex-markup that models the full dependency between covariates and a target variable.

Usage

bayesToLatex(conditionalFeatures, targetFeature, includeValues = FALSE)

Arguments

conditionalFeatures

data.frame of Bayesian features, the target feature depends on.

targetFeature

data.frame that holds exactly one Bayesian feature, that is supposed to be the target-feture for Bayesian inferencing.

includeValues

default FALSE boolean to indicate whether to include the features' values or not, i.e. "A" vs. "A = setosa".

Value

a string that can be used in Latex documents.

Examples

Run this code
# NOT RUN {
feat1 <- mmb::createFeatureForBayes(
  name = "Petal.Length", value = mean(iris$Petal.Length))
feat2 <- mmb::createFeatureForBayes(
  name = "Petal.Width", value = mean(iris$Petal.Width))
featT <- mmb::createFeatureForBayes(
  name = "Species", iris[1,]$Species, isLabel = TRUE)

cat(mmb::bayesToLatex(conditionalFeatures = rbind(feat1, feat2),
  targetFeature = featT, includeValues = TRUE))
# }

Run the code above in your browser using DataLab