Submit a table using Teamr package in R

Asked

Viewed 18 times

1

I am developing an R routine to send data updates to the users of a MS Teams group using the Teamr package. Difficulty arises in formatting messages...

library(teamr)
canal = "https://outlook.office.com/webhook/00487f9d..."
con <- connector_card$new(hookurl = canal )
con$title("Título")
con$text("Corpo")
con$send()

The result...

inserir a descrição da imagem aqui

However, the "Body" needs to be formatted internally even for CR-LF.

con$title("Título")
con$text(
  paste("Linha1","Linha2","Linha3","Linha4", sep = "<br>"))
con$send()

The result... inserir a descrição da imagem aqui

If I need to use tables, I have to make strings with <tr><td></td></tr>. The code becomes a nightmare.

Question: Is there a package/function/way to generate HTML strings in an easier way?

  • The package xtable allows you to export tables to HTML format.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.