Bin2Dim: Bin two-dimension vectors

Description Usage Arguments Value

Description

Creates a "melted" dataframe of frequencies and probabilities for binned values in 2 arrays

Usage

1
Bin2Dim(df, breaks1, breaks2, midpoints, include_lowest, signif)

Arguments

df

Dataframe of 2 columns

breaks1

Vector of bin ranges or any "breaks" type compatible with hist(), used on x[,1]. Default = "Sturges"

breaks2

Vector of bin ranges or any "breaks" type compatible with hist(), used on x[,2]. Default = "Sturges"

midpoints

Logical, whether or not to use midpoints for labels. Otherwise, ranges are used. Default = TRUE.

include_lowest

Logical, indicating if an value equal to the lowest 'breaks' value should be included.

signif

Integer, the number of digits used in formatting the break numbers. Default = 5.

Value

a dataframe of binned mid-points or ranges, frequencies ("freq"), and probabilities ("prob")


Blakemassey/baear documentation built on Dec. 25, 2021, 9:48 a.m.