Implemented base MATLAB function in R

This commit is contained in:
Waldir Leoncio 2020-01-30 15:44:13 +01:00
parent 309519dd08
commit e645d00fca
3 changed files with 72 additions and 0 deletions

23
man/size.Rd Normal file
View file

@ -0,0 +1,23 @@
% 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{
On MATLAB, size(1, 100) returns 1. As a matter of fact, if the user
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.
}