Rdocumentation
powered by
Learn R Programming
lambda.tools (version 1.0.9)
is.scalar: Check if an object is a scalar
Description
This function checks if an object is a scalar.
Arguments
x
An object
Value
A logical value that indicates if the input is of length one
Usage
is.scalar(x)
Details
This function checks to determine if an object
x
is a scalar, i.e. the length of the object is equal to one.
Examples
Run this code
is.scalar(
10
)
is.scalar(
1
:
10
)
Run the code above in your browser using
DataLab