A flexible Gantt Chart.
ganttChart( df, task_order = TRUE, mstone_add = task_order, mstone_spacing = 1, mstone_lwd = 2, axes = TRUE, mstone_font = 2, lighten_done = 0 )
df | a data.frame (see details). |
---|---|
task_order | a logical. Should the tasks be ordered? See below for more details. |
mstone_add | Should milestones be added? |
mstone_spacing | spacing between milestones (expressed as figure unit). |
mstone_lwd | lines width for the milestone. |
axes | a logical. Should the axes be added? |
mstone_font | font of milestone (ignore of |
lighten_done | percentage use to lighten done task (see |
Argument df
should be a data frame with the following columns (in any order):
milestone
: milestones names,
due
: due date (will be converted into a date with as.Date()
),
start
: start date (will be converted into a date with as.Date()
),
task
: tasks names.
It might as well include any of the following optional columns:
done
: vector of logicals indicating whether the task if completed
col
: to custom the color of the tasks.
https://insileco.github.io/2017/09/20/gantt-charts-in-r/
David Beauchesne, Kevin Cazelles
ff <- ganttChart(dfGantt, mstone_lwd = 3, mstone_spacing = 0.6, lighten_done = 80)#> milestone task start due done start_tmp #> 1 Manuscript Research & readings 2017-09-01 2017-11-28 I 2017-09-01 #> 2 Manuscript Data preparation 2017-09-14 2017-09-28 C 2017-09-01 #> 3 Manuscript Analyses 2017-09-28 2017-10-28 I 2017-09-01 #> 4 Manuscript Plan 2017-09-21 2017-09-28 C 2017-09-01 #> 5 Manuscript Introduction 2017-09-28 2017-10-28 I 2017-09-01 #> 6 Manuscript Methods 2017-09-14 2017-10-28 I 2017-09-01 #> 7 Manuscript Results 2017-10-28 2017-11-14 I 2017-09-01 #> 8 Manuscript Discussion 2017-11-14 2017-11-28 I 2017-09-01 #> 9 Manuscript Conclusion 2017-11-28 2017-12-04 I 2017-09-01 #> 10 Manuscript Manuscript 2017-09-01 2017-12-04 M 2017-09-01 #> 11 Manuscript2 Research & readings 2017-09-04 2017-11-28 I 2017-09-04 #> 12 Manuscript2 Introduction 2017-09-28 2017-10-28 I 2017-09-04 #> 13 Manuscript2 Results 2017-10-28 2017-11-14 I 2017-09-04 #> 14 Manuscript2 Discussion 2017-11-14 2017-11-28 I 2017-09-04 #> 15 Manuscript2 Conclusion 2017-11-28 2017-12-04 I 2017-09-04 #> 16 Manuscript2 Methods 2017-09-14 2017-10-28 I 2017-09-04 #> 17 Manuscript2 Manuscript2 2017-09-04 2017-12-04 M 2017-09-04