Skip to content

Commit

Permalink
[R]: update manuals.
Browse files Browse the repository at this point in the history
  • Loading branch information
zheng-da committed Dec 31, 2016
1 parent 8bc9aec commit 31a9604
Show file tree
Hide file tree
Showing 73 changed files with 266 additions and 185 deletions.
2 changes: 2 additions & 0 deletions Rpkg/R/FlashR.R
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,7 @@ setMethod("is.finite", signature(x = "fmV"), function(x) {
#' @param x a FlashR factor
#' @return The length of \code{levels(x)}, which is zero if \code{x}
#' has no levels.
#' @name nlevels
setMethod("nlevels", signature(x = "fmFactorV"), function(x) x@num.levels)

#' Levels Attributes
Expand All @@ -2090,6 +2091,7 @@ setMethod("nlevels", signature(x = "fmFactorV"), function(x) x@num.levels)
#'
#' @param x a FlashR factor.
#' @return a FlashR vector that contains the value of the levels.
#' @name levels
setMethod("levels", signature(x = "fmFactorV"), function(x)
fm.seq.int(1, x@num.levels, 1))

Expand Down
6 changes: 3 additions & 3 deletions Rpkg/man/Arithmetic.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@
\S4method{^}{fmV,ANY}(e1, e2)
}
\arguments{
\item{e1,e2}{One of the operands need to be a FlashMatrix object. If one operand
\item{e1,e2}{One of the operands need to be a FlashR object. If one operand
is a matrix and the other is a vector, we perform the arithmetic operation
on the vector and every column of the matrix. If one operand is a scalar,
we perform the operation on the scalar with every element in the matrix or
the vector.

There are a few exceptions. For example, the left operand of "^" has to be
a FlashMatrix object and the right operand has to be a scalar.}
a FlashR object and the right operand has to be a scalar.}
}
\description{
Perform unary or binary arithmetic operations on FlashMatrix objects.
Perform unary or binary arithmetic operations on FlashR objects.
}

2 changes: 1 addition & 1 deletion Rpkg/man/Comparison.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
\S4method{<}{ANY,fmV}(e1, e2)
}
\arguments{
\item{e1,e2}{One of the operands need to be a FlashMatrix object. If one operand
\item{e1,e2}{One of the operands need to be a FlashR object. If one operand
is a matrix and the other is a vector, we perform the arithmetic operation
on the vector and every column of the matrix. If one operand is a scalar,
we perform the operation on the scalar with every element in the matrix or
Expand Down
2 changes: 1 addition & 1 deletion Rpkg/man/Extract.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ or numeric vectors.}
\item{drop}{for matrices. If \code{TRUE}, the result is coerced to a vector.}
}
\description{
Operators acting on FlashMatrix vectors and matrices to extract parts of
Operators acting on FlashR vectors and matrices to extract parts of
the objects.
}
\details{
Expand Down
8 changes: 4 additions & 4 deletions Rpkg/man/Extremes.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ pmin2(e1, e2)
\S4method{pmax}{fmV}(..., na.rm = FALSE)
}
\arguments{
\item{e1,e2}{One of the operands need to be a FlashMatrix object. If one
\item{e1,e2}{One of the operands need to be a FlashR object. If one
operand is a matrix and the other is a vector, we perform the operation
on the vector and every column of the matrix. If one operand is a scalar,
we perform the operation on the scalar with every element in the matrix or
the vector.}

\item{x}{a FlashMatrix vector or matrix.}
\item{x}{a FlashR vector or matrix.}

\item{...}{FlashMatrix vectors or matrices.}
\item{...}{FlashR vectors or matrices.}

\item{na.rm}{a logical indicating whether missing values should be removed.}
}
\value{
\code{pmin2}, \code{pmax2}, \code{pmin} and \code{pmax} return
a FlashMatrix object, and \code{min} and \code{max} return an R scalar.
a FlashR object, and \code{min} and \code{max} return an R scalar.
}
\description{
Returns the (parallel) maxima and minima of the input values.
Expand Down
2 changes: 1 addition & 1 deletion Rpkg/man/Logic.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
\method{!}{fmV}(e1)
}
\arguments{
\item{e1,e2}{One of the operands need to be a FlashMatrix object. If one operand
\item{e1,e2}{One of the operands need to be a FlashR object. If one operand
is a matrix and the other is a vector, we perform the arithmetic operation
on the vector and every column of the matrix. If one operand is a scalar,
we perform the operation on the scalar with every element in the matrix or
Expand Down
3 changes: 1 addition & 2 deletions Rpkg/man/MathFun.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
\alias{abs,fmV-method}
\alias{sqrt,fm-method}
\alias{sqrt,fmV-method}
\title{\code{abs(x)} computes the absolute value of x, \code{sqrt(x)} computes the square
root of x.}
\title{Miscellaneous Mathematical Functions}
\usage{
\S4method{abs}{fm}(x)

Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/NA.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
\S4method{is.na}{fmV}(x)
}
\arguments{
\item{x}{an FlashMatrix vector or matrix.}
\item{x}{an FlashR vector or matrix.}
}
\value{
a logical FlashMatrix vector or matrix.
a logical FlashR vector or matrix.
}
\description{
This function indicates which elements are missing.
Expand Down
2 changes: 1 addition & 1 deletion Rpkg/man/all.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fm.all(x, lazy = FALSE)
\S4method{all}{fmV}(x, ..., na.rm = FALSE)
}
\arguments{
\item{x}{a logical FlashMatrix vector.}
\item{x}{a logical FlashR vector.}

\item{lazy}{indicates whether or not to evaluate it lazily.}

Expand Down
2 changes: 1 addition & 1 deletion Rpkg/man/any.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fm.any(x, lazy = FALSE)
\S4method{any}{fmV}(x, ..., na.rm = FALSE)
}
\arguments{
\item{x}{a logical FlashMatrix vector.}
\item{x}{a logical FlashR vector.}

\item{lazy}{indicates whether or not to evaluate it lazily.}

Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/colSums.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ fm.colSums(x, lazy = FALSE)
\S4method{colMeans}{fm}(x, na.rm)
}
\arguments{
\item{x}{a FlashMatrix matrix.}
\item{x}{a FlashR matrix.}

\item{lazy}{logical. indicates whether to evaluate the expression lazily.}

\item{na.rm}{logical. Should missing values (including NaN) be omitted
from the calculations?}
}
\value{
a FlashMatrix vector.
a FlashR vector.
}
\description{
Form row and column sums and means for numeric arrays.
Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/cov.wt-fm-method.Rd → Rpkg/man/cov.wt.Rd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/FlashR_stats.R
\docType{methods}
\name{cov.wt,fm-method}
\alias{cov.wt,fm-method}
\name{cov.wt}
\alias{cov.wt}
\title{Weighted Covariance Matrices}
\usage{
\S4method{cov.wt}{fm}(x, wt = rep(1/nrow(x), nrow(x)), cor = FALSE,
Expand Down
6 changes: 3 additions & 3 deletions Rpkg/man/dim.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
\name{dim}
\alias{dim}
\alias{dim,fm-method}
\title{Dimensions of an FlashMatrix Object}
\title{Dimensions of an FlashR Object}
\usage{
\S4method{dim}{fm}(x)
}
\arguments{
\item{x}{A FlashMatrix matrix.}
\item{x}{A FlashR matrix.}
}
\description{
Retrieve the dimension of an FlashMatrix object.
Retrieve the dimension of an FlashR object.
}

2 changes: 1 addition & 1 deletion Rpkg/man/dimnames.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
\S4method{dimnames}{fmV,list}(x) <- value
}
\arguments{
\item{x}{a FlashMatrix matrix.}
\item{x}{a FlashR matrix.}

\item{value}{a list that provides values for dimension names.}
}
Expand Down
10 changes: 5 additions & 5 deletions Rpkg/man/drop-fm-method.Rd → Rpkg/man/drop.Rd
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/FlashR_base.R
\docType{methods}
\name{drop,fm-method}
\alias{drop,fm-method}
\name{drop}
\alias{drop}
\title{Drop Redundant Extent Information}
\usage{
\S4method{drop}{fm}(x)
}
\arguments{
\item{x}{a FlashMatrix matrix.}
\item{x}{a FlashR matrix.}
}
\value{
a FlashMatrix matrix or vector.
a FlashR matrix or vector.
}
\description{
Delete the dimensions of a FlashMatrix matrix which have only one level.
Delete the dimensions of a FlashR matrix which have only one level.
}
\details{
If the input matrix has only one row or one column, it works the same as
Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/fm-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
\docType{class}
\name{fm-class}
\alias{fm-class}
\title{An S4 class to represent a FlashMatrix matrix.}
\title{An S4 class to represent a FlashR matrix.}
\description{
An S4 class to represent a FlashMatrix matrix.
An S4 class to represent a FlashR matrix.
}
\section{Slots}{

Expand Down
10 changes: 5 additions & 5 deletions Rpkg/man/fm.agg.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\alias{fm.agg.lazy}
\alias{fm.agg.mat}
\alias{fm.agg.mat.lazy}
\title{Aggregation on a FlashMatrix object.}
\title{Aggregation on a FlashR object.}
\usage{
fm.agg(fm, op)

Expand All @@ -16,7 +16,7 @@ fm.agg.mat(fm, margin, op)
fm.agg.mat.lazy(fm, margin, op)
}
\arguments{
\item{fm}{a FlashMatrix object}
\item{fm}{a FlashR object}

\item{op}{the reference or the name of a predefined basic operator or
the reference to an aggregation operator returned by
Expand All @@ -26,12 +26,12 @@ the reference to an aggregation operator returned by
}
\value{
\code{fm.agg} returns a scalar, \code{fm.agg.mat} returns
a FlashMatrix vector, \code{fm.agg.lazy} and \code{fm.agg.mat.lazy}
return a FlashMatrix sink matrix.
a FlashR vector, \code{fm.agg.lazy} and \code{fm.agg.mat.lazy}
return a FlashR sink matrix.
}
\description{
This function accepts a basic operator and perform aggregation on
the FlashMatrix object with the basic operator.
the FlashR object with the basic operator.
}
\details{
\code{fm.agg} aggregates over the entire object.
Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/fm.agg.op-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
\name{fm.agg.op-class}
\alias{fm.agg.op-class}
\title{An S4 class to represent an aggregation operator used in aggregation
operations in FlashMatrix.}
operations in FlashR.}
\description{
An S4 class to represent an aggregation operator used in aggregation
operations in FlashMatrix.
operations in FlashR.
}
\section{Slots}{

Expand Down
6 changes: 3 additions & 3 deletions Rpkg/man/fm.apply.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
fm.apply(x, margin, FUN)
}
\arguments{
\item{x}{a FlashMatrix matrix.}
\item{x}{a FlashR matrix.}

\item{margin}{an integer. \code{1} indicates rows and \code{2} indicates columns.}

\item{FUN}{a string that indicates the name of the predefined function.}
}
\value{
a FlashMatrix matrix.
a FlashR matrix.
}
\description{
Apply a predefined function on rows/columns of a FlashMatrix matrix.
Apply a predefined function on rows/columns of a FlashR matrix.
The predefined function always output a vector of the same length. Thus,
the output of \code{fm.apply} is a matrix.
}
Expand Down
8 changes: 4 additions & 4 deletions Rpkg/man/fm.as.factor.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
% Please edit documentation in R/FlashR.R
\name{fm.as.factor}
\alias{fm.as.factor}
\title{Convert a FlashMatrix vector to a FlashMatrix factor vector.}
\title{Convert a FlashR vector to a FlashR factor vector.}
\usage{
fm.as.factor(fm, num.levels = -1)
}
\arguments{
\item{fm}{a FlashMatrix vector.}
\item{fm}{a FlashR vector.}

\item{num.levels}{The number of levels in the factor vector.}
}
\value{
a FlashMatrix factor vector.
a FlashR factor vector.
}
\description{
Convert a FlashMatrix vector to a FlashMatrix factor vector.
Convert a FlashR vector to a FlashR factor vector.
}

2 changes: 1 addition & 1 deletion Rpkg/man/fm.ase.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fm.spectral.embedding(fm, nev, which = c("A, Aug, L, nL"), c = 1/nrow(fm),
ncv = 2 * nev, tol = 1e-12)
}
\arguments{
\item{fm}{The FlashMatrixR object}
\item{fm}{The FlashR object}

\item{nev}{The number of eigenvalues/vectors required.}

Expand Down
4 changes: 2 additions & 2 deletions Rpkg/man/fm.basic.op.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
\alias{fm.get.basic.op}
\alias{fm.get.basic.uop}
\alias{fm.init.basic.op}
\title{The basic operators supported by FlashMatrix.}
\title{The basic operators supported by FlashR.}
\format{\preformatted{ NULL
}}
\usage{
Expand Down Expand Up @@ -116,7 +116,7 @@ fm.init.basic.op()
a reference to the specified basic operator.
}
\description{
The basic operators are mainly used by the FlashMatrix functions that
The basic operators are mainly used by the FlashR functions that
accept operators as arguments. Such a function includes \code{fm.mapply},
\code{fm.inner.prod}, etc.
}
Expand Down
6 changes: 3 additions & 3 deletions Rpkg/man/fm.conv.FM2R.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
% Please edit documentation in R/FlashR.R
\name{fm.conv.FM2R}
\alias{fm.conv.FM2R}
\title{Convert a FlashMatrix object to a regular R object}
\title{Convert a FlashR object to a regular R object}
\usage{
fm.conv.FM2R(obj)
}
\arguments{
\item{obj}{a FlashMatrix object}
\item{obj}{a FlashR object}
}
\value{
a regular R object.
}
\description{
Convert a FlashMatrix object to a regular R object
Convert a FlashR object to a regular R object
}
\author{
Da Zheng <dzheng5@jhu.edu>
Expand Down
9 changes: 4 additions & 5 deletions Rpkg/man/fm.conv.R2FM.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@
% Please edit documentation in R/FlashR.R
\name{fm.conv.R2FM}
\alias{fm.conv.R2FM}
\title{Convert a regular R object to a FlashMatrix object.}
\title{Convert a regular R object to a FlashR object.}
\usage{
fm.conv.R2FM(obj, byrow = FALSE)
}
\arguments{
\item{obj}{a regular R object}

\item{byrow}{a logical value to determine the data layout of a FlashMatrix
matrix.}
\item{byrow}{a logical value to determine the data layout of a FlashR matrix.}
}
\value{
a FlashMatrix object. If the input R object has 0 element,
a FlashR object. If the input R object has 0 element,
\code{fm.conv.R2FM} returns \code{NULL}.
}
\description{
If the R object is a matrix, \code{byrow} determines how data in the generated
FlashMatrix object is organized in memory.
FlashR object is organized in memory.
}
\author{
Da Zheng <dzheng5@jhu.edu>
Expand Down
Loading

0 comments on commit 31a9604

Please sign in to comment.