get_template: Create a drop-down vignette for nodes from different items...

View source: R/get_templates.R

get_templateR Documentation

Create a drop-down vignette for nodes from different items (for galleries).

Description

Create a drop-down vignette for nodes from different items (for galleries).

Usage

get_template(
  data,
  title = NULL,
  title2 = NULL,
  text = NULL,
  img = NULL,
  wiki = NULL,
  width = 300,
  color = "auto",
  cex = 1,
  roundedImg = FALSE,
  mode = 1
)

Arguments

data

data frame which contains the data.

title

column name which contains the first title of the vignette.

title2

column name which contains the secondary title of the vignette.

text

column name which contains the main text of the vignette.

img

column name which contains the names of the image files.

wiki

column name which contains the wiki URL for the vignette.

width

length of the vignette's width.

color

color of the vignette's strip (It also could be a column name which contains colors).

cex

number indicating the amount by which plotting text should be scaled relative to the default.

roundedImg

Display images with rounded borders.

mode

2 display images next to the text. 1 by default.

Value

a character vector of html formatted vignettes.

Author(s)

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Examples

## Not run: 
data("sociologists")
sociologists$picture <- system.file("extdata", sociologists$picture,
        package="netCoin")
sociologists$html <- get_template(sociologists, title="name",
  title2="birth_country", text="school",img="picture", mode=2)
plot(gallery(sociologists, ntext="html"))

## End(Not run)

netCoin documentation built on March 31, 2023, 7:34 p.m.