pfit: S3 interface to polyafit

pfitR Documentation

S3 interface to polyafit

Description

S3 interface to polyafit

Usage

pfit(x, min_counts = 5, ...)

## S3 method for class 'matrix'
pfit(x, min_counts = 5)

## S3 method for class 'data.frame'
pfit(x, min_counts = 5, rownames_in = 1)

Arguments

x

A matrix or data frame with one row per observation and column per feature

min_counts

Minimum number of observed counts for a feature to be included in the fit

...

Additional arguments passed to other methods

rownames_in

The column of the data frame that gives the rownames for the data. Can be specified as an integer index or with the column name in quotes. Set to NULL to use the existing rownames of the data frame.

Value

An object of class "pfit", with the following attributes:

data

The data matrix. Row and column names will be created automatically if the original data matrix lacked them.

is_included

Boolean vector indicating if the feature was included in the model.

params

Best-fit model parameters.

theta

The overdispersion parameter, 1 / sum(params).

Examples

x <- matrix(c(56, 42, 122, 100, 8, 15, 21, 14, 82, 98), nrow = 2)
p <- pfit(x)
p$params
p$theta

kylebittinger/polyafit documentation built on Jan. 11, 2023, 8:53 a.m.