Skip to content

Commit

Permalink
add namespace for packageVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Aug 10, 2019
1 parent f5ce116 commit 9f9fffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/hierarchy.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ d3_nest <- function(
data <- dplyr::mutate_if(data, is.factor, as.character)

# syntax changed in tidyr > 0.8.3
if(packageVersion("tidyr") > "0.8.3") {
if(utils::packageVersion("tidyr") > "0.8.3") {
data_nested <- dplyr::bind_rows(promote_na(
change_to_name(
tidyr::nest(
Expand All @@ -115,7 +115,7 @@ d3_nest <- function(
-which(colnames(data_nested) %in% c("children","colname",value_cols))
]
)){
if(packageVersion("tidyr") > "0.8.3") {
if(utils::packageVersion("tidyr") > "0.8.3") {
data_nested <- dplyr::bind_rows(promote_na(
change_to_name(
tidyr::nest(
Expand Down

0 comments on commit 9f9fffb

Please sign in to comment.