hist.leem: Histogram graph

View source: R/plots.R

hist.leemR Documentation

Histogram graph

Description

Class method leem for generic hist

Usage

## S3 method for class 'leem'
hist(
  x,
  freq = "a",
  bg = TRUE,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  grids = grid(col = "white"),
  bgcol = "gray",
  bgborder = NA,
  barcol = "yellow",
  barborder = "gray",
  ...
)

Arguments

x

R object (list) of class leem. Use new_leem() function.

freq

Character argument. Type of frequency with options: "a" (absolute and default), "r" relative and "p" percentage.

bg

Logical argument. Default is TRUE, it displays the background, and bg = FALSE otherwise.

main

Insert the plot title. The default is NULL.

xlab

Insert the title of the x-axis graphic label. The default is NULL.

ylab

Insert the title of the y-axis graphic label. The default is NULL.

grids

Insert grids to plot. The default is grid(col = "white").

bgcol

Insert the background color. This argument is only valid when bg = TRUE. The default is bgcol="gray".

bgborder

Insert the background border color. This argument is only valid when bg = TRUE. The default is bgborder = NA.

barcol

Insert the barplot color. The default is barcol = "yellow". This argument is only valid when bars = TRUE.

barborder

Numeric argument. Insert the barplot border color. This argument is only valid when bars = TRUE. The default is barborder = "gray".

...

further arguments passed to or from other methods.

Examples

# Example 1
library(leem)
rnorm(36, 100, 50) |> new_leem(variable = "continuous") |> tabfreq() |> hist()

# Example 2
library(leem)
school <- rep(c("high", "university", "basic"), 3:5)
sample(school, 30, TRUE) |>
 new_leem() |>
 tabfreq(ordered = c("basic", "high", "university"))


leem documentation built on April 3, 2025, 6:04 p.m.

Related to hist.leem in leem...