Dear Thomas,

In the following lines of code the activecell contains a date/time value

XL<-comGetObject("excel.application")
a<-XL[["activecell"]]
a[["value"]]
Warning: stack imbalance in '.Call', 16 then 17
Warning: stack imbalance in '{', 14 then 15
Warning: stack imbalance in '[[', 2 then 3
[1] "2008-02-03 CET"

The reason is that in the BDX2SEXP function an lProtectCount++ is missing around the lClass PROTECT, see below:

case BDX_DT:
    lData = PROTECT(allocVector(REALSXP,lTotalSize));
    lProtectCount++;
    for(i = 0;i < lTotalSize;i++) {
      REAL(lData)[i] = pBDXData->data.raw_data[i].dt_value;
    }
    {
      SEXP lClass;
      PROTECT(lClass = allocVector(STRSXP,2));
      lProtectCount++; // this was missing.
      SET_STRING_ELT(lClass,0,mkChar(CLS_NAME_POSIXT));
      SET_STRING_ELT(lClass,1,mkChar(CLS_NAME_POSIXCT));
      classgets(lData,lClass);
    }

Best wishes
 Vilmos

--
Vilmos Prokaj
Eötvös Loránd University,
Department of Probability and Statistics
Pázmány Péter sétány 1/C
Budapest, 1117
Hungary

e-mail:[EMAIL PROTECTED]



_______________________________________________
Rcom-l mailing list
Rcom-l@mailman.csd.univie.ac.at
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
More information (including a Wiki) at http://rcom.univie.ac.at

Reply via email to