I am hoping for some assistance in how to create a gantt chart with the plan
package. The package is mentioned briefly in the comprehensive post earlier several approaches using R; see answer 4 of 7 for plan
My reproducible data is below.
dput(project)
structure(list(key. = structure(1:8, .Label = c("1,", "2,", "3,",
"4,", "5,", "6,", "7,", "8,"), class = "factor"), description. = structure(1:8, .Label = c("recommendation1,",
"recommendation2,", "recommendation3,", "recommendation4,", "recommendation5,",
"recommendation6,", "recommendation7,", "recommendation8,"), class = "factor"),
start. = structure(1:8, .Label = c("10/1/2015,", "10/2/2015,",
"10/3/2015,", "10/4/2015,", "10/5/2015,", "10/6/2015,", "10/7/2015,",
"10/8/2015,"), class = "factor"), end. = structure(1:8, .Label = c("12/1/2015,",
"12/2/2015,", "12/3/2015,", "12/4/2015,", "12/5/2015,", "12/6/2015,",
"12/7/2015,", "12/8/2015,"), class = "factor"), done. = c(90,
30, 0, 0, 0, 0, 0, 0), neededby = c(0, 0, 0, 0, 0, 0, 0,
0)), .Names = c("key.", "description.", "start.", "end.",
"done.", "neededby"), row.names = c(NA, -8L), class = "data.frame")
Using read.gantt()
, the data frame looks fine to me:
> project
key. description. start. end. done. neededby
1 1, recommendation1, 10/1/2015, 12/1/2015, 90 0
2 2, recommendation2, 10/2/2015, 12/2/2015, 30 0
3 3, recommendation3, 10/3/2015, 12/3/2015, 0 0
4 4, recommendation4, 10/4/2015, 12/4/2015, 0 0
5 5, recommendation5, 10/5/2015, 12/5/2015, 0 0
6 6, recommendation6, 10/6/2015, 12/6/2015, 0 0
7 7, recommendation7, 10/7/2015, 12/7/2015, 0 0
8 8, recommendation8, 10/8/2015, 12/8/2015, 0 0
But something is awry when I use print(summary(). The last two rows have a problem. I tried re-writing them in the .csv file, to no avail.
> print(summary(project))
key. description. start. end. done. neededby
1, :1 recommendation1,:1 10/1/2015,:1 12/1/2015,:1 Min. : 0.0 Min. :0
2, :1 recommendation2,:1 10/2/2015,:1 12/2/2015,:1 1st Qu.: 0.0 1st Qu.:0
3, :1 recommendation3,:1 10/3/2015,:1 12/3/2015,:1 Median : 0.0 Median :0
4, :1 recommendation4,:1 10/4/2015,:1 12/4/2015,:1 Mean :15.0 Mean :0
5, :1 recommendation5,:1 10/5/2015,:1 12/5/2015,:1 3rd Qu.: 7.5 3rd Qu.:0
6, :1 recommendation6,:1 10/6/2015,:1 12/6/2015,:1 Max. :90.0 Max. :0
(Other):2 (Other) :2 (Other) :2 (Other) :2
In any case, I ran plot()
and the result was distinctly odd.