Translated fix from base MATLAB

This commit is contained in:
Waldir Leoncio 2020-07-14 14:09:57 +02:00
parent 1dee767e6e
commit 107d07bcf2
2 changed files with 22 additions and 0 deletions

5
R/fix.R Normal file
View file

@ -0,0 +1,5 @@
#' @title Round toward zero
#' @description Rounds each element of input to the nearest integer towards zero. Basically the same as trunc()
#' @param X input element
#' @author Waldir Leoncio
fix <- function(X) trunc(X)

17
man/fix.Rd Normal file
View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fix.R
\name{fix}
\alias{fix}
\title{Round toward zero}
\usage{
fix(X)
}
\arguments{
\item{X}{input element}
}
\description{
Rounds each element of input to the nearest integer towards zero. Basically the same as trunc()
}
\author{
Waldir Leoncio
}