rajclinasia wrote:
Hi every one,
I have a R dataset like this.
labels starts ends
first task 2004-01-01 2004-03-03
second task 2004-02-02 2004-05-05
third task 2004-03-03 2004-06-06
fourth task 2004-04-04 2004-08-08
fifth task 2004-05-05 2004-09-09
now i want to create gantt chart for this data. can any body help us in
code, it will be very helpful for us.
Hi raj,
From your two messages I assume that you have an Excel spreadsheet that
looks something like the above data, and you want to convert this into a
list that will produce a Gantt chart using the gantt.chart function.
First, your example has alerted me to the fact that if the incoming list
is missing the "priorities" component, gantt.chart will lose its lunch,
so I have fixed this little problem and future versions will not be so
picky. First, add a column like this:
priorities
1
2
3
4
5
to the spreadsheet. Then, to generate a data frame (which is a sort of
list) from an Excel file, export (Save As...) the spreadsheet as a CSV
file with commas as delimiters. Then read that file into R and display:
my.gantt.info<-read.csv("my.gantt.csv")
gantt.chart(my.gantt.info)
Jim
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.