The R Project SVN R

Rev

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

Rev 68948 Rev 87429
Line 72... Line 72...
72
 
72
 
73
## demonstrating that  ls.str() works inside functions
73
## demonstrating that  ls.str() works inside functions
74
## ["browser/debug mode"]:
74
## ["browser/debug mode"]:
75
tt <- function(x, y = 1) { aa <- 7; r <- x + y; ls.str() }
75
tt <- function(x, y = 1) { aa <- 7; r <- x + y; ls.str() }
76
(nms <- sapply(strsplit(capture.output(tt(2))," *: *"), `[`, 1))
76
(nms <- sapply(strsplit(capture.output(tt(2))," *: *"), `[`, 1))
77
stopifnot(nms == c("aa", "r","x","y"))
77
stopifnot(setequal(nms, c("aa", "r","x","y")))% collation-specific
78
}
78
}
79
\keyword{print}
79
\keyword{print}
80
\keyword{utilities}
80
\keyword{utilities}