Running examples in ‘Ecfun-Ex.R’ failed
The error most likely occurred in:

> ### Name: asNumericDF
> ### Title: Coerce to numeric dropping commas and info after a blank
> ### Aliases: asNumericChar asNumericDF
> ### Keywords: manip
> 
> ### ** Examples
> 
> ##
> ## 1.  an example 
> ##
> xDate <- as.Date('1970-01-01')+c(0, 365)
> xPOSIX <- as.POSIXct(xDate)+c(1, 99)
> xMSdate <- as.Date(1, 
+     as.Date('1899-12-31'))+1:2
> fakeF1 <- data.frame(yr=c('1948', 
+             '1947 (1)'),
+       q1=c(' 1,234 ', ''), duh=rep(NA, 2), 
+       dol=c('$1,234', ''), 
+       pct=c('1%', '2%'), 
+       xDate=as.character(xDate, 
+         format='%m-%d-%Y'), 
+       xPOSIX=as.character(xPOSIX, 
+         format='%m-%d-%Y %H:%M:%S'), 
+       xMSdate=2:3, junk=c('this is',
+           'junk'))
>             
> # This converts the last 3 columns to NAs and drops them:   
> 
> str(nF1.1 <- asNumericChar(fakeF1$yr))
 num [1:2] 1948 1947
> str(nF1.2 <- asNumericChar(fakeF1$q1))
 num [1:2] 1234 NA
> str(nF1.3 <- asNumericChar(fakeF1$duh))
 logi [1:2] NA NA
> 
> nF1 <- asNumericDF(fakeF1)
Warning in asNumericDF(fakeF1) :
  NAs introduced by coercion in asNumericChar(q1[2])
Warning in asNumericDF(fakeF1) :
  NAs introduced by coercion in asNumericChar(dol[2])
Warning in asNumericDF(fakeF1) :
  NAs introduced by coercion in asNumericChar(xDate[c(1, 2)])
Warning in asNumericDF(fakeF1) :
  NAs introduced by coercion in asNumericChar(xPOSIX[c(1, 2)])
Warning in asNumericDF(fakeF1) :
  NAs introduced by coercion in asNumericChar(junk[c(1, 2)])
> nF2 <- asNumericDF(fakeF1, Dates=6, 
+     MSdate='xMSdate', 
+     ignore=c('junk', 'xPOSIX'), 
+     format.='%m-%d-%Y')
Warning in asNumericDF(fakeF1, Dates = 6, MSdate = "xMSdate", ignore = c("junk",  :
  NAs introduced by coercion in asNumericChar(q1[2])
Warning in asNumericDF(fakeF1, Dates = 6, MSdate = "xMSdate", ignore = c("junk",  :
  NAs introduced by coercion in asNumericChar(dol[2])
> nF3 <- asNumericDF(nF2, POSIX='xPOSIX', 
+     ignore=c(5,7:8), 
+     format.='%m-%d-%Y %H:%M:%S')
>             
> # check 
> nF1. <- data.frame(yr=
+         asNumericChar(fakeF1$yr),
+       q1=asNumericChar(fakeF1$q1), 
+       dol=asNumericChar(fakeF1$dol), 
+       pct=c(.01, .02), xMSdate=2:3)
> 
> nF1c <- data.frame(yr=1948:1947, 
+       q1=c(1234, NA), dol=c(1234, NA), 
+       pct=c(.01, .02), xMSdate=2:3)
> 
> ## Don't show: 
> stopifnot(
+ ## End(Don't show)
+ all.equal(nF1, nF1.)
+ ## Don't show: 
+ )
> ## End(Don't show)
> ## Don't show: 
> stopifnot(
+ ## End(Don't show)
+ all.equal(nF1., nF1c)
+ ## Don't show: 
+ )
> ## End(Don't show)
> 
> nF3c <- data.frame(yr=1948:1947, 
+       q1=c(1234, NA), dol=c(1234, NA), 
+       pct=c(.01, .02), xDate=xDate, 
+       xPOSIX=xPOSIX, xMSdate=xMSdate, 
+       junk=fakeF1$junk)
> ## Don't show: 
> stopifnot(
+ ## End(Don't show)
+ all.equal(nF3, nF3c)
+ ## Don't show: 
+ )
Error: nF3 and nF3c are not equal:
  Component “xPOSIX”: 'is.NA' value mismatch: 0 in current 2 in target
Execution halted