dankelley / plan

R package for project planning
https://dankelley.github.io/plan/
33 stars 9 forks source link

attempting to reproduce the formatted gantt as in issue 14 #15

Closed LessGoudarzi closed 7 years ago

LessGoudarzi commented 7 years ago
mydf <- read.csv("gantt-example2.csv") ## saved version of the sample file in the prior issue
as.time <- function(x)
  as.POSIXct(x, format="%m/%d/%y") # American excel style

warning("ignoring mydf$NeededBy, which is supposed to be an integer, not a time\n")
warning("had to write a function to decode American excel time format\n")
warning("changed col for done, so we can see if triangles come out ok\n")

mygantt <- as.gantt(key=mydf$Key, description=mydf$task,
                    start=as.time(mydf$Start), end=as.time(mydf$End), done=mydf$Done)
#quartz("Quartz", width=8.5, height=3.5, pointsize=14)
plot(mygantt, event.time = as.time(mydf$event.time), event.label = mydf$event.name, event.side = 3,  
     col.connector = "black", col.done = topo.colors(10), col.notdone = topo.colors(12), 
     col.eventLine = mydf$event.line.color, col.event = mydf$event.name.color,  cex.event = 0.5, 
     font.event = par("font"), lty.eventLine = "dashed", lwd.eventLine = 0.1, bg = par("bg"),
     grid.col = "lightgray", grid.lty = "dotted", ylabels = list(col = 1,
                                                                 cex= mydf$header.font, font=c(2, rep(1,11)), justification = mydf$indent), 
     arrows = mydf$arrows, main = "Project Timeline - draft 1 Sept 25 2016", 
     cex.main = par("cex"))

image

LessGoudarzi commented 7 years ago

what am I missing

dankelley commented 7 years ago

Sorry, I don't understand the question.

LessGoudarzi commented 7 years ago

I was attempting to reproduce this figure but not sure of the version of the plan.r that was used. Any help would be appreciated...

image

dankelley commented 7 years ago

This R package won't make that package. The diagram was a sketch of what a user wanted. I've done some of those things, but not others. The webpage http://dankelley.github.io/plan/installation.html shows how to install the most recent version of plan. It has not been updated in a year, and is not a high priority for updating, given other concerns (teaching, proposal-writing, etc). If plan as it presently exists is not helpful, I am reasonably sure that there are other alternatives, since these diagrams are fairly common. Although I wrote plan, I am not sure I've ever actually used it ... my research agencies don't tend to bother with such things.

LessGoudarzi commented 7 years ago

Got it. Thanks for taking the time to respond.