powered by
spam
# dim(x) # dim(x) <- value
dim
dimension
integer
The replacemnt method changes the dimension of the object by rearranging.
pad.spam
x <- diag(4) dim(x)<-c(2,8) x s <- diag.spam(4) dim(s) <- c(2,8) # result is different than x s <- diag.spam(4) pad(s) <- c(7,3) # any positive value can be used
Run the code above in your browser using DataLab