changeBinsize: Change the bin size of a weight frequency data.frame

View source: R/model.R

changeBinsizeR Documentation

Change the bin size of a weight frequency data.frame

Description

Change the bin size of a weight frequency data.frame

Usage

changeBinsize(df, binsize = 10, keepZeros = TRUE)

Arguments

df

data.frame with colums 'Weight' and 'Freq'

binsize

numeric, the bin size in grams

keepZeros

logical, if TRUE the bins with zero observation are not removed

Value

data.frame with weight frequencies binned with bin size binsize

Examples

## Simulate a data set with bin size equal to 100 gr
dat <- simulateData3(binsize=100)

## Change the bin size to 200 gr
dat <- changeBinsize(dat$df, binsize = 200)

alko989/s6model documentation built on Nov. 2, 2023, 10:04 p.m.