File: top.fun.Rd

package info (click to toggle)
r-cran-tcr 2.3.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, trixie
  • size: 2,316 kB
  • sloc: cpp: 187; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datatools.R
\name{top.fun}
\alias{top.fun}
\alias{slice_fun}
\title{Get samples from a repertoire slice-by-slice or top-by-top and apply function to them.}
\usage{
top.fun(.data, .n, .fun, ..., .simplify = T)

slice_fun(.data, .size, .n, .fun, ..., .simplify = T)
}
\arguments{
\item{.data}{Data.frame, matrix, vector or any enumerated type or a list of this types.}

\item{.n}{Vector of values passed to head function for top.fun or the number of slices for slice_fun.}

\item{.fun}{Funtions to apply to every sample subset. First input argument is a data.frame, others are passed as \code{...}.}

\item{...}{Additional parameters passed to the .fun.}

\item{.simplify}{if T then try to simplify result to a vector or to a matrix if .data is a list.}

\item{.size}{Size of the slice for sampling for slice_fun.}
}
\value{
List of length length(.n) for top.fun or .n for slice_fun.
}
\description{
Functions for getting samples from data frames either by consequently applying
head functions (\code{top.fun}) or by getting equal number of rows in the moving window (\code{slice_fun})
and applying specified function to this samples.
}
\examples{
\dontrun{
# Get entropy of V-usage for the first 1000, 2000, 3000, ... clones.
res <- top.fun(immdata[[1]], 1000, entropy.seg)
# Get entropy of V-usage for the interval of clones with indices [1,1000], [1001,2000], ...
res <- top.fun(immdata[[1]], 1000, entropy.seg)
}
}