The R Project SVN R

Rev

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

Rev 88894 Rev 88895
Line 55... Line 55...
55
airquality$avgOz <- rep(unlist(avgOz, use.names=FALSE), lengths(l))
55
airquality$avgOz <- rep(unlist(avgOz, use.names=FALSE), lengths(l))
56
## but this is safer and cleaner, but can be slower
56
## but this is safer and cleaner, but can be slower
57
airquality$avgOz <- unsplit(avgOz, airquality$Month)
57
airquality$avgOz <- unsplit(avgOz, airquality$Month)
58
 
58
 
59
## should always be true, except when a length does not fit in 32 bits
59
## should always be true, except when a length does not fit in 32 bits
-
 
60
## or l has dimensions
60
stopifnot(identical(lengths(l), vapply(l, length, integer(1L))))
61
stopifnot(identical(lengths(l), vapply(l, length, integer(1L))))
61
 
62
 
62
## empty lists are not a problem
63
## empty lists are not a problem
63
x <- list()
64
x <- list()
64
stopifnot(identical(lengths(x), integer()))
65
stopifnot(identical(lengths(x), integer()))