Commit 6a79139b by Eric Coissac

remove last . in the parameters names

parent 3ae4ee82
......@@ -47,7 +47,7 @@ NULL
#' @param x The data to coerce
#' @param nrows an interger value specifying the number of row
#' of the returned matrix
#' @param contrasts see the \code{contrasts.arg} argument
#' @param contrasts see the \code{contrasts_arg} argument
#' of the \code{\link[ProcMod]{procmod_frame}}
#' constructor.
#'
......@@ -183,20 +183,20 @@ NULL
#' numeric matrices, or dist objects. Every objects
#' must have the same number of row.
#'
#' @param row.names a character vector containing names associated
#' @param row_names a character vector containing names associated
#' to each row.
#'
#' @param check.rows a logical value. When set to \code{TRUE}, its
#' @param check_rows a logical value. When set to \code{TRUE}, its
#' default value, the number of row of every elements of the
#' \code{procmod_frame} are tested for equality. Otherwise no
#' check is done.
#'
#' @param reorder.rows a logical value. When set to \code{TRUE}, its
#' @param reorder_rows a logical value. When set to \code{TRUE}, its
#' default value, every elements of the
#' \code{procmod_frame} are reordered according to the \code{row.names}
#' \code{procmod_frame} are reordered according to the \code{row_names}
#' order. Otherwise nothing is done.
#'
#' @param contrasts.arg A list, whose entries are values
#' @param contrasts_arg A list, whose entries are values
#' (numeric matrices or character strings naming functions)
#' to be used as replacement values for the contrasts
#' replacement function and whose names are the names
......@@ -228,11 +228,11 @@ NULL
#' @author Christelle Gonindard-Melodelima
#' @export
procmod_frame <- function(...,
row.names = NULL,
check.rows = TRUE,
reorder.rows = TRUE,
contrasts.arg = NULL) {
has.row.names <- !missing(row.names)
row_names = NULL,
check_rows = TRUE,
reorder_rows = TRUE,
contrasts_arg = NULL) {
has.row_names <- !missing(row_names)
varnames <- dots_names(...)
......@@ -241,10 +241,10 @@ procmod_frame <- function(...,
# message(x)
# message(n)
# message(row.names)
# message(row_names)
if ((!has.row.names || is.null(row.names)) && n >= 1) {
row.names <- .siteNames(x[[1]])
if ((!has.row_names || is.null(row_names)) && n >= 1) {
row_names <- .siteNames(x[[1]])
}
nrows <- integer(n)
......@@ -255,7 +255,7 @@ procmod_frame <- function(...,
# types <- character(n)
for (i in seq_len(n)) {
contrasts <- contrasts.arg[varnames[i]]
contrasts <- contrasts_arg[varnames[i]]
if (i == 1) {
xi <- .procmod_coerce_value(x[[i]],
contrasts = contrasts
......@@ -267,10 +267,10 @@ procmod_frame <- function(...,
)
}
if (reorder.rows &&
!is.null(row.names) &&
if (reorder_rows &&
!is.null(row_names) &&
!is.null(.siteNames(xi))) {
xi <- .siteSelect(xi, row.names)
xi <- .siteSelect(xi, row_names)
}
nrows[i] <- .siteCount(xi)
......@@ -278,18 +278,18 @@ procmod_frame <- function(...,
}
stopifnot(all(nrows[i] == nrows))
# message(row.names," : ",length(row.names),",",nrows[i])
if (length(row.names) == nrows[i]) {
attr(value, "row.names") <- row.names
if (check.rows) {
# message(row_names," : ",length(row_names),",",nrows[i])
if (length(row_names) == nrows[i]) {
attr(value, "row_names") <- row_names
if (check_rows) {
for (i in seq_len(n)) {
if (!all(row.names == .siteNames(value[[i]]))) {
if (!all(row_names == .siteNames(value[[i]]))) {
stop("Row names among matrices are not consistant")
}
}
} else {
for (i in seq_len(n))
.siteNames(value[[i]]) <- row.names
.siteNames(value[[i]]) <- row_names
}
}
else {
......@@ -436,7 +436,7 @@ dim.procmod_frame <- function(x)
}
}
.siteNames(value) <- attr(x, "row.names")
.siteNames(value) <- attr(x, "row_names")
x[[i]] <- value
class(x) <- cl
......@@ -498,7 +498,7 @@ dim.procmod_frame <- function(x)
y <- y[[1]]
} else {
y <- make_subS3Class(y, "procmod_frame")
attr(y, "row.names") <- rownames(y[[1]])
attr(y, "row_names") <- rownames(y[[1]])
}
y
......
......@@ -12,7 +12,7 @@
\item{nrows}{an interger value specifying the number of row
of the returned matrix}
\item{contrasts}{see the \code{contrasts.arg} argument
\item{contrasts}{see the \code{contrasts_arg} argument
of the \code{\link[ProcMod]{procmod_frame}}
constructor.}
}
......
......@@ -4,8 +4,8 @@
\alias{procmod_frame}
\title{The procmod_frame data structure.}
\usage{
procmod_frame(..., row.names = NULL, check.rows = TRUE,
reorder.rows = TRUE, contrasts.arg = NULL)
procmod_frame(..., row_names = NULL, check_rows = TRUE,
reorder_rows = TRUE, contrasts_arg = NULL)
}
\arguments{
\item{...}{a set of objects to aggregate into a
......@@ -13,20 +13,20 @@ procmod_frame(..., row.names = NULL, check.rows = TRUE,
numeric matrices, or dist objects. Every objects
must have the same number of row.}
\item{row.names}{a character vector containing names associated
\item{row_names}{a character vector containing names associated
to each row.}
\item{check.rows}{a logical value. When set to \code{TRUE}, its
\item{check_rows}{a logical value. When set to \code{TRUE}, its
default value, the number of row of every elements of the
\code{procmod_frame} are tested for equality. Otherwise no
check is done.}
\item{reorder.rows}{a logical value. When set to \code{TRUE}, its
\item{reorder_rows}{a logical value. When set to \code{TRUE}, its
default value, every elements of the
\code{procmod_frame} are reordered according to the \code{row.names}
\code{procmod_frame} are reordered according to the \code{row_names}
order. Otherwise nothing is done.}
\item{contrasts.arg}{A list, whose entries are values
\item{contrasts_arg}{A list, whose entries are values
(numeric matrices or character strings naming functions)
to be used as replacement values for the contrasts
replacement function and whose names are the names
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment