Displaying 1 result from an estimated 1 matches for "mmatplottest".
2007 Mar 04
1
Scoping issue?
...# to be mapply-compatible to test multiple columns.
mmatplot <- function(colnum, x, y, ...){
switch(class(y),
array = y <- y[, colnum, ],
list = y <- sapply(X = y, FUN = subset, select = colnum))
stopifnot(is.matrix(y))
matplot(x, y, ...)
}
#This is just a tester function
mmatplotTest <- function(){
oldmf <- par("mfrow")
par(mfrow = c(2,3))
A <- array(data = rnorm(90), dim = c(10, 3, 3))
L <- list(A[, , 1], A[, , 2], A[, , 3])
# The 'main' argument below throws the error, but if
# commented out, another error crops up due to 'colnum...