% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util.R \name{row.pair.apply} \alias{row.pair.apply} \alias{row.pair.apply,} \alias{col.pair.apply} \title{Apply function to pairs of matrix rows or columns.} \usage{ row.pair.apply(X, FUN) col.pair.apply(X, FUN) } \arguments{ \item{X}{Matrix.} \item{FUN}{Function to apply to each pair.} } \description{ \code{row.pair.apply} applies \code{FUN} to each unique row pair without self interaction while \code{col.pair.apply} does the same for columns. } \examples{ X <- matrix(seq(12), 4, 3) # matrix containing all row to row differences. row.pair.apply(X, `-`) } \keyword{internal}