diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/arrow/r/man/Scalar.Rd | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/arrow/r/man/Scalar.Rd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/arrow/r/man/Scalar.Rd b/src/arrow/r/man/Scalar.Rd new file mode 100644 index 000000000..21e04c12e --- /dev/null +++ b/src/arrow/r/man/Scalar.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/scalar.R +\docType{class} +\name{Scalar} +\alias{Scalar} +\title{Arrow scalars} +\description{ +A \code{Scalar} holds a single value of an Arrow type. +} +\section{Methods}{ + +\verb{$ToString()}: convert to a string +\verb{$as_vector()}: convert to an R vector +\verb{$as_array()}: convert to an Arrow \code{Array} +\verb{$Equals(other)}: is this Scalar equal to \code{other} +\verb{$ApproxEquals(other)}: is this Scalar approximately equal to \code{other} +\verb{$is_valid}: is this Scalar valid +\verb{$null_count}: number of invalid values - 1 or 0 +\verb{$type}: Scalar type +} + +\examples{ +\dontshow{if (arrow_available()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +Scalar$create(pi) +Scalar$create(404) +# If you pass a vector into Scalar$create, you get a list containing your items +Scalar$create(c(1, 2, 3)) + +# Comparisons +my_scalar <- Scalar$create(99) +my_scalar$ApproxEquals(Scalar$create(99.00001)) # FALSE +my_scalar$ApproxEquals(Scalar$create(99.000009)) # TRUE +my_scalar$Equals(Scalar$create(99.000009)) # FALSE +my_scalar$Equals(Scalar$create(99L)) # FALSE (types don't match) + +my_scalar$ToString() +\dontshow{\}) # examplesIf} +} |