Closed BenJCQuah closed 7 months ago
I've been working on a new version, which should also provide more meaningful error messages, so it's possible that some bug appeared, but all examples in the readme work fine, so I'd need more information to figure out what is the problem here.
Ideally, you would provide a "minimal reproducible example" , or probably just a version of your original data frame with all personal data removed would allow me to troubleshoot this further.
Also, when you're reporting this make sure you're using the latest version (and you can of course return to a previous version later until this is fixed)
Sorry, yes I should have added a few things to clarify and an example. This occurs if your data entries in wp and activity are identical (I want a blank line where I place the current data text as it moves across the chart over time). The error occurs in the latest version and not version 6f7a4384e57688fb5b92f699d13c7957fe97e4fb.
As an example here is the code and some data attached (just "current date" in both wp and activity, and start_date and end_date 1 and 24 respectively:
remotes::install_github("giocomai/ganttrify") #here it errors remotes::install_github("giocomai/ganttrify@6f7a4384e57688fb5b92f699d13c7957fe97e4fb") #here it doesn't install.packages("MetBrewer")
library(ganttrify) library(tidyverse) library(MetBrewer)
test <- read.csv("test.csv")
ganttrify::ganttrify(project = test)
gives
ASSIGN AND LOAD DATA
test <- read.csv("test.csv") Warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'test.csv'
PLOT
ganttrify::ganttrify(project = test) Error in
dplyr::mutate()
: ℹ In argument:activity = factor(x = activity, levels = level_labels_df$levels)
. Caused by error inlevels<-
: ! factor level [2] is duplicated Runrlang::last_trace()
to see where the error occurred.
All clear, thanks. Fix coming in a few seconds. Update then to the latest version and you should be good to go. Do let me know if you encounter further issues.
library("ganttrify")
project <- tibble::tribble(
~wp, ~activity, ~start_date, ~end_date,
"example", "example", 1, 6,
"example", "different", 3,12
)
ganttrify::ganttrify(project)
Created on 2024-02-09 with reprex v2.1.0
Hi, thanks for your great gantt plot package.
I have the older and newer versions (0.0.0 and 0.0.1) of this package and the newer version appears to have a bug (?) in dplyr:::mutate.data.frame. Please see below the trace to the error. This same code/dataframe appears to work well in the older version.
Please let me know if you need more info.
Thanks!