File: compressDataFrame.Rd

package info (click to toggle)
r-cran-rpf 1.0.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,484 kB
  • sloc: cpp: 5,364; sh: 114; ansic: 41; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataframe.R
\name{compressDataFrame}
\alias{compressDataFrame}
\title{Compress a data frame into unique rows and frequencies}
\usage{
compressDataFrame(tabdata, freqColName = "freq", .asNumeric = FALSE)
}
\arguments{
\item{tabdata}{An object of class \code{data.frame}}

\item{freqColName}{Column name to contain the frequencies}

\item{.asNumeric}{logical. Whether to cast the frequencies to the numeric type}
}
\value{
Returns a compressed data frame
}
\description{
Compress a data frame into unique rows and frequency counts.
}
\examples{
df <- as.data.frame(matrix(c(sample.int(2, 30, replace=TRUE)), 10, 3))
compressDataFrame(df)
}