as_named_vector: Converts a single row data.table into a named vector

View source: R/utils.R

as_named_vectorR Documentation

Converts a single row data.table into a named vector

Description

Given a single row data.table, convert it into a named vector. Used in the mvn_inference, to obtain an evidence named vector. For this case, the data.table should contain only the evidence that we want to provide. If a named vector is provided instead of a data.table, nothing will be done and the named vector will be returned.

Usage

as_named_vector(dt)

Arguments

dt

a 1 row data.table or a named vector

Value

a named vector with the values and the variable names


dbnR documentation built on Oct. 5, 2022, 1:07 a.m.