view_html: render's HTML code in RStudio's Viewer.

Description Usage Arguments Value Examples

Description

To render's HTML code in RStudio's Viewer, first this function creates a temporary file and then file is loaded to be displayed in the viewer.

Usage

1
view_html(html_txt)

Arguments

html_txt

HTML code to be rendered.

Value

Invisible NULL. The functions puts up a Viewer window and returns immediately.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#generate html
  df <- tibble(
    id = 1:8,
    info = paste0("info jogo",id),
    nome1 = paste0("time 1 - J",id),
    nome2 = paste0("time 2 - J",id),
    prob1 = paste0("prob 1 - J",id),
    prob2 = paste0("prob 2 - J",id)
  )
html_txt <- pd:::tab_copa_america(df$info,df$nome1,df$nome2,df$prob1,df$prob2)

#view it in RStudio's Viewer
view_html(html_txt)

neale-eldash/pd documentation built on June 26, 2021, 10:47 a.m.