2020-01-30 15:44:13 +01:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
|
% Please edit documentation in R/size.R
|
|
|
|
|
\name{size}
|
|
|
|
|
\alias{size}
|
|
|
|
|
\title{Size of an object}
|
|
|
|
|
\usage{
|
|
|
|
|
size(x, d)
|
|
|
|
|
}
|
|
|
|
|
\arguments{
|
|
|
|
|
\item{x}{object to be evaluated}
|
|
|
|
|
|
|
|
|
|
\item{d}{dimension of object to be evaluated}
|
|
|
|
|
}
|
|
|
|
|
\description{
|
|
|
|
|
This functions tries to replicate the behavior of the base function "size" in Matlab
|
|
|
|
|
}
|
|
|
|
|
\note{
|
2020-03-18 08:26:06 +01:00
|
|
|
On MATLAB, size(1, 100) returns 1. As a matter of fact, if the user
|
2020-01-30 15:44:13 +01:00
|
|
|
calls for a dimension which x doesn't have `size()` always returns 1. R's
|
|
|
|
|
default behavior is more reasonable in those cases (i.e., returning NA),
|
|
|
|
|
but since the point of this function is to replicate MATLAB behaviors
|
|
|
|
|
(bugs and questionable behaviors included), this function also does this.
|
|
|
|
|
}
|