bs_freq_table_cont: Frequency table for continuous data

Description Usage Arguments Value Examples

View source: R/bs_freq_table_cont.R

Description

Frequency table for continuous data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
bs_freq_table_cont(
  y,
  nbins = NULL,
  bin_width = NULL,
  xmin = NULL,
  xmax = NULL,
  max_bin_decimals = 2,
  percent_decimals = 1,
  right = TRUE
)

## S3 method for class 'bs_freq_table_cont'
pander(
  x,
  ...,
  caption = "Frequency table",
  justify = c("crrrr"),
  style = "simple"
)

Arguments

y

(numeric) A numeric vector with data.

nbins

(integer) Number of bins.

bin_width

(number) Bin width.

xmin

(number) Lower position of the lowest bin. Not bigger than min(x).

xmax

(number) Upper position of the highest bin. Not smaller than max(x).

max_bin_decimals

(integer) Maximum number of significant decimal digits to display in bin names.

percent_decimals

(integer) Number of decimal numbers in percentages.

right

(logical) Flag that indicates if the intervals should be closed on the right and open on the left (default) or vice versa.

x

object to print

...

further arguments to methods

caption

(string) caption

justify

(string) Column justification

style

(string) the name of style for table.

Value

Object of classes bs_freq_table_cont, data.frame.

Examples

1
2
3
4
5
6
7
8
library(biostat)
library(pander)
bs_freq_table_cont(iris$Sepal.Length, nbins = 5)
bs_freq_table_cont(iris$Sepal.Length, bin_width = 1, xmin = 4)
bs_freq_table_cont(iris$Sepal.Length, nbins = 5) %>% pander()

# [!!!BLOGAI]:
# bs_freq_table_cont(iris$Sepal.Length, bin_width = 5, xmax = 10)

GegznaV/BioStat documentation built on Aug. 14, 2020, 9:30 p.m.