some: Check random lines in the data (including phyloseq objects)

View source: R/some.R

someR Documentation

Check random lines in the data (including phyloseq objects)

Description

Returns several random lines from the data.frame, matrix or phyloseq. Usage is quite similar to the head or tail functions.

Usage

some(x, n = 10, n_otu = 10)

Arguments

x

Coluld be a data.frame, matrix, or phyloseq-class

n

Number of records (or samples in phyloseq) that will be returned

n_otu

Number of OTUs to show (if the input is phyloseq-object)

Value

Part of the data.frame or matrix with n lines or a subset of phyloseq-object.

Author(s)

Adapted from some in the car-package by John Fox.

Examples

# Load phyloseq data
data(enterotype)
some(enterotype)

# If input is data.frame or matrix
x <- matrix(rnorm(500), ncol=5)
some(x)


vmikk/metagMisc documentation built on Feb. 14, 2024, 2:29 a.m.