Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/testthat/_snaps/subsetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
Condition
Error in `foo[foo]`:
! Can't subset columns with `foo`.
x `foo` must be logical, numeric, or character, not a <tbl_df/tbl/data.frame> object.
x `foo` must be logical, numeric, or character, not a <tbl_df> object.
Code
# # [.tbl_df is careful about row indexes
foo <- tibble(x = 1:3, y = 1:3, z = 1:3)
Expand Down Expand Up @@ -156,7 +156,7 @@
Condition
Error in `foo[foo, ]`:
! Can't subset rows with `foo`.
x `foo` must be logical, numeric, or character, not a <tbl_df/tbl/data.frame> object.
x `foo` must be logical, numeric, or character, not a <tbl_df> object.
Code
# # [.tbl_df is careful about column flags (#83)
foo <- tibble(x = 1:10, y = 1:10, z = 1:10)
Expand Down Expand Up @@ -386,7 +386,7 @@
Condition
Error in `foo[[foo]]`:
! Can't extract column with `foo`.
x `foo` must be numeric or character, not a <tbl_df/tbl/data.frame> object.
x `foo` must be numeric or character, not a <tbl_df> object.
Code
# # [[.tbl_df throws error with NA index
foo <- tibble(x = 1:10, y = 1:10)
Expand Down Expand Up @@ -892,7 +892,7 @@
Condition
Error in `[[<-`:
! Can't assign column with `foo`.
x `foo` must be numeric or character, not a <tbl_df/tbl/data.frame> object.
x `foo` must be numeric or character, not a <tbl_df> object.
Code
foo[[1:3, 1]] <- 1
Condition
Expand All @@ -916,7 +916,7 @@
Condition
Error in `[[<-`:
! Can't assign row with `foo`.
x `foo` must be numeric or character, not a <tbl_df/tbl/data.frame> object.
x `foo` must be numeric or character, not a <tbl_df> object.
Code
# # [[<-.tbl_df throws an error with OOB assignment
df <- tibble(x = 1:2, y = x)
Expand Down