read.gantt {plan} | R Documentation |
Read a data file containing gantt information.
read.gantt(file, debug=FALSE)
file |
a connection or a character string giving the name of the file to load. |
debug |
boolean, set to TRUE to print debugging
information. |
Reads a gantt
dataset.
The data format is strict, and deviations from it may lead to error messages that are difficult to understand.
The first line is a header, and must contain the words Key
,
Description
, Start
, End
, Done
, and
NeededBy
, written exactly in this way, with commas separating
the words. (Blanks are ignored in this line.)
Additional lines indicate the details of each of several sub-projects, in comma-separated items, as follows:
YYYY-MM-DD
or YYY-MM-DD hh:mm:ss
).
read.gantt
.
Executing the code
library(plan) data(gantt) print(summary(gantt))will create the following sample file, which may be read with
read.gantt
:
Key, Description, Start, End, Done, NeededBy 1, Assemble equipment, 2008-01-01, 2008-03-28, 90 2, Test methods, 2008-02-28, 2008-03-28, 30 3, Field sampling, 2008-04-01, 2008-08-14, 0 4, Analyse field data, 2008-06-30, 2008-11-14, 0 5, Write methods chapter, 2008-08-14, 2008-11-14, 0 6, Write results chapter, 2008-10-14, 2009-01-15, 0 7, Write other chapters, 2008-12-10, 2009-02-28, 0 8, Committee reads thesis, 2009-02-28, 2009-03-14, 0 9, Revise thesis, 2009-03-15, 2009-03-30, 0 10, Thesis on display, 2009-04-01, 2009-04-15, 0 11, Defend thesis, 2009-04-16, 2009-04-17, 0 12, Finalize thesis, 2009-04-18, 2009-05-07, 0
An object of type "gantt"
, which is a data frame containing
"description"
(a character description of the task)
"start"
(the task's start time),
"end"
(the task's end time),
"progress"
(a number giving the percent progress on this item, or
NA
if none given), and
"needed.by"
(a number giving the indices of other tasks that rely
on this task, or NA
if none given).
Dan Kelley
## Not run: library(plan) gantt <- read.gantt("demo/gantt.dat") summary(gantt) plot(gantt) ## End(Not run)