From 98cb21cc4a58442f6aeab4f9fe4de9556cd0dfef Mon Sep 17 00:00:00 2001 From: DominikRafacz Date: Tue, 31 Mar 2020 10:59:03 +0200 Subject: [PATCH] updated docs --- man/aaprop.Rd | 4 +++- man/calc_cs.Rd | 7 +++---- man/calc_ig.Rd | 9 ++++----- man/calc_kl.Rd | 7 +++---- man/fast_crosstable.Rd | 13 ++++++------- man/human_cleave.Rd | 6 ++++-- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/man/aaprop.Rd b/man/aaprop.Rd index 0bc1540..cc2ece3 100644 --- a/man/aaprop.Rd +++ b/man/aaprop.Rd @@ -4,7 +4,9 @@ \name{aaprop} \alias{aaprop} \title{Normalized amino acids properties} -\format{A data frames with 20 columns and 600 rows.} +\format{ +A data frames with 20 columns and 600 rows. +} \source{ AAIndex database. } diff --git a/man/calc_cs.Rd b/man/calc_cs.Rd index 90168aa..334481f 100644 --- a/man/calc_cs.Rd +++ b/man/calc_cs.Rd @@ -4,12 +4,12 @@ \alias{calc_cs} \title{Calculate Chi-squared-based measure} \usage{ -calc_cs(feature, target_b, len_target, pos_target) +calc_cs(feature, target, len_target, pos_target) } \arguments{ \item{feature}{feature vector.} -\item{target_b}{target in bits (as per \code{\link[bit]{as.bit}}).} +\item{target}{target.} \item{len_target}{length of the target vector.} @@ -31,8 +31,7 @@ The function was designed to be as fast as possible subroutine of \examples{ tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) -library(bit) # used to code vector as bit -calc_cs(feat, as.bit(tar), 100, sum(tar)) +calc_cs(feat, tar, 100, sum(tar)) } \seealso{ \code{\link{test_features}}. diff --git a/man/calc_ig.Rd b/man/calc_ig.Rd index 223e2f6..d7e7f3e 100644 --- a/man/calc_ig.Rd +++ b/man/calc_ig.Rd @@ -4,12 +4,12 @@ \alias{calc_ig} \title{Calculate IG for single feature} \usage{ -calc_ig(feature, target_b, len_target, pos_target) +calc_ig(feature, target, len_target, pos_target) } \arguments{ \item{feature}{feature vector.} -\item{target_b}{target in bits (as per \code{\link[bit]{as.bit}}).} +\item{target}{target.} \item{len_target}{length of the target vector.} @@ -32,14 +32,13 @@ In biogram package information gain is computed using following relationship: \note{ During calculations \eqn{0 \log 0 = 0}. For a justification see References. -The function was designed to be as fast as possible subroutine of +The function was designed to be afast subroutine of \code{\link{calc_criterion}} and might be cumbersome if directly called by a user. } \examples{ tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) -library(bit) # used to code vector as bit -calc_ig(feat, as.bit(tar), 100, sum(tar)) +calc_ig(feat, tar, 100, sum(tar)) } \references{ Cover TM, Thomas JA \emph{Elements of Information Theory, 2nd Edition} diff --git a/man/calc_kl.Rd b/man/calc_kl.Rd index 2739d2d..ed6296c 100644 --- a/man/calc_kl.Rd +++ b/man/calc_kl.Rd @@ -4,12 +4,12 @@ \alias{calc_kl} \title{Calculate KL divergence of features} \usage{ -calc_kl(feature, target_b, len_target, pos_target) +calc_kl(feature, target, len_target, pos_target) } \arguments{ \item{feature}{feature vector.} -\item{target_b}{target in bits (as per \code{\link[bit]{as.bit}}).} +\item{target}{target.} \item{len_target}{length of the target vector.} @@ -32,8 +32,7 @@ The function was designed to be as fast as possible subroutine of \examples{ tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) -library(bit) # used to code vector as bit -calc_kl(feat, as.bit(tar), 100, sum(tar)) +calc_kl(feat, tar, 100, sum(tar)) } \references{ Kullback S, Leibler RA \emph{On information and sufficiency}. Annals diff --git a/man/fast_crosstable.Rd b/man/fast_crosstable.Rd index 5dc583f..8da2ae9 100644 --- a/man/fast_crosstable.Rd +++ b/man/fast_crosstable.Rd @@ -2,12 +2,12 @@ % Please edit documentation in R/utilities.R \name{fast_crosstable} \alias{fast_crosstable} -\title{Very fast 2d cross-tabulation} +\title{2d cross-tabulation} \usage{ -fast_crosstable(target_b, len_target, pos_target, feature) +fast_crosstable(target, len_target, pos_target, feature) } \arguments{ -\item{target_b}{target in bits (as per \code{\link[bit]{as.bit}}).} +\item{target}{target.} \item{len_target}{length of the target vector.} @@ -28,8 +28,8 @@ a vector of length four: Quickly cross-tabulates two binary vectors. } \details{ -Input looks odd, but the function was build to be as fast -as possible subroutine of \code{\link{calc_ig}}, which works on +Input looks odd, but the function was build to be fast +subroutine of \code{\link{calc_ig}}, which works on many features but only one target. } \note{ @@ -38,6 +38,5 @@ Binary vector means a numeric vector with 0 or 1. \examples{ tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) -library(bit) # used to code vector as bit -fast_crosstable(as.bit(tar), length(tar), sum(tar), feat) +fast_crosstable(tar, length(tar), sum(tar), feat) } diff --git a/man/human_cleave.Rd b/man/human_cleave.Rd index 0cb9348..a449fd1 100644 --- a/man/human_cleave.Rd +++ b/man/human_cleave.Rd @@ -4,9 +4,11 @@ \name{human_cleave} \alias{human_cleave} \title{Human signal peptides cleavage sites} -\format{A data frame with 1296 observations on the following 10 variables. Columns from +\format{ +A data frame with 1296 observations on the following 10 variables. Columns from \code{P1} to \code{P9} describes positions in an extracted peptide. \code{tar} is a target vector. It -has value 1 if a peptide is a cleavage site and 0 if not.} +has value 1 if a peptide is a cleavage site and 0 if not. +} \source{ \href{http://www.uniprot.org/}{UniProt} }