search for: dimsx

Displaying 4 results from an estimated 4 matches for "dimsx".

Did you mean: dims
2019 Oct 29
5
head.matrix can return 1000s of columns -- limit to n or add new argument?
...one way forward is to have the default methods check for dimensions, and use length if it is null: tail.default <- tail.data.frame <- function(x, n = 6L, ...) { if(any(n == 0)) stop("n must be non-zero or unspecified for all dimensions") if(!is.null(dim(x))) dimsx <- dim(x) else dimsx <- length(x) ## this returns a list of vectors of indices in each ## dimension, regardless of length of the the n ## argument sel <- lapply(seq_along(dimsx), function(i) { dxi <- dimsx[i] ## select all indices (full dim)...
2019 Oct 31
2
head.matrix can return 1000s of columns -- limit to n or add new argument?
...d use length if it is null: > > > tail.default <- tail.data.frame <- function(x, n = 6L, ...) > > { > > if(any(n == 0)) > > stop("n must be non-zero or unspecified for all dimensions") > > if(!is.null(dim(x))) > > dimsx <- dim(x) > > else > > dimsx <- length(x) > > > ## this returns a list of vectors of indices in each > > ## dimension, regardless of length of the the n > > ## argument > > sel <- lapply(seq_along(dimsx), function(i) { &...
2019 Oct 30
0
head.matrix can return 1000s of columns -- limit to n or add new argument?
...methods check > for dimensions, and use length if it is null: > tail.default <- tail.data.frame <- function(x, n = 6L, ...) > { > if(any(n == 0)) > stop("n must be non-zero or unspecified for all dimensions") > if(!is.null(dim(x))) > dimsx <- dim(x) > else > dimsx <- length(x) > ## this returns a list of vectors of indices in each > ## dimension, regardless of length of the the n > ## argument > sel <- lapply(seq_along(dimsx), function(i) { > dxi <- dimsx[i] > ## se...
2019 Sep 17
2
head.matrix can return 1000s of columns -- limit to n or add new argument?
>>>>> Fox, John >>>>> on Tue, 17 Sep 2019 12:32:13 +0000 writes: > Dear Herve, > Sorry, I should have said "matrices" rather than "data frames" -- brief() has methods for both. > Best, > John > ----------------------------- > John Fox, Professor Emeritus > McMaster University >