/dports/textproc/R-cran-XML/XML/inst/examples/ |
H A D | itunes.R | 48 table(as.numeric(sapply(songs, "[[", "Bit_Rate"))) 51 hist(as.numeric(sapply(songs, "[[", "Play_Count"))) 55 hist(table(sapply(songs, "[", "Album"))) 59 hist(as.numeric(sapply(songs, "[", "Year"))) 63 hist(as.numeric(sapply(songs, "[", "Total_Time"))) 66 album.time = tapply(songs, sapply(songs, "[", "Album"), function(x) sum(as.numeric(sapply(x, "[", "… 75 sort(table(sapply(songs, "[", "Artist")), decreasing = TRUE)[1:40] 79 table(sapply(songs, "[", "Disc_Number")) 83 table(sapply(songs, "[", "Kind")) 85 table(sapply(songs, "[", "Genre")) [all …]
|
/dports/devel/R-cran-tinytest/tinytest/R/ |
H A D | methods.R | 15 result <- factor(sapply(object, c) 21 file <- sapply(object, function(x) attr(x,"file")) 44 all( sapply(x, function(d) isTRUE(d) || is.na(d)) ) 51 any( sapply(x, function(d) isTRUE(d) || is.na(d)) ) 58 all( sapply(x, function(d) isFALSE(d) || is.na(d)) ) 198 result = sapply(x, c) 200 , diff = sapply(L, `[[`, "diff") 201 , short = sapply(L, `[[`, "short") 202 , file = sapply(L, `[[`, "file") 203 , first = sapply(L, `[[`, "fst") [all …]
|
/dports/converters/R-cran-RJSONIO/RJSONIO/inst/doc/ |
H A D | performance.R | 2 new.times = sapply(n, function(n) system.time(invisible(toJSON(rpois(n, 4))))) 5 new.times = sapply(n, function(n) system.time(invisible(toJSON(rpois(n, 4))))) 9 json = sapply(n, function(n) toJSON(rpois(n, 2))) 10 fromJSON.new.times = sapply(json, function(v) system.time(fromJSON(v, asText = TRUE))) 12 fromJSON.new.times.10000 = sapply(json, function(v) system.time(fromJSON(v, default.size = 10000, a… 16 fromJSON.old.times = sapply(json, function(v) system.time(fromJSON(v))) 25 v = sapply(n, function(n) toJSON(rpois(n, 4))) 27 a = sapply(v, function(x) system.time(fromJSON(x)), USE.NAMES = FALSE) 29 b = sapply(v, function(x) system.time(fromJSON(x, RJSONIO:::simpleJSONHandler())), USE.NAMES = FALS… 33 c = sapply(v, function(x) system.time(f(x)), USE.NAMES = FALSE) [all …]
|
/dports/math/R-cran-mcmc/mcmc/tests/ |
H A D | morph.R | 13 if (!all.equal(sapply(x, m.id$lud(function(x) dnorm(x, log=TRUE))), 51 all.equal(sapply(x, morph.center$transform), x-center) 52 all.equal(sapply(x, morph.center$inverse), x+center) 53 all.equal(sapply(x, morph.center$lud(function(y) dnorm(y, log=TRUE))), 69 all.equal(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))), 72 all(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))) 81 all.equal(x, sapply(x, morph.r$inverse)) 96 all.equal(sapply(x, function(y) dnorm.morph(y, 2)), 114 all.equal(x, sapply(sapply(x, f$transform), f$inverse)) 117 all.equal(x, sapply(sapply(x, f$transform), f$inverse)) [all …]
|
H A D | morph.Rout.save | 31 + if (!all.equal(sapply(x, m.id$lud(function(x) dnorm(x, log=TRUE))), 74 > all.equal(sapply(x, morph.center$transform), x-center) 76 > all.equal(sapply(x, morph.center$inverse), x+center) 78 > all.equal(sapply(x, morph.center$lud(function(y) dnorm(y, log=TRUE))), 98 > all.equal(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))), 102 > all(sapply(x, morph.r$lud(function(x) dnorm(x, log=TRUE))) 112 + all.equal(x, sapply(x, morph.r$inverse)) 129 > all.equal(sapply(x, function(y) dnorm.morph(y, 2)), 150 > all.equal(x, sapply(sapply(x, f$transform), f$inverse)) 154 > all.equal(x, sapply(sapply(x, f$transform), f$inverse)) [all …]
|
/dports/math/R-cran-intervals/intervals/R/ |
H A D | c.R | 16 if ( any( sapply( args, is.null ) ) ) 17 args <- args[ !sapply( args, is.null ) ] 19 classes <- sapply( args, class ) 24 if ( !all( sapply( args, type ) == type( args[[1]] ) ) ) 27 …same_closed <- all( sapply( args[-1], function(x) identical( closed( args[[1]] ), closed( x ) ) ) ) 48 if ( any( sapply( args, is.null ) ) ) 49 args <- args[ !sapply( args, is.null ) ] 50 classes <- sapply( args, class ) 53 if ( !all( sapply( args, type ) == type( args[[1]] ) ) )
|
/dports/www/R-cran-scrapeR/scrapeR/R/ |
H A D | functions.R | 7 …headers<-sapply(sapply(source,substr,start=1,stop=10000),gsub,pattern="(.+)\r\n\r\n+<.+",replaceme… 37 if(any(sapply(contentLocationHeaders,length)>0)) { 38 these<-which(sapply(contentLocationHeaders,length)>0) 65 end<-sapply(source,nchar) 107 if(!all(sapply(url,is.character))) { 110 } else if(!all(sapply(file,is.null))) { 111 if(!all(sapply(file,is.character))) { 336 if(any(!sapply(hdrs,is.null))) { 337 these<-which(!sapply(hdrs,is.null)) 344 if(any(!sapply(redirectURL,is.null))) { [all …]
|
/dports/math/R-cran-sets/sets/R/ |
H A D | cartesian.R | 21 if (isTRUE(all(sapply(l, gset_is_set)))) 25 if (any(sapply(l, gset_cardinality) == 0, na.rm = TRUE)) 36 if (all(sapply(l, gset_is_crisp, na.rm = TRUE))) 37 sapply(memberships, function(i) prod(unlist(i))) 38 else if (all(sapply(l, gset_is_fuzzy_set, na.rm = TRUE))) { 39 sapply(memberships, function(i) Reduce(.T., unlist(i))) 43 maxlen <- max(sapply(i, gset_cardinality, na.rm = TRUE))
|
/dports/textproc/R-cran-openxlsx/openxlsx/R/ |
H A D | workbook_write_data.R | 22 isPOSIXlt <- function(data) sapply(lapply(data, class), FUN = function(x) any(x == "POSIXlt")) 50 dInds <- which(sapply(colClasses, function(x) "date" %in% x)) 65 pInds <- which(sapply(colClasses, function(x) any(c("posixct", "posixt", "posixlt") %in% x))) 95 for (i in which(sapply(colClasses, function(x) "scientific" %in% x))) { 102 for (i in which(sapply(colClasses, function(x) "list" %in% x))) { 109 df[[i]] <- sapply(df_i, stri_join, collapse = list_sep) 114 for (i in which(sapply(colClasses, function(x) "hyperlink" %in% x))) { 129 for (i in which(sapply(colClasses, function(x) frm %in% x))) { 140 for (i in which(sapply(colClasses, function(x) "logical" %in% x))) { 147 for (i in which(sapply(colClasses, function(x) "numeric" %in% x))) { [all …]
|
/dports/math/R-cran-FrF2/FrF2/R/ |
H A D | utilcat.R | 32 minus <- which(sapply(gen, function(obj) all(obj<0))) 58 WLP <- sapply(words, FUN=length) 87 … hilf <- sapply(f4, function(obj) {pos <- which(sapply(drei, function(obj2) all(obj %in% obj2))) 94 hilf <- sapply(wl[[2]], function(obj) f4[[i]] %in% obj) 97 WLP4 <- sapply(wl[[2]],FUN=length) 113 if (max(unlist(wl[[2]]))>50) print(sapply(wl[[2]],function(obj) 124 else print(sapply(wl[[2]],function(obj) paste(Letters[obj],collapse="")),quote=FALSE) 149 minus <- c(rep("",k),sapply(gen, function(obj) if (all(obj<0)) "-" else "")) 153 absall1 <- sapply(c(as.list(1:k),gen),function(obj) paste(Letters[obj],collapse=sep)) 197 struc <- sapply(struc[which(sapply(struc,length)>1)], "paste",collapse="=") [all …]
|
H A D | blocksplitplot.aliases.shortrep.R | 9 leg.c <- sapply(leg, function(obj) obj[1]) 10 leg.n <- sapply(leg, function(obj) obj[2]) 12 hilf <- lapply(hilf, function(obj) obj[ord(data.frame(sapply(obj, length)))]) 13 unlist(sort(unlist(sapply(hilf, function(obj) { 15 hilf <- paste(sapply(obj, function(obj2) paste(obj2, collapse="")), collapse="=") 23 struc <- sapply(struc, function(obj) {
|
/dports/math/R-cran-lme4/lme4/tests/ |
H A D | lmList-tst.R | 42 evs <- sapply(s3fn[s3fn != "pairs"], do.call, args = list(fm3.1)) 44 cls <- sapply(evs, function(.) class(.)[1]) 52 evs2 <- sapply(s3fn, do.call, args = list(fm2)) 56 ss(evs3.2 <- sapply(s3fn[s3fn != "pairs"], do.call, 60 evs4 <- sapply(s3fn, function(fn) 65 str(sapply(evs4, class)) # more errors than above 66 isok4 <- !sapply(evs4, is, class2="error")
|
/dports/math/rkward-kde/rkward-0.7.1/tests/plots/ |
H A D | boxplot.rkcommands.R | 8 …points(sapply(data_list, mean, na.rm=TRUE), pch=15, cex = 1.00, col="blue") # calculates the mean … 20 …points(sapply(data_list, geo_mean), pch=15, cex = 1.00, col="blue") # calculates the mean for all … 21 sd_low <- (sapply(data_list, mean, na.rm = TRUE)) - (sapply(data_list,sd,na.rm = TRUE)) 22 sd_high <- (sapply(data_list, mean, na.rm = TRUE)) + (sapply(data_list,sd,na.rm = TRUE))
|
/dports/math/R-cran-igraph/igraph/R/ |
H A D | epi.R | 38 big.time <- unlist(sapply(sir, "[[", "times")) 39 medlen <- median(sapply(lapply(sir, "[[", "times"), length)) 58 times <- unlist(sapply(sir, "[[", "times")) 59 big.N.NS <- unlist(sapply(sir, "[[", "NS")) 60 big.N.NI <- unlist(sapply(sir, "[[", "NI")) 61 big.N.NR <- unlist(sapply(sir, "[[", "NR")) 80 times <- unlist(sapply(sir, "[[", "times")) 81 big.N <- unlist(sapply(sir, function(x) { x[[comp]] })) 177 xlim <- c(0, max(sapply(sir, function(x) max(x$times)))) 180 ylim <- c(0, max(sapply(sir, function(x) max(x[[comp]]))))
|
H A D | nexus.R | 25 nam <- sapply(entries, "[", 1) 37 myattr <- sapply(myattr, "[", 2) 64 } else if (any(sapply(x$attributes, 103 astr <- sapply(attr, function(a) { 138 v <- lapply(ve, function(x) sapply(x, "[", 1)) 139 e <- lapply(ve, function(x) sapply(x, "[", 2)) 147 v <- sapply(v, int) 148 e <- sapply(e, int) 162 sid <- sapply(x, "[[", "sid") 402 rid <- sapply(id, "[[", "id") [all …]
|
/dports/devel/R-cran-gdata/gdata/R/ |
H A D | combine.R | 7 if(is.null(names)) names <- sapply( as.list(match.call()), deparse)[-1] 10 sapply(tmp, is.matrix) 12 sapply(tmp, is.data.frame) ) ) 14 len <- sapply(tmp, function(x) c(dim(x),1)[1] ) 20 len <- sapply(tmp,length)
|
/dports/math/R-cran-robustbase/robustbase/tests/ |
H A D | Qn-Sn-plots.R | 19 QnAx <- sapply(seq_along(ix), function(n) Qn(x[ix[1:n]])) 31 (qnn <- sapply(n, function(n)Qn(1:n, const=1))) 35 (snn <- sapply(n, function(n)Sn(1:n, const=1))) 43 (sdn <- c(1, sapply(n[-1], function(n)sd(1:n)/n))) 53 sdn <- c(1, sapply(n[-1], function(m)sd(Sample(m)))) 54 r <- cbind(Qn = sapply(n, function(m)Qn(Sample(m))), 55 Sn = sapply(n, function(m)Sn(Sample(m)))) / sdn
|
/dports/math/R-cran-zoo/zoo/R/ |
H A D | merge.zoo.R | 17 ncols <- sapply(args, NCOL) 22 namsNULL <- sapply(nams, is.null) 26 namsID <- sapply(nams, function(x) identical(x, nam1)) 42 nulldim <- sapply(argsdata, function(a) is.null(dim(a))) 59 freq <- if(!("zooreg" %in% unlist(sapply(args, class)))) NULL 102 scalars <- sapply(args, is.scalar) 115 freq <- unlist(sapply(args, frequency)) 149 if(any(sapply(indexlist, index_duplicates))) 295 nam2 <- sapply(rval, function(z) 1:NCOL(z)) 306 rval <- rval[sapply(rval, function(x) length(x) > 0)] [all …]
|
/dports/astro/R-cran-maptools/maptools/R/ |
H A D | shapelib.R | 120 if (!all(sapply(polylist, function(x) is.double(x)))) { 124 if (any(sapply(polylist, function(x) is.null(attr(x, "nParts"))))) { 128 if (any(sapply(polylist, function(x) attr(x, "nParts") < 1))) { 137 if (any(sapply(polylist, function(x) is.null(attr(x, "pstart"))))) { 145 if (!all(sapply(polylist, function(x) is.integer(attr(x, 155 if (!all(sapply(polylist, function(x) is.integer(attr(x, 172 nD <- unique(sapply(polylist, function(x) dim(x)[2])) 177 if (!all(sapply(polylist, function(x) is.double(x)))) { 185 if (any(sapply(polylist, function(x) is.null(attr(x, "nParts"))))) { 224 if (any(sapply(polylist, function(x) attr(x, "nParts") < 1))) [all …]
|
/dports/devel/R-cran-crayon/crayon/R/ |
H A D | show.r | 29 sapply(0:5, function(r) { 30 sapply(0:5, function(g) { 31 c(sapply(0:5, function(b) { 42 sapply(0:23, function(g) { 55 multicol(sapply(seq_along(builtin_styles), function(s) {
|
/dports/math/p5-Math-Matrix/Math-Matrix-0.94/t/ |
H A D | sapply.t | 15 my $y = $x -> sapply($sub); 40 my $z = $x -> sapply($sub, $y); 65 my $w = $x -> sapply($sub, $y, $z); 90 my $z = $x -> sapply($sub, $y); 116 my $z = $x -> sapply($sub, $y); 141 my $y = $x -> sapply($sub); 153 my $z = $x -> sapply($sub);
|
/dports/math/R-cran-memisc/memisc/R/ |
H A D | collect.R | 19 modes <- sapply(args,mode) 46 modes <- sapply(args,mode) 122 source <- rep(seq_along(args),sapply(args,nrow)) 123 nrow.items <- sapply(args,nrow) 161 source <- rep(seq_along(args),sapply(args,nrow)) 162 nrow.items <- sapply(args,nrow) 191 res <- if(any(sapply(..1,is.array))) 214 lens <- sapply(vecs,length) 233 modes <- sapply(x,mode) 281 cdims <- sapply(cdimnames,length) [all …]
|
H A D | recode.R | 8 recodings <- recodings[nzchar(sapply(recodings,paste,collapse=""))] 12 if(any(sapply(sapply(recodings,"[[",1),paste)!="<-")) 38 oldcodes <- sapply(conditions,eval) 53 newcodes <- sapply(newcodes,eval,parent.frame()) 159 if(any(sapply(sapply(recodings,"[[",1),paste)!="<-")) 195 torecode <- sapply(oldcodes,eval,envir=environment()) 197 newcodes <- sapply(newcodes,eval,parent.frame()) 247 recodings <- recodings[nzchar(sapply(recodings,paste,collapse=""))] 248 if(any(sapply(sapply(recodings,"[[",1),paste)!="<-")) 252 newcodes <- sapply(recodings,"[[",2) [all …]
|
/dports/math/R-cran-raster/raster/R/ |
H A D | bind.R | 116 i <- sapply(rwn, length) > 0 127 ln <- sapply(rwn, length) 141 cls <- sapply(x, class) 209 i <- sapply(rwn, length) > 0 220 ln <- sapply(rwn, length) 234 cls <- sapply(x, class) 244 x <- sapply(x, function(y) as(y, 'SpatialLines')) 274 x <- sapply(x, function(x) as(x, 'SpatialLines')) 293 i <- sapply(rwn, length) > 0 304 ln <- sapply(rwn, length) [all …]
|
/dports/devel/R-cran-randomForest/randomForest/R/ |
H A D | combine.R | 6 areForest <- sapply(rflist, function(x) inherits(x, "randomForest")) 11 trees <- sapply(rflist, function(x) x$ntree) 15 haveTest <- ! any(sapply(rflist, function(x) is.null(x$test))) 18 numvars <- sapply(vlist, length) 26 haveForest <- sapply(rflist, function(x) !is.null(x$forest)) 28 nrnodes <- max(sapply(rflist, function(x) x$forest$nrnodes)) 31 unlist(sapply(rflist, function(x) x$forest$ndbigtree)) 119 have.imp <- !any(sapply(rflist, function(x) is.null(x$importance))) 132 haveCaseImp <- !any(sapply(rflist, function(x) 147 have.prox <- !any(sapply(rflist, function(x) is.null(x$proximity))) [all …]
|