You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fst_table object is expected to mimic the behavior of a data.frame. Therefore, df[0, ] syntax should return a zero-row table without an error or warning:
tmp_file<- tempfile(".fst")
# write some datax<-data.frame(X=1:1000, Y= sample(1:10, 1000, replace=TRUE)) %>%
fst::write_fst(tmp_file)
# get reference to filefst_table<-fst::fst(tmp_file)
# identicalx[1, ]
#> X Y#> 1 1 1fst_table[1, ]
#> X Y#> 1 1 1# should be identicalx[0, ]
#> [1] X Y#> <0 rows> (or 0-length row.names)fst_table[0, ]
#> Error in read_fst(meta_info$path, from = min_row, to = max_row): Parameter 'from' should have a numerical value equal or larger than 1.# tibble's also allow zero row syntax
as_tibble(x)[0, ]
#> # A tibble: 0 x 2#> # ... with 2 variables: X <int>, Y <int># as do data.table'sdata.table::as.data.table(x)[0. ]
#> Empty data.table (0 rows and 2 cols): X,Y
A fst_table object is expected to mimic the behavior of a data.frame. Therefore,
df[0, ]
syntax should return a zero-row table without an error or warning:thanks @hope-data-science for reporting!
The text was updated successfully, but these errors were encountered: