Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Change the type of an array or column

Source:R/dplyr-funcs-type.R
cast.Rd

This is a wrapper around the$cast() method that many Arrow objects have.It is more convenient to call insidedplyr pipelines than the method.

Usage

cast(x,to, safe=TRUE,...)

Arguments

x

anArray,Table,Expression, or similar Arrow data object.

to

DataType to cast to; forTable andRecordBatch,it should be aSchema.

safe

logical: only allow the type conversion if no data is lost(truncation, overflow, etc.). Default isTRUE.

...

specificCastOptions to set

Value

AnExpression

See also

data-type for a list ofDataType to be used withto.

Arrow C++ CastOptions documentation # nolintfor the list of supported CastOptions.

Examples

if(FALSE){# \dontrun{mtcars%>%arrow_table()%>%mutate(cyl=cast(cyl,string()))}# }

[8]ページ先頭

©2009-2025 Movatter.jp