File: infer_type.Rd

package info (click to toggle)
apache-arrow 23.0.1-4
  • links: PTS
  • area: main
  • in suites:
  • size: 76,368 kB
  • sloc: cpp: 654,608; python: 70,522; ruby: 45,964; ansic: 18,742; sh: 7,367; makefile: 633; javascript: 125; xml: 41
file content (33 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (5)
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
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type.R
\name{infer_type}
\alias{infer_type}
\alias{type}
\title{Infer the arrow Array type from an R object}
\usage{
infer_type(x, ...)

type(x)
}
\arguments{
\item{x}{an R object (usually a vector) to be converted to an \link{Array} or
\link{ChunkedArray}.}

\item{...}{Passed to S3 methods}
}
\value{
An arrow \link[=data-type]{data type}
}
\description{
\code{\link[=type]{type()}} is deprecated in favor of \code{\link[=infer_type]{infer_type()}}.
}
\examples{
infer_type(1:10)
infer_type(1L:10L)
infer_type(c(1, 1.5, 2))
infer_type(c("A", "B", "C"))
infer_type(mtcars)
infer_type(Sys.Date())
infer_type(as.POSIXlt(Sys.Date()))
infer_type(vctrs::new_vctr(1:5, class = "my_custom_vctr_class"))
}