[Traminer-users] Error when using "seqformat" (from SPELL data) with "process = TRUE", and an external data frame for "pdata" ...
Arnaud Trollé
arnaud_trolle at yahoo.fr
Wed Jan 31 15:42:28 CET 2018
Hi all,
When using "seqformat" (from SPELL data) with "process = TRUE", and an external data frame for "pdata", as follows :
> situations <- seqformat(data[,1:4], id = 1, from = "SPELL", to = "STS", begin = 3, end = 4, status = 2,
+ right = NA, process = TRUE, limit = 7644, pdata = pdata, pvar = c("id","birth"))
I get an error message :
Error in charToDate(x) :
character string is not in a standard unambiguous format
I read many threads about that issue, but could not find any helpful solution.Here are the structures of my data frames "data" and "pdata" :
> str(data)
'data.frame': 2428 obs. of 9 variables:
$ ID_SQ : Factor w/ 798 levels "1","2","3","5",..: 1 1 1 1 1 2 2 2 2 2 ...
$ SITUATION : chr "En poste" "En poste" "En poste" "En poste" ...
$ DATE_DE : Date, format: "1997-09-01" "1999-05-03" "2003-01-01" "2006-05-02" ...
$ DATE_A : Date, format: "1999-04-26" "2002-12-31" "2006-04-28" "2007-11-24" ...
$ SEXE : Factor w/ 2 levels "Féminin","Masculin": 1 1 1 1 1 1 1 1 1 1 ...
$ PROMO : Factor w/ 6 levels "1997","1998",..: 1 1 1 1 1 2 2 2 2 2 ...
$ DEPARTEMENT : Factor w/ 10 levels "BC","GCU","GE",..: 1 1 1 1 1 4 4 4 4 4 ...
$ NIVEAU_ADMISSION: Factor w/ 2 levels "En Premier Cycle",..: NA NA NA NA NA 1 1 1 1 1 ...
$ FILIERE_SECTION : Factor w/ 4 levels "Cursus Classique",..: NA NA NA NA NA 4 4 4 4 4 ...
> str(pdata)
'data.frame': 798 obs. of 2 variables:
$ id : Factor w/ 798 levels "1","2","3","5",..: 1 2 3 4 5 6 7 8 9 10 ...
$ birth: Date, format: "1997-01-01" "1998-01-01" "1998-01-01" "2000-01-01" ...
It seems to me that all date formats are OK.
But, clearly, something's wrong.
What am I doing wrong?
Thank you in advance for your help,Best,Arnaud.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20180131/52e1879e/attachment.html>
More information about the Traminer-users
mailing list