The R Project SVN R

Rev

Rev 90157 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90157 Rev 90172
Line 379... Line 379...
379
names(unclass(leapS)) ; is.list(leapS)
379
names(unclass(leapS)) ; is.list(leapS)
380
## str() on inner structure needs unclass(.):
380
## str() on inner structure needs unclass(.):
381
utils::str(unclass(leapS), vec.len = 7)
381
utils::str(unclass(leapS), vec.len = 7)
382
## show all components
382
## show all components
383
data.frame(unclass(leapS))
383
data.frame(unclass(leapS))
384
## Omitting "tzone" attrib, numeric matrix w/ 10 columns (27 x 10, currently) :
384
## Omitting "zone" column ==> numeric matrix w/ 10 columns
385
(leapm <- as.matrix(leapS))
385
(leapm <- as.matrix(leapS))
386
stopifnot(identical(ncol(leapm), 10L), is.numeric(leapm)) # was character in R <= 4.6.0
386
stopifnot(identical(ncol(leapm), 10L), is.numeric(leapm)) # was character in R <= 4.6.0
387
 
387
 
388
## Extracting *single* components of POSIXlt objects:
388
## Extracting *single* components of POSIXlt objects:
389
leapS[1 : 5, "year"]
389
leapS[1 : 5, "year"]