| Line 1... |
Line 1... |
| 1 |
|
1 |
|
| 2 |
R : Copyright 2003, The R Foundation for Statistical Computing
|
2 |
R : Copyright 2004, The R Foundation for Statistical Computing
|
| 3 |
Version 1.9.0 Under development (unstable) (2003-12-20), ISBN 3-900051-00-3
|
3 |
Version 1.9.0 Under development (unstable) (2004-01-29), ISBN 3-900051-00-3
|
| 4 |
|
4 |
|
| 5 |
R is free software and comes with ABSOLUTELY NO WARRANTY.
|
5 |
R is free software and comes with ABSOLUTELY NO WARRANTY.
|
| 6 |
You are welcome to redistribute it under certain conditions.
|
6 |
You are welcome to redistribute it under certain conditions.
|
| 7 |
Type 'license()' or 'licence()' for distribution details.
|
7 |
Type 'license()' or 'licence()' for distribution details.
|
| 8 |
|
8 |
|
| Line 214... |
Line 214... |
| 214 |
+ } else !isall.equal(x, res)})
|
214 |
+ } else !isall.equal(x, res)})
|
| 215 |
> res <- try(as.ts( x ), silent = TRUE)
|
215 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 216 |
> if(!inherits(res, 'try-error'))
|
216 |
> if(!inherits(res, 'try-error'))
|
| 217 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
217 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 218 |
+ } else !isall.equal(x, res)})
|
218 |
+ } else !isall.equal(x, res)})
|
| - |
|
219 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
220 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 219 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
221 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 220 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
222 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 221 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
223 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 222 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
224 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 223 |
> f <- try(as.array( x ), silent = TRUE)
|
225 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 493... |
Line 495... |
| 493 |
+ } else !isall.equal(x, res)})
|
495 |
+ } else !isall.equal(x, res)})
|
| 494 |
> res <- try(as.ts( x ), silent = TRUE)
|
496 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 495 |
> if(!inherits(res, 'try-error'))
|
497 |
> if(!inherits(res, 'try-error'))
|
| 496 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
498 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 497 |
+ } else !isall.equal(x, res)})
|
499 |
+ } else !isall.equal(x, res)})
|
| - |
|
500 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
501 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 498 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
502 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 499 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
503 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 500 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
504 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 501 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
505 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 502 |
> f <- try(as.array( x ), silent = TRUE)
|
506 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 767... |
Line 771... |
| 767 |
+ } else !isall.equal(x, res)})
|
771 |
+ } else !isall.equal(x, res)})
|
| 768 |
> res <- try(as.ts( x ), silent = TRUE)
|
772 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 769 |
> if(!inherits(res, 'try-error'))
|
773 |
> if(!inherits(res, 'try-error'))
|
| 770 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
774 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 771 |
+ } else !isall.equal(x, res)})
|
775 |
+ } else !isall.equal(x, res)})
|
| - |
|
776 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
777 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 772 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
778 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 773 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
779 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 774 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
780 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 775 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
781 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 776 |
> f <- try(as.array( x ), silent = TRUE)
|
782 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 1056... |
Line 1062... |
| 1056 |
> res <- try(as.ts( x ), silent = TRUE)
|
1062 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 1057 |
> if(!inherits(res, 'try-error'))
|
1063 |
> if(!inherits(res, 'try-error'))
|
| 1058 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
1064 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 1059 |
+ } else !isall.equal(x, res)})
|
1065 |
+ } else !isall.equal(x, res)})
|
| 1060 |
[1] TRUE
|
1066 |
[1] TRUE
|
| - |
|
1067 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
1068 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 1061 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
1069 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 1062 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
1070 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 1063 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
1071 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 1064 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
1072 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 1065 |
> f <- try(as.array( x ), silent = TRUE)
|
1073 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 1352... |
Line 1360... |
| 1352 |
> res <- try(as.ts( x ), silent = TRUE)
|
1360 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 1353 |
> if(!inherits(res, 'try-error'))
|
1361 |
> if(!inherits(res, 'try-error'))
|
| 1354 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
1362 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 1355 |
+ } else !isall.equal(x, res)})
|
1363 |
+ } else !isall.equal(x, res)})
|
| 1356 |
[1] TRUE
|
1364 |
[1] TRUE
|
| - |
|
1365 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
1366 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 1357 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
1367 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 1358 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
1368 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 1359 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
1369 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 1360 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
1370 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 1361 |
> f <- try(as.array( x ), silent = TRUE)
|
1371 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 1644... |
Line 1654... |
| 1644 |
> res <- try(as.ts( x ), silent = TRUE)
|
1654 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 1645 |
> if(!inherits(res, 'try-error'))
|
1655 |
> if(!inherits(res, 'try-error'))
|
| 1646 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
1656 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 1647 |
+ } else !isall.equal(x, res)})
|
1657 |
+ } else !isall.equal(x, res)})
|
| 1648 |
[1] TRUE
|
1658 |
[1] TRUE
|
| - |
|
1659 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
1660 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 1649 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
1661 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 1650 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
1662 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 1651 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
1663 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 1652 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
1664 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 1653 |
> f <- try(as.array( x ), silent = TRUE)
|
1665 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 1931... |
Line 1943... |
| 1931 |
> res <- try(as.ts( x ), silent = TRUE)
|
1943 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 1932 |
> if(!inherits(res, 'try-error'))
|
1944 |
> if(!inherits(res, 'try-error'))
|
| 1933 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
1945 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 1934 |
+ } else !isall.equal(x, res)})
|
1946 |
+ } else !isall.equal(x, res)})
|
| 1935 |
[1] TRUE
|
1947 |
[1] TRUE
|
| - |
|
1948 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
1949 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 1936 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
1950 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 1937 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
1951 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 1938 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
1952 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 1939 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
1953 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 1940 |
> f <- try(as.array( x ), silent = TRUE)
|
1954 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 2216... |
Line 2230... |
| 2216 |
+ } else !isall.equal(x, res)})
|
2230 |
+ } else !isall.equal(x, res)})
|
| 2217 |
> res <- try(as.ts( x ), silent = TRUE)
|
2231 |
> res <- try(as.ts( x ), silent = TRUE)
|
| 2218 |
> if(!inherits(res, 'try-error'))
|
2232 |
> if(!inherits(res, 'try-error'))
|
| 2219 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
2233 |
+ report({if(is.ts(x)) { cat('IS: ');all.equal(x, res, tol=0)
|
| 2220 |
+ } else !isall.equal(x, res)})
|
2234 |
+ } else !isall.equal(x, res)})
|
| - |
|
2235 |
> f <- try(as.Date( x ), silent = TRUE)
|
| - |
|
2236 |
> if(!inherits(f, 'try-error')) report(identical(f, as.Date( f )))
|
| 2221 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
2237 |
> f <- try(as.POSIXct( x ), silent = TRUE)
|
| 2222 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
2238 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXct( f )))
|
| 2223 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
2239 |
> f <- try(as.POSIXlt( x ), silent = TRUE)
|
| 2224 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
2240 |
> if(!inherits(f, 'try-error')) report(identical(f, as.POSIXlt( f )))
|
| 2225 |
> f <- try(as.array( x ), silent = TRUE)
|
2241 |
> f <- try(as.array( x ), silent = TRUE)
|
| Line 2304... |
Line 2320... |
| 2304 |
> f <- try(as.stepfun( x ), silent = TRUE)
|
2320 |
> f <- try(as.stepfun( x ), silent = TRUE)
|
| 2305 |
> if(!inherits(f, 'try-error')) report(identical(f, as.stepfun( f )))
|
2321 |
> if(!inherits(f, 'try-error')) report(identical(f, as.stepfun( f )))
|
| 2306 |
> f <- try(as.ts( x ), silent = TRUE)
|
2322 |
> f <- try(as.ts( x ), silent = TRUE)
|
| 2307 |
> if(!inherits(f, 'try-error')) report(identical(f, as.ts( f )))
|
2323 |
> if(!inherits(f, 'try-error')) report(identical(f, as.ts( f )))
|
| 2308 |
> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
|
2324 |
> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
|
| 2309 |
Time elapsed: 1.38 0.03 1.41 0 0
|
2325 |
Time elapsed: 0.36 0.03 0.39 NA NA
|
| 2310 |
>
|
2326 |
>
|
| 2311 |
>
|
2327 |
>
|