File: convertInteger.Rd

package info (click to toggle)
r-cran-bbmisc 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,256 kB
  • sloc: ansic: 176; sh: 9; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 611 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convertInteger.R
\name{convertInteger}
\alias{convertInteger}
\title{Conversion for single integer}
\usage{
convertInteger(x)
}
\arguments{
\item{x}{[any]\cr
Argument.}
}
\value{
Either a single integer if conversion was done or \code{x} unchanged.
}
\description{
Convert single numeric to integer only if the numeric represents a single integer,
e.g. 1 to 1L.
Otherwise the argument is returned unchanged.
}
\examples{
str(convertInteger(1.0))
str(convertInteger(1.3))
str(convertInteger(c(1.0, 2.0)))
str(convertInteger("foo"))
}