search for: isvectoratom

Displaying 3 results from an estimated 3 matches for "isvectoratom".

Did you mean: isvectoratomic
2001 Mar 27
1
sort(list(..)) ?
Looking at the source code of sort() -- for some speedup considerations -- I found that we currently use isVector() for testing the validity of x in sort(x) whereas I think we should use isVectorAtomic(), actually for S-plus compatibility additionally allowing NULL. Hence I'd propose to replace the test if (!isVector(CAR(args))) errorcall(call, "only vectors can be sorted"); by if(CAR(args) == R_NilValue) return R_NilValue; if(!isVectorAtomic(CAR(args))) errorcall...
2007 Apr 10
1
list/matrix chimera
...erhaps something like this: --- a/src/main/attrib.c +++ b/src/main/attrib.c @@ -536,7 +536,7 @@ SEXP R_data_class(SEXP obj, Rboolean singleString) if(n == 0) { SEXP dim = getAttrib(obj, R_DimSymbol); int nd = length(dim); - if(nd > 0) { + if(nd > 0 && isVectorAtomic(obj)) { if(nd == 2) klass = mkChar("matrix"); else Here is an example that illustrates: vv <- as.list(1:24) dim(vv) <- c(6, 4) vv [,1] [,2] [,3] [,4] [1,] 1 7 13 19 [2,] 2 8 14 20 [3,] 3...
2009 Apr 09
0
bug/suggestion: debugger should respect option "deparse.max.lines" when printing the call (PR#13647)
...p = asInteger(GetOption(install("deparse.max.lines"), R_BaseEnv)); + if(itmp != NA_INTEGER && tmp > 0) R_BrowseLines = itmp; PrintValueRec(call,rho); + R_BrowseLines = 0; + /* Is the body a bare symbol (PR#6804) */ if (!isSymbol(body) & !isVectorAtomic(body)){ /* Find out if the body is function with only one statement. */