rajclinasia wrote:
hi every one,
i have a excel sheet like this
labels starts ends
1 first task 1-Jan-04 3-Mar-04
2 second task 2-Feb-04 5-May-04
3 third task 3-Mar-04 6-Jun-04
4 fourth task 4-Apr-04 8-Aug-04
5 fifth task 5-May-04 9-Sep-04
now i converted this excel sheet into csv file and i read the csv file into
R with the below code.
my.gantt.info<-read.csv("C:/Documents and
Settings/balakrishna/Desktop/one.csv").
and for create gantt chart i used below code.
gantt.chart("my.gantt.info").
if i run this above code i am getting the error like this
Error in x$starts : $ operator is invalid for atomic vectors.
can anybody help in this aspect it would be very appreciable.
Hi Raj,
My apologies for not testing the solution I sent. The dates in the
spreadsheet were converted to character strings, then factors in the
input stage. If you reconvert them as follows:
my.gantt.info$starts<-as.POSIXct(strptime(my.gantt.info$starts,"%d-%b-%y"))
my.gantt.info$ends<-as.POSIXct(strptime(my.gantt.info$ends,"%d-%b-%y"))
things should work properly.
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.