Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,4 +76,5 @@ Collate: | |
'nexml_write.R' | ||
'simmap.R' | ||
'taxize_nexml.R' | ||
'tbl_df.R' | ||
RoxygenNote: 5.0.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
`$.tbl_df` <- function(x, i) .subset2(x, i) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
3 comments
on commit cdebce8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iirc this was a hack to make cran happy when tibble moved out of dplyr but wasn't on cran yet. Perhaps we can just call the tibble method directly now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll still get a warning if the column does not exist. If you want partial matching for column names, I'd suggest to use plain data frames. It's much safer to use the right column name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krlmlr ah right, thanks it's coming back to me now. Right, dplyr
's version of tibble would return NULL if the column didn't exist, but new tibble
broke this behavior and threw an error instead: tidyverse/tibble#91
We don't really want partial matching of column names, we only wanted to avoid the hard error. Based on tidyverse/tibble#91 (comment) it looks like we can now drop this line and just use a supressWarnings
, since iiuc tibble only warns (and returns NULL
) instead of throwing an error when no match is found(?)
This looks dangerous to me, because then the behavior or
$.tbl_df()
depends on if this package is loaded or not.