[ interface for disk.frame using fst backend

# S3 method for disk.frame
[(
  df,
  ...,
  keep = NULL,
  rbind = TRUE,
  use.names = TRUE,
  fill = FALSE,
  idcol = NULL
)

Arguments

df

a disk.frame

...

same as data.table

keep

the columns to srckeep

rbind

Whether to rbind the chunks. Defaults to TRUE

use.names

Same as in data.table::rbindlist

fill

Same as in data.table::rbindlist

idcol

Same as in data.table::rbindlist

Examples

cars.df = as.disk.frame(cars)
speed_limit = 50
cars.df[speed < speed_limit ,.N, cut(dist, pretty(dist))]
#> data.table syntax for disk.frame may be moved to a separate package in the future
#>           cut N
#>  1:     (0,5] 2
#>  2:    (5,10] 2
#>  3:   (20,25] 1
#>  4:   (15,20] 2
#>  5:   (25,30] 1
#>  6:   (30,35] 1
#>  7:   (15,20] 2
#>  8:   (25,30] 3
#>  9:   (10,15] 1
#> 10:   (20,25] 1
#> 11:   (30,35] 2
#> 12:   (40,50] 1
#> 13:   (20,30] 2
#> 14:   (30,40] 2
#> 15:   (50,60] 2
#> 16:   (70,80] 1
#> 17:      <NA> 1
#> 18:   (30,40] 4
#> 19:   (40,50] 2
#> 20:   (50,60] 1
#> 21:   (70,80] 1
#> 22:   (80,90] 1
#> 23:   (40,50] 2
#> 24:   (60,70] 3
#> 25:   (30,40] 1
#> 26:   (50,60] 3
#> 27:      <NA> 1
#> 28:  (90,100] 2
#> 29: (110,120] 1
#> 30:   (80,90] 1
#>           cut N

# clean up
delete(cars.df)