>From the help file for plotrix:
" ... x - a list of task labels, start/end times and task priorities as
returned by get.gantt.info ..."
So I try to create an object that will contain this information.
abc <- read.csv("gntr1a.csv")
# The above csv file was generated from MS .xlsx file containing the tasks and
corresponding dates
> abc
code tasks.labels start end depends done
1 101 task 1 2018/04/01 2018/04/15 NA 100
2 102 task2 2018/04/15 2018/05/31 101 50
3 103 task 3 2018/06/01 2018/06/30 102 0
> gantt.chart(abc)
Error in `$<-.data.frame`(`*tmp*`, priorities, value = numeric(0)) :
replacement has 0 rows, data has 3
>
Manually adding the required tasks and dates (as given in the help file
example) is not practical for my situation ....
-----Original Message-----
From: David Winsemius <[email protected]>
To: bbb_aaa <[email protected]>
Cc: r-help <[email protected]>
Sent: Sun, Apr 22, 2018 4:31 pm
Subject: Re: [R] Gantt Chart Using Plotrix
> On Apr 22, 2018, at 11:50 AM, [email protected] wrote:
>
> Hi
>
> I am trying to generate a complex Gantt chart using the gantt.chart function
> in the plotrix package.
>
> Ideally I would like to use a spreadsheet to populate the activities (tasks)
> and start and end dates that this function expects and then export the
> spreadsheet file as a .CSV text file so I can read in this file to generate
> the gantt chart. Reading through the help file I have not been able to see
> what exactly this spreadsheet should like. The example provided with the
> "gantt.chart" function seems to indicate all the information needs to be hand
> coded. Because of the complexity of my chart this is not only very error
> prone but also is impractical.
>
> Can anyone help me with this? There is also a "get.gantt.info" function for
> creating a gantt object but the help on this is almost next to nothing !
>
> Any help you can provide on this would be great.
>
> There is another R package called "plan" which is very user friendly but for
> my purpose this doesn't have all the functionality I am looking for.
The method to generate the most interest and attention to a question is to post
a reproducible example with a clear description of the desired "functionality".
>
> Thanks
> indr
>
> ______________________________________________
> [email protected] mailing list -- To UNSUBSCRIBE and more, see
> 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.
David Winsemius
Alameda, CA, USA
'Any technology distinguishable from magic is insufficiently advanced.'
-Gehm's Corollary to Clarke's Third Law
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.