umap_shiny: Builds a Shiny app that can be used to label embedded texts...

View source: R/umap_shiny.R

umap_shinyR Documentation

Builds a Shiny app that can be used to label embedded texts quickly

Description

Builds a Shiny app that can be used to label embedded texts quickly

Usage

umap_shiny(
  data,
  ...,
  text_var,
  colour_var,
  size = 2,
  umap_height = 600,
  x_var = V1,
  y_var = V2,
  type = "scattergl",
  colour_mapping = NULL
)

Arguments

data

Data frame or tibble

...

Sent to select, allows you to include additional columnsdataTableOutput()

text_var

Text variable

colour_var

Variable colur should be mapped to

size

The size of each point in the UMAP plot

umap_height

total height of UMAP plot

x_var

Variable with x axis co-ordinates

y_var

Variable with y axis co-ordinates

type

a string instructing what type of trace, "scattergl" can handle more points.

colour_mapping

A vector of hexcodes for colour mapping.

Value

shiny app

Examples

## Not run: 
Example 1:
umap_shiny(data, permalink, sentiment, text_var = message, colour_var = cluster)

Example 2:
umap_shiny(data, text_var = text, colour_var = sentiment)

Example 3:
umap_shiny(data, text_var = mention_content, colour_var = entity, x_var = x, y_var = y)


## End(Not run)

jpcompartir/JPackage documentation built on March 20, 2023, 4 a.m.