Learn R Programming

ctDNAtools (version 0.4.0)

get_hist_bins: Helper function to bin a variable

Description

Helper function to bin a variable

Usage

get_hist_bins(x, from, to, by, normalized, custom_bins = NULL)

Arguments

x

the variable to be binned

from

the minimum range

to

the maximum range

by

the break length

normalized

whether to normalize the counts to total counts.

custom_bins

A numeric vector for custom breaks to bin the histogram of fragment length. Over-rides bin_size.

Value

A numeric vector having counts within bins normalized by the sum of the variable