Learn R Programming

matsindf (version 0.4.8)

df_to_msg: Create a message from a data frame

Description

This function is especially helpful for cases when a data frame of missing or unset values is at hand. Trim unneeded columns, then call this function to create a string with rows separated by semicolons and entries separated by commas.

Usage

df_to_msg(df)

Value

A string with rows separated by semicolons and entries separated by commas.

Arguments

df

The data frame to be converted to a message

Examples

Run this code
data.frame(a = c(1, 2, 3), b = c("a", "b", "c")) |>
  df_to_msg()

Run the code above in your browser using DataLab