number2group: Convert a numeric vector into groups

View source: R/ggPredict.R

number2groupR Documentation

Convert a numeric vector into groups

Description

Convert a numeric vector into groups

Usage

number2group(
  x,
  mode = 1,
  values = NULL,
  silent = FALSE,
  label = "label",
  digits = 2,
  colorn = 3
)

Arguments

x

A numeric vector

mode

A numeric. If 1, mean(x) +c(-1,0,1)*sd(x) are used. If 2, quantile(x,probs=c(0.14,0.5,0.86),type=6) are used. If 3, values are used

values

A numeric vector

silent

A logical. Whether table of result will be shown

label

A character string

digits

integer indicating the number of decimal places

colorn

The number of regression lines when the modifier variable(s) are numeric

Examples

number2group(iris$Sepal.Length,label="Sepal.Length")
x=number2group(mtcars$wt,label="wt")
x

predict3d documentation built on April 14, 2023, 12:26 a.m.