Learn R Programming

tcR (version 2.2.4)

sample2D: Get a sample from matrix with probabilities.

Description

Get a sample from matrix or data frame with pair-wise probabilities.

Usage

sample2D(.table, .count = 1)

Arguments

.table

Numeric matrix or data frame with probabilities and columns and rows names.

.count

Number of sample to fetch.

Value

Character matrix with nrow == .count and 2 columns. row[1] in row.names(.table), row[2] in colnames(.table).