Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Create an Arrow Table

Source:R/table.R
table.Rd

Create an Arrow Table

Usage

arrow_table(..., schema=NULL)

Arguments

...

Adata.frame or a named set of Arrays or vectors. If given amixture of data.frames and named vectors, the inputs will be autospliced together(see examples). Alternatively, you can provide a single Arrow IPCInputStream,Message,Buffer, or Rraw object containing aBuffer.

schema

aSchema, orNULL (the default) to infer the schema fromthe data in.... When providing an Arrow IPC buffer,schema is required.

See also

Table

Examples

tbl<-arrow_table(name=rownames(mtcars),mtcars)dim(tbl)#> [1] 32 12dim(head(tbl))#> [1]  6 12names(tbl)#>  [1] "name" "mpg"  "cyl"  "disp" "hp"   "drat" "wt"   "qsec" "vs"   "am"#> [11] "gear" "carb"tbl$mpg#> ChunkedArray#> <double>#> [#>   [#>     21,#>     21,#>     22.8,#>     21.4,#>     18.7,#>     18.1,#>     14.3,#>     24.4,#>     22.8,#>     19.2,#>     ...#>     15.2,#>     13.3,#>     19.2,#>     27.3,#>     26,#>     30.4,#>     15.8,#>     19.7,#>     15,#>     21.4#>   ]#> ]tbl[["cyl"]]#> ChunkedArray#> <double>#> [#>   [#>     6,#>     6,#>     4,#>     6,#>     8,#>     6,#>     8,#>     4,#>     4,#>     6,#>     ...#>     8,#>     8,#>     8,#>     4,#>     4,#>     4,#>     8,#>     6,#>     8,#>     4#>   ]#> ]as.data.frame(tbl[4:8,c("gear","hp","wt")])#>   gear  hp    wt#> 1    3 110 3.215#> 2    3 175 3.440#> 3    3 105 3.460#> 4    3 245 3.570#> 5    4  62 3.190

[8]ページ先頭

©2009-2025 Movatter.jp