Commit d502465c authored by aho's avatar aho
Browse files

Add 'ncores' back and add a warning saying it is deprecated

parent f2fe6b0a
......@@ -8,6 +8,8 @@
#'@param lendim An integer indicating the length of the new dimension.
#'@param name A character string indicating the name for the new dimension.
#' The default value is NULL.
#'@param ncores An integer indicating the number of cores to use for parallel
#' computation. The default value is NULL. This parameter is deprecated now.
#'
#'@return An array as parameter 'data' but with the added named dimension.
#'
......@@ -18,7 +20,7 @@
#'
#'@import multiApply
#'@export
InsertDim <- function(data, posdim, lendim, name = NULL) {
InsertDim <- function(data, posdim, lendim, name = NULL, ncores = NULL) {
# Check inputs
## data
......@@ -59,6 +61,9 @@ InsertDim <- function(data, posdim, lendim, name = NULL) {
stop("Parameter 'name' must be a character string.")
}
}
## ncores
if (!missing("ncores"))
warning("Argument 'ncores' is deprecated.")
###############################
# Calculate InsertDim
......
......@@ -4,7 +4,7 @@
\alias{InsertDim}
\title{Add a named dimension to an array}
\usage{
InsertDim(data, posdim, lendim, name = NULL)
InsertDim(data, posdim, lendim, name = NULL, ncores = NULL)
}
\arguments{
\item{data}{An array to which the additional dimension to be added.}
......@@ -15,6 +15,9 @@ InsertDim(data, posdim, lendim, name = NULL)
\item{name}{A character string indicating the name for the new dimension.
The default value is NULL.}
\item{ncores}{An integer indicating the number of cores to use for parallel
computation. The default value is NULL. This parameter is deprecated now.}
}
\value{
An array as parameter 'data' but with the added named dimension.
......
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