Skip to content

Commit

Permalink
Fix "no visible binding" note for gantt_verify
Browse files Browse the repository at this point in the history
  • Loading branch information
giocomai committed Jan 26, 2024
1 parent 16365cb commit d8f239f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ganttrify
Title: Create beautiful Gantt charts with ggplot2
Version: 0.0.1.9001
Version: 0.0.1.9002
Authors@R:
person(given = "Giorgio",
family = "Comai (OBCT/CCI)",
Expand All @@ -22,7 +22,8 @@ Imports:
lubridate,
tidyr,
ggtext,
cli
cli,
rlang
URL: https://github.com/giocomai/ganttrify
BugReports: https://github.com/giocomai/ganttrify/issues
Language: en-US
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export("%>%")
export(gantt_verify)
export(ganttrify)
importFrom(magrittr,"%>%")
importFrom(rlang,.data)
25 changes: 13 additions & 12 deletions R/gantt_verify.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#'
#' @examples
#' gantt_verify(project = ganttrify::test_project)
#' @importFrom rlang .data
gantt_verify <- function(project,
by_date = FALSE,
exact_date = FALSE) {
Expand All @@ -34,28 +35,28 @@ gantt_verify <- function(project,
if (by_date) {
project <- project %>%
dplyr::mutate(
wp = as.character(wp),
activity = as.character(activity),
start_date = as.character(start_date),
end_date = as.character(end_date)
wp = as.character(.data[["wp"]]),
activity = as.character(.data[["activity"]]),
start_date = as.character(.data[["start_date"]]),
end_date = as.character(.data[["end_date"]])
)
} else {
project <- project %>%
dplyr::mutate(
wp = as.character(wp),
activity = as.character(activity),
start_date = as.numeric(start_date),
end_date = as.numeric(end_date)
wp = as.character(.data[["wp"]]),
activity = as.character(.data[["activity"]]),
start_date = as.numeric(.data[["start_date"]]),
end_date = as.numeric(.data[["end_date"]])
)
}

if (exact_date) {
project <- project %>%
dplyr::mutate(
wp = as.character(wp),
activity = as.character(activity),
start_date = lubridate::as_date(start_date),
end_date = lubridate::as_date(end_date)
wp = as.character(.data[["wp"]]),
activity = as.character(.data[["activity"]]),
start_date = lubridate::as_date(.data[["start_date"]]),
end_date = lubridate::as_date(.data[["end_date"]])
)
}

Expand Down

0 comments on commit d8f239f

Please sign in to comment.