R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("its-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('its') Loading required package: Hmisc Hmisc library by Frank E Harrell Jr Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation. NOTE:Hmisc no longer redefines [.factor to drop unused levels when subsetting. To get the old behavior of Hmisc type dropUnusedLevels(). Attaching package: 'Hmisc' The following object(s) are masked from package:stats : ecdf > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "Extract" > > ### * Extract > > flush(stderr()); flush(stdout()) > > ### Name: Extract > ### Title: Extract or Replace Parts of an Object > ### Aliases: Extract Subscript [.POSIXct > ### Keywords: array list > > ### ** Examples > > x <- 1:12; m <- matrix(1:6,nr=2); li <- list(pi=pi, e = exp(1)) > x[10] # the tenth element of x [1] 10 > x <- x[-1] # delete the 1st element of x > m[1,] # the first row of matrix m [1] 1 3 5 > m[1, , drop = FALSE] # is a 1-row matrix [,1] [,2] [,3] [1,] 1 3 5 > m[,c(TRUE,FALSE,TRUE)]# logical indexing [,1] [,2] [1,] 1 5 [2,] 2 6 > m[cbind(c(1,2,1),3:1)]# matrix index [1] 5 4 1 > m <- m[,-1] # delete the first column of m > li[[1]] # the first element of list li [1] 3.141593 > y <- list(1,2,a=4,5) > y[c(3,4)] # a list containing elements 3 and 4 of y $a [1] 4 [[2]] [1] 5 > y$a # the element of y named a [1] 4 > > ## non-integer indices are truncated: > (i <- 3.999999999) # "4" is printed [1] 4 > (1:5)[i] # 3 [1] 3 > > ## recursive indexing into lists > z <- list( a=list( b=9, c='hello'), d=1:5) > unlist(z) a.b a.c d1 d2 d3 d4 d5 "9" "hello" "1" "2" "3" "4" "5" > z[[c(1, 2)]] [1] "hello" > z[[c(1, 2, 1)]] # both "hello" [1] "hello" > z[[c("a", "b")]] <- "new" > unlist(z) a.b a.c d1 d2 d3 d4 d5 "new" "hello" "1" "2" "3" "4" "5" > > ## check $ and [[ for environments > e1 <- new.env() > e1$a <- 10 > e1[["a"]] [1] 10 > e1[["b"]] <- 20 > e1$b [1] 20 > ls(e1) [1] "a" "b" > > > > cleanEx(); ..nameEx <- "itsAccessor" > > ### * itsAccessor > > flush(stderr()); flush(stdout()) > > ### Name: itsAccessor > ### Title: Accessor, Assignment Functions for Irregular Time-Series Objects > ### Aliases: itsAccessor dates names core dates<- names<- core<- > ### dates,its-method names,its-method core,its-method > ### dates<-,its,POSIXt-method names<-,its,character-method > ### core<-,its,matrix-method > ### Keywords: ts > > ### ** Examples > > x <- newIts(1:10) > dates(x) [1] "2005-07-13 CEST" "2005-07-14 CEST" "2005-07-15 CEST" "2005-07-16 CEST" [5] "2005-07-17 CEST" "2005-07-18 CEST" "2005-07-19 CEST" "2005-07-20 CEST" [9] "2005-07-21 CEST" "2005-07-22 CEST" > names(x) [1] "1" > core(x) 1 2005-07-13 1 2005-07-14 2 2005-07-15 3 2005-07-16 4 2005-07-17 5 2005-07-18 6 2005-07-19 7 2005-07-20 8 2005-07-21 9 2005-07-22 10 > dates(x) <- seq.POSIXt(from=Sys.time()+11*24*60*60, + to=Sys.time()+20*24*60*60, + by="DSTday") > names(x) <- "B" > core(x) <- as.matrix(11:20) > > > > cleanEx(); ..nameEx <- "itsArith" > > ### * itsArith > > flush(stderr()); flush(stdout()) > > ### Name: itsArith > ### Title: Arithmetic Methods for Irregular Time-Series Objects > ### Aliases: itsArith Arith,its,its-method Arith.its +.its -.its *.its > ### /.its ^.its > ### Keywords: ts arith > > ### ** Examples > > b <- newIts(1:30,ncol=3) > c <- newIts(1:10,ncol=3)[1:5,] > b+c 1 2 3 2005-07-13 2 12 22 2005-07-14 4 14 24 2005-07-15 6 16 26 2005-07-16 8 18 28 2005-07-17 10 20 30 > b+b-2*b 1 2 3 2005-07-13 0 0 0 2005-07-14 0 0 0 2005-07-15 0 0 0 2005-07-16 0 0 0 2005-07-17 0 0 0 2005-07-18 0 0 0 2005-07-19 0 0 0 2005-07-20 0 0 0 2005-07-21 0 0 0 2005-07-22 0 0 0 > b/b 1 2 3 2005-07-13 1 1 1 2005-07-14 1 1 1 2005-07-15 1 1 1 2005-07-16 1 1 1 2005-07-17 1 1 1 2005-07-18 1 1 1 2005-07-19 1 1 1 2005-07-20 1 1 1 2005-07-21 1 1 1 2005-07-22 1 1 1 > b%*%diag(ncol(b)) [,1] [,2] [,3] 2005-07-13 1 11 21 2005-07-14 2 12 22 2005-07-15 3 13 23 2005-07-16 4 14 24 2005-07-17 5 15 25 2005-07-18 6 16 26 2005-07-19 7 17 27 2005-07-20 8 18 28 2005-07-21 9 19 29 2005-07-22 10 20 30 > its(b%*%diag(ncol(b))) 1 2 3 2005-07-13 1 11 21 2005-07-14 2 12 22 2005-07-15 3 13 23 2005-07-16 4 14 24 2005-07-17 5 15 25 2005-07-18 6 16 26 2005-07-19 7 17 27 2005-07-20 8 18 28 2005-07-21 9 19 29 2005-07-22 10 20 30 > > > > cleanEx(); ..nameEx <- "itsCumdif" > > ### * itsCumdif > > flush(stderr()); flush(stdout()) > > ### Name: itsCumdif > ### Title: Cumulation, Differencing for Irregular Time-Series Objects > ### Aliases: itsCumdif cumsum diff cumsum,its-method diff,its-method > ### Keywords: ts > > ### ** Examples > > b <- newIts(1:60,ncol=3) > cumsum(b) 1 2 3 2005-07-13 1 11 21 2005-07-14 3 23 43 2005-07-15 6 36 66 2005-07-16 10 50 90 2005-07-17 15 65 115 2005-07-18 21 81 141 2005-07-19 28 98 168 2005-07-20 36 116 196 2005-07-21 45 135 225 2005-07-22 55 155 255 > diff(b,lag=2) 1 2 3 2005-07-15 2 2 2 2005-07-16 2 2 2 2005-07-17 2 2 2 2005-07-18 2 2 2 2005-07-19 2 2 2 2005-07-20 2 2 2 2005-07-21 2 2 2 2005-07-22 2 2 2 > > > > cleanEx(); ..nameEx <- "itsDef" > > ### * itsDef > > flush(stderr()); flush(stdout()) > > ### Name: itsDef > ### Title: Irregularly Spaced Time-Series > ### Aliases: its its-class is.its as.its as.its.default as.its.zoo > ### coerce,its,data.frame-method its.format newIts > ### Keywords: ts > > ### ** Examples > > its.format("%Y-%m-%d") #defines text format of dates read from dimnames [1] "%Y-%m-%d" > mat <- structure(1:6,dim=c(2,3),dimnames=list(c("2003-01-01","2003-01-04"),letters[1:3])) > its(mat) a b c 2003-01-01 1 3 5 2003-01-04 2 4 6 > its.format("%Y%m%d") #defines text format of dates written to dimnames [1] "%Y%m%d" > times <- as.POSIXct(strptime(c("1999-12-31 01:00:00","2000-01-01 02:00:00"),format="%Y-%m-%d %X")) > its(mat,times) a b c 19991231 1 3 5 20000101 2 4 6 > its.format("%Y-%m-%d %X") [1] "%Y-%m-%d %X" > its(mat,times) a b c 1999-12-31 01:00:00 1 3 5 2000-01-01 02:00:00 2 4 6 > is.its(its(mat,times)) [1] TRUE > its.format("%Y%m%d %X") #defines text format of dates written to dimnames [1] "%Y%m%d %X" > as.its(mat) b c 19700101 01:00:01 3 5 19700101 01:00:02 4 6 > its.format("%a %d %b %Y") [1] "%a %d %b %Y" > newIts(start="2003-09-30",end="2005-05-05",format="%Y-%m-%d",period="month",find="last",extract=TRUE,weekday=TRUE) 1 Tue 30 Sep 2003 NA Fri 31 Oct 2003 NA Fri 28 Nov 2003 NA Wed 31 Dec 2003 NA Fri 30 Jan 2004 NA Fri 27 Feb 2004 NA Wed 31 Mar 2004 NA Fri 30 Apr 2004 NA Mon 31 May 2004 NA Wed 30 Jun 2004 NA Fri 30 Jul 2004 NA Tue 31 Aug 2004 NA Thu 30 Sep 2004 NA Fri 29 Oct 2004 NA Tue 30 Nov 2004 NA Fri 31 Dec 2004 NA Mon 31 Jan 2005 NA Mon 28 Feb 2005 NA Thu 31 Mar 2005 NA Fri 29 Apr 2005 NA Thu 05 May 2005 NA > newIts(start=ISOdate(2003,12,24,0),end=ISOdate(2004,1,10),extract=TRUE,weekday=TRUE) 1 Wed 24 Dec 2003 NA Thu 25 Dec 2003 NA Fri 26 Dec 2003 NA Mon 29 Dec 2003 NA Tue 30 Dec 2003 NA Wed 31 Dec 2003 NA Thu 01 Jan 2004 NA Fri 02 Jan 2004 NA Mon 05 Jan 2004 NA Tue 06 Jan 2004 NA Wed 07 Jan 2004 NA Thu 08 Jan 2004 NA Fri 09 Jan 2004 NA > its.format("%Y%m%d") [1] "%Y%m%d" > as(newIts(),"data.frame") X1 20050713 NA 20050714 NA 20050715 NA 20050716 NA 20050717 NA 20050718 NA 20050719 NA 20050720 NA 20050721 NA 20050722 NA > > > > cleanEx(); ..nameEx <- "itsDisp" > > ### * itsDisp > > flush(stderr()); flush(stdout()) > > ### Name: itsDisp > ### Title: Display Methods for Irregular Time-Series Objects > ### Aliases: itsDisp plot print plot,its,missing-method print,its-method > ### Keywords: ts > > ### ** Examples > > b <- newIts(1:60,ncol=3) > plot(b,colvec=c(1,7),lwdvec=1:2,ltypvec=1:2,lab=TRUE) > print(b) 1 2 3 20050713 1 11 21 20050714 2 12 22 20050715 3 13 23 20050716 4 14 24 20050717 5 15 25 20050718 6 16 26 20050719 7 17 27 20050720 8 18 28 20050721 9 19 29 20050722 10 20 30 > as.its(matrix(1:60,20,3)) 1 2 19700101 21 41 19700101 22 42 19700101 23 43 19700101 24 44 19700101 25 45 19700101 26 46 19700101 27 47 19700101 28 48 19700101 29 49 19700101 30 50 19700101 31 51 19700101 32 52 19700101 33 53 19700101 34 54 19700101 35 55 19700101 36 56 19700101 37 57 19700101 38 58 19700101 39 59 19700101 40 60 > > > > cleanEx(); ..nameEx <- "itsDownload" > > ### * itsDownload > > flush(stderr()); flush(stdout()) > > ### Name: priceIts > ### Title: Download Historical Finance Data > ### Aliases: priceIts > ### Keywords: ts > > ### ** Examples > > ## Not run: > ##D x1 <- priceIts(instrument = c("^ftse"), start = "1998-01-01", > ##D quote = "Close") > ##D x2 <- priceIts(instrument = c("^gdax"), start = "1998-01-01", > ##D quote = "Close") > ##D x <- union(x1,x2) > ##D names(x) <- c("FTSE","DAX") > ##D plot(x,lab=TRUE) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "itsFile" > > ### * itsFile > > flush(stderr()); flush(stdout()) > > ### Name: itsFile > ### Title: File Operations for Irregular Time-Series Objects > ### Aliases: itsFile readcsvIts writecsvIts > ### Keywords: ts > > ### ** Examples > > ## Not run: > ##D b <- newIts(1:30,ncol=3) > ##D fname <- tempfile() > ##D # To write an irregular time-series object to a file one might use > ##D writecsvIts(b,filename=fname) > ##D # To read an irregular time-series object from a file one might use > ##D its(readcsvIts(filename=fname)) > ##D unlink(fname) > ## End(Not run) > > > > cleanEx(); ..nameEx <- "itsFin" > > ### * itsFin > > flush(stderr()); flush(stdout()) > > ### Name: itsFin > ### Title: Financial Functions for Irregular Time-Series Objects > ### Aliases: itsFin accrueIts > ### Keywords: ts > > ### ** Examples > > a <- matrix(c(seq(by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3) > b <- as.its(a) > accrueIts(b[which(weekdayIts(b)),]/100,daysperyear=365) 1 2 19700102 2.739726e-05 0.001123288 19700105 1.643836e-04 0.003452055 19700106 1.369863e-04 0.001232877 19700107 1.643836e-04 0.001260274 19700108 1.917808e-04 0.001287671 19700109 2.191781e-04 0.001315068 19700112 7.397260e-04 0.004027397 19700113 3.287671e-04 0.001424658 19700114 3.561644e-04 0.001452055 19700115 3.835616e-04 0.001479452 19700116 4.109589e-04 0.001506849 19700119 1.315068e-03 0.004602740 19700120 5.205479e-04 0.001616438 > > > > cleanEx(); ..nameEx <- "itsInfo" > > ### * itsInfo > > flush(stderr()); flush(stdout()) > > ### Name: itsInfo > ### Title: Summary Information for Irregular Time-Series Objects > ### Aliases: itsInfo start end summary start,its-method end,its-method > ### summary,its-method > ### Keywords: ts > > ### ** Examples > > b <- newIts(1:30,ncol=3) > start(b,format="%y-%m-%d") [1] "05-07-13" > end(b) [1] "20050722" > summary(b) 1 2 3 Min. 1.000000 11.000000 21.000000 1st Qu. 3.250000 13.250000 23.250000 Median 5.500000 15.500000 25.500000 Mean 5.500000 15.500000 25.500000 3rd Qu. 7.750000 17.750000 27.750000 Max. 10.000000 20.000000 30.000000 NA's 0.000000 0.000000 0.000000 non-NA's 10.000000 10.000000 10.000000 s.d. 3.027650 3.027650 3.027650 > > > > cleanEx(); ..nameEx <- "itsInterp" > > ### * itsInterp > > flush(stderr()); flush(stdout()) > > ### Name: itsInterp > ### Title: Interpolation Functions for Irregular Time-Series Objects > ### Aliases: itsInterp locf > ### Keywords: ts > > ### ** Examples > > x <- newIts(11:40,ncol=3) > x[1:2,1] <- NA > x[3:4,2] <- NA > x[9:10,3] <- NA > print(x) 1 2 3 20050713 NA 21 31 20050714 NA 22 32 20050715 13 NA 33 20050716 14 NA 34 20050717 15 25 35 20050718 16 26 36 20050719 17 27 37 20050720 18 28 38 20050721 19 29 NA 20050722 20 30 NA > print(locf(x)) 1 2 3 20050713 NA 21 31 20050714 NA 22 32 20050715 13 22 33 20050716 14 22 34 20050717 15 25 35 20050718 16 26 36 20050719 17 27 37 20050720 18 28 38 20050721 19 29 38 20050722 20 30 38 > > > > cleanEx(); ..nameEx <- "itsJoin" > > ### * itsJoin > > flush(stderr()); flush(stdout()) > > ### Name: itsJoin > ### Title: Join Functions for Irregular Time-Series Objects > ### Aliases: itsJoin union union,its,NULL-method union,NULL,its-method > ### union,its,its-method intersect intersect,its,NULL-method > ### intersect,NULL,its-method intersect,its,its-method alignedIts > ### appendIts collapseIts > ### Keywords: ts > > ### ** Examples > > its.format("%Y-%m-%d") [1] "%Y-%m-%d" > b <- newIts(1:30,ncol=3,start="2003-01-01",end="2003-01-10") > union(b,diff(b)) 1 2 3 1 2 3 2003-01-01 1 11 21 NA NA NA 2003-01-02 2 12 22 1 1 1 2003-01-03 3 13 23 1 1 1 2003-01-04 4 14 24 1 1 1 2003-01-05 5 15 25 1 1 1 2003-01-06 6 16 26 1 1 1 2003-01-07 7 17 27 1 1 1 2003-01-08 8 18 28 1 1 1 2003-01-09 9 19 29 1 1 1 2003-01-10 10 20 30 1 1 1 > intersect(b,diff(b)) 1 2 3 1 2 3 2003-01-02 2 12 22 1 1 1 2003-01-03 3 13 23 1 1 1 2003-01-04 4 14 24 1 1 1 2003-01-05 5 15 25 1 1 1 2003-01-06 6 16 26 1 1 1 2003-01-07 7 17 27 1 1 1 2003-01-08 8 18 28 1 1 1 2003-01-09 9 19 29 1 1 1 2003-01-10 10 20 30 1 1 1 > alignedIts(b,diff(b)) [[1]] 1 2 3 2003-01-02 2 12 22 2003-01-03 3 13 23 2003-01-04 4 14 24 2003-01-05 5 15 25 2003-01-06 6 16 26 2003-01-07 7 17 27 2003-01-08 8 18 28 2003-01-09 9 19 29 2003-01-10 10 20 30 [[2]] 1 2 3 2003-01-02 1 1 1 2003-01-03 1 1 1 2003-01-04 1 1 1 2003-01-05 1 1 1 2003-01-06 1 1 1 2003-01-07 1 1 1 2003-01-08 1 1 1 2003-01-09 1 1 1 2003-01-10 1 1 1 > b1 <- newIts(1:30,ncol=3,start="2003-01-11",end="2003-01-20") > appendIts(b,b1) 1 2 3 2003-01-01 1 11 21 2003-01-02 2 12 22 2003-01-03 3 13 23 2003-01-04 4 14 24 2003-01-05 5 15 25 2003-01-06 6 16 26 2003-01-07 7 17 27 2003-01-08 8 18 28 2003-01-09 9 19 29 2003-01-10 10 20 30 2003-01-11 1 11 21 2003-01-12 2 12 22 2003-01-13 3 13 23 2003-01-14 4 14 24 2003-01-15 5 15 25 2003-01-16 6 16 26 2003-01-17 7 17 27 2003-01-18 8 18 28 2003-01-19 9 19 29 2003-01-20 10 20 30 > c <- union(b,b*NA) > c[2,4] <- 99 > c[2,1] <- NA > print(c) 1 2 3 1 2 3 2003-01-01 1 11 21 NA NA NA 2003-01-02 NA 12 22 99 NA NA 2003-01-03 3 13 23 NA NA NA 2003-01-04 4 14 24 NA NA NA 2003-01-05 5 15 25 NA NA NA 2003-01-06 6 16 26 NA NA NA 2003-01-07 7 17 27 NA NA NA 2003-01-08 8 18 28 NA NA NA 2003-01-09 9 19 29 NA NA NA 2003-01-10 10 20 30 NA NA NA > collapseIts(c) 1 2 3 2003-01-01 1 11 21 2003-01-02 99 12 22 2003-01-03 3 13 23 2003-01-04 4 14 24 2003-01-05 5 15 25 2003-01-06 6 16 26 2003-01-07 7 17 27 2003-01-08 8 18 28 2003-01-09 9 19 29 2003-01-10 10 20 30 > > > > cleanEx(); ..nameEx <- "itsLags" > > ### * itsLags > > flush(stderr()); flush(stdout()) > > ### Name: itsLags > ### Title: Lag Functions for Irregular Time-Series Objects > ### Aliases: itsLags lagIts lagdistIts > ### Keywords: ts > > ### ** Examples > > b <- newIts(1:10) > lagIts(b) 1 lag 1 2005-07-13 NA 2005-07-14 1 2005-07-15 2 2005-07-16 3 2005-07-17 4 2005-07-18 5 2005-07-19 6 2005-07-20 7 2005-07-21 8 2005-07-22 9 > lagdistIts(b[,1],1,3) 1 lag 1 1 lag 2 1 lag 3 2005-07-13 NA NA NA 2005-07-14 1 NA NA 2005-07-15 2 1 NA 2005-07-16 3 2 1 2005-07-17 4 3 2 2005-07-18 5 4 3 2005-07-19 6 5 4 2005-07-20 7 6 5 2005-07-21 8 7 6 2005-07-22 9 8 7 > > > > cleanEx(); ..nameEx <- "itsSubset" > > ### * itsSubset > > flush(stderr()); flush(stdout()) > > ### Name: itsSubset > ### Title: Range and Extract for Irregular Time-Series Objects > ### Aliases: itsSubset rangeIts extractIts x[i,j] [ [,its-method > ### [<-,its,its-method > ### Keywords: ts > > ### ** Examples > > its.format("%Y-%m-%d") [1] "%Y-%m-%d" > b <- newIts(start="2003-01-01",end="2003-01-20") > rangeIts(b,start = "2003-01-05" ,end= "2003-01-15") 1 2003-01-05 NA 2003-01-06 NA 2003-01-07 NA 2003-01-08 NA 2003-01-09 NA 2003-01-10 NA 2003-01-11 NA 2003-01-12 NA 2003-01-13 NA 2003-01-14 NA 2003-01-15 NA > rangeIts(b,start = ISOdate(2003,1,5,hour=0) ,end= ISOdate(2003,1,15,hour=0)) 1 2003-01-06 NA 2003-01-07 NA 2003-01-08 NA 2003-01-09 NA 2003-01-10 NA 2003-01-11 NA 2003-01-12 NA 2003-01-13 NA 2003-01-14 NA 2003-01-15 NA > b[1:3,] 1 2003-01-01 NA 2003-01-02 NA 2003-01-03 NA > b[,1] 1 2003-01-01 NA 2003-01-02 NA 2003-01-03 NA 2003-01-04 NA 2003-01-05 NA 2003-01-06 NA 2003-01-07 NA 2003-01-08 NA 2003-01-09 NA 2003-01-10 NA 2003-01-11 NA 2003-01-12 NA 2003-01-13 NA 2003-01-14 NA 2003-01-15 NA 2003-01-16 NA 2003-01-17 NA 2003-01-18 NA 2003-01-19 NA 2003-01-20 NA > b[,dates=ISOdate(2003,1,1,hour=0,tz="")] 1 2003-01-01 NA > its.format("%a %d %b %Y") [1] "%a %d %b %Y" > c <- newIts() > extractIts(c,weekday=TRUE,period="month",find="last") #the last weekdays of the month in c 1 Fri 22 Jul 2005 NA > > > > cleanEx(); ..nameEx <- "itsTimes" > > ### * itsTimes > > flush(stderr()); flush(stdout()) > > ### Name: itsTimes > ### Title: Time Functions for Irregular Time-Series Objects > ### Aliases: itsTimes daysecondIts weekdayIts > ### Keywords: ts > > ### ** Examples > > ## Not run: > ##D its.format("%Y-%m-%d %A") > ##D b <- newIts() > ##D print(b) > ##D daysecondIts(b) > ##D weekdayIts(b) > ##D its.format("%Y-%m-%d") > ## End(Not run) > > > > ### *