Skip to content

Slice doesn't drop excess rows #10

Closed
@hadley

Description

@hadley

Moved from tidyverse/dplyr#1446, by @franknarf1

library(dplyr, warn.conflicts = FALSE)
library(dtplyr)

df <- data.frame(x = c("a","a","b"), y = c(2,3,4))

tbl_df(df) %>% slice(3:4)
#> # A tibble: 1 x 2
#>   x         y
#>   <fct> <dbl>
#> 1 b         4
tbl_dt(df) %>% slice(3:4)
#> Source: local data table [2 x 2]
#> 
#> # A tibble: 2 x 2
#>   x         y
#>   <fct> <dbl>
#> 1 b         4
#> 2 <NA>     NA

Created on 2019-05-25 by the reprex package (v0.2.1.9000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviordplyr-compat 💞dplyr compatibility issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions