Skip to content

Commit

Permalink
Replace as_data_frame() by as_tibble() *
Browse files Browse the repository at this point in the history
In order to prevent following warning when using bib2df():

`as_data_frame()` is deprecated as of tibble 2.0.0.
Please use `as_tibble()` instead.
The signature and semantics have changed, see `?as_tibble`.
  • Loading branch information
florisvdh committed Jun 30, 2020
1 parent ad349fe commit 2f9678d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Suggests:
rmarkdown,
ggplot2,
tidyr
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
VignetteBuilder: knitr
Encoding: UTF-8
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export(bib2df)
export(df2bib)
importFrom(dplyr,"%>%")
importFrom(dplyr,as_data_frame)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_rows)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
Expand Down
4 changes: 2 additions & 2 deletions R/bib2df_gather.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#' @importFrom stringr str_match
#' @importFrom stringr str_extract
#' @importFrom dplyr bind_rows
#' @importFrom dplyr as_data_frame
#' @importFrom dplyr as_tibble
#' @importFrom stats complete.cases

bib2df_gather <- function(bib) {
Expand Down Expand Up @@ -95,7 +95,7 @@ bib2df_gather <- function(bib) {
}
)
dat <- bind_rows(c(list(empty), items))
dat <- as_data_frame(dat)
dat <- as_tibble(dat)
dat$BIBTEXKEY <- unlist(keys)
dat
}
Expand Down

0 comments on commit 2f9678d

Please sign in to comment.