Added computeRows

This commit is contained in:
Waldir Leoncio 2019-12-17 10:53:59 +01:00
parent 680739bccc
commit 44c0769837
8 changed files with 152 additions and 24 deletions

19
man/computeRows.Rd Normal file
View file

@ -0,0 +1,19 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/computeRows.R
\name{computeRows}
\alias{computeRows}
\title{Compute rows}
\usage{
computeRows(rowsFromInd, inds, ninds)
}
\arguments{
\item{rowsFromInd}{rowsFromInd}
\item{inds}{matrix}
\item{ninds}{ninds}
}
\description{
Individuals inds have been given. The function returns a vector,
containing the indices of the rows, which contain data from the individuals.
}

26
man/repmat.Rd Normal file
View file

@ -0,0 +1,26 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/repmat.R
\name{repmat}
\alias{repmat}
\title{Repeat matrix}
\usage{
repmat(mx, n)
}
\arguments{
\item{mx}{matrix}
\item{n}{either a scalat with the number of replications in both rows and columns or a 2-length vector with individual repetitions.}
}
\value{
matrix replicated over `ncol(mx) * n` columns and `nrow(mx) * n` rows
}
\description{
Repeats a matrix over n columns and rows
}
\details{
This function was created to replicate the behavior of a homonymous
function on Matlab
}
\note{
The Matlab implementation of this function accepts `n` with length > 2.
}