nt_dotplot: Dotplot

View source: R/dotplot.R

nt_dotplotR Documentation

Dotplot

Description

Plot dotplot for several variables.

Usage

nt_dotplot(
  data,
  group = NULL,
  binwidth = 1,
  save = FALSE,
  fig.height = 5,
  fig.width = 5,
  std_fun = std_dotplot,
  std_fun_group = std_dotplot_group,
  ...
)

Arguments

data

a data frame with the variables.

group

an optional data frame with the group variable.

binwidth

a numerical vector specifying the bin width for each variable.

save

a logical value indicating whether the output should be saved as a jpeg file.

fig.height

a numeric value indicating the height (in) of the file.

fig.width

a numeric value indicating the width (in) of the file.

std_fun

a function to plot a dotplot when group = NULL. It must follow the same structure of the function std_dotplot.

std_fun_group

a function to plot a dotplot when group is provided. It must follow the same structure of the function std_dotplot_group.

...

additional input arguments that may be used when creating your own function.

Details

The functions std_dotplot and std_dotplot_group can be modified by the user in order to customize the dotplots a prior. The plots also can be modified a posterior as a regular ggplot object. See geom_dotplot, std_dotplot and std_dotplot_group.

Value

a list of ggplot objects with each item named by the column names from var.

Examples

data(iris)
iris |> nt_dotplot(binwidth = 0.05)
iris |> nt_dotplot(group = Species, binwidth = 0.05)


dnzmarcio/ntimes documentation built on Jan. 4, 2024, 2:23 p.m.