sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
a55d6a5a70de93fa32559061c8f688e117a32fd3e38893f9fadcf91f2d137cec
R
164
11
hamming.window <- function (n) { if (n == 1) c <- 1 else { n <- n-1 c <- 0.54 - 0.46*cos(2*pi*(0:n)/n) } return(c) }
76e4493775efe71f9a3d174c7d8c2d3a62d61f90541c3ee2affe395c882fb72d
R
198
8
pdf("align_hum.pdf") hum_align=read.table('hum_align',header=T,sep='\t') summary(hum_align) hist(hum_align$AlignLength,breaks=100) plot(hum_align$SubjAccno) plot(hum_align$QueryAccno) q(save="no")
8f9ce518146c9fd6f1297b8ab921dabc9856811926b3103dcde25d3d388d4e1d
R
207
11
#' Pipe operator #' #' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. #' #' @name %>% #' @rdname pipe #' @keywords internal #' @export #' @importFrom magrittr %>% #' @usage lhs \%>\% rhs NULL
3cf3d6f1ed36d8b233ee0fc59d9752cc2a95494077f7cdf4fbba3b3b70acd2bb
R
220
9
# setting R_TESTS to empty string because of # https://github.com/hadley/testthat/issues/144 # revert this when that issue in R is fixed. Sys.setenv("R_TESTS" = "") library(testthat) library(fgsea) test_check("fgsea")
62353672a640ff838b43afae6b6e6caac0c36095c17dd7b7e0af586cfb98bc53
R
222
13
bincombinations <- function(p) { retval <- matrix(0, nrow=2^p, ncol=p) for(n in 1:p){ retval[,n] <- rep(c(rep(0, (2^p/2^n)), rep(1, (2^p/2^n))), length=2^p) } retval }
417255b9412a07da6550d956dc39f7233908998576a56a35a559b9e586638b89
R
227
8
## cmeans clustering should also work on data frames library(e1071) data(iris) set.seed(123) cm1 <- cmeans(iris[,1:4], 10) bc1 <- bclust(iris[,1:4], 3, base.centers=20,iter.base=50, base.method="cmeans")
ed72a0ff3345001087cbc9f001d045893c938c016a99c60b7c7b453d0627f5da
R
229
8
library(nlme) fm1 <- lme(distance ~ age, Orthodont) str(o1 <- getData(fm1)) df <- Orthodont # note that the name conflicts with df in the stats fm2 <- lme(distance ~ age, df) str(o2 <- getData(fm2)) stopifnot(identical(o1, o2))
5beeb0feea6ada29ee4e7ee18c0c343b276f29d3fe870d06a529f3943eb54e0e
R
230
9
#a=read.table('groel.msa.aln.out') a=read.table('tseq.aln.out') #png("plotcor.png") #plot(a) #dev.off() b <- cor(a) write.table( b , file = "groel_hydro_cor_mat.txt", sep = "\t",col.names = FALSE, row.names = FALSE )
563f40ebb0755afc75afd6510429143a97eed0c1fa6a327e3f1b14ed33e643c4
R
239
7
library(nlme) data(Orthodont) # add a column with an NA that is not used in the fit Orthodont$Others = runif(nrow(Orthodont)) is.na(Orthodont$Others[3]) = TRUE fm1 = lme(Orthodont, random = ~1) augPred(fm1, length.out = 2, level = c(0,1))
5ab8fed40e3f12962a339087f80d8a4208e4bd80372bb72b0a3388b880a0e2d7
R
243
6
gmt.file <- "./inst/extdata/mouse.reactome.gmt" pathwayLines <- strsplit(readLines(gmt.file), "\t") examplePathways <- lapply(pathwayLines, tail, -2) names(examplePathways) <- sapply(pathwayLines, head, 1) devtools::use_data(examplePathways)
80a8c7a00525c06740e3389eb9315c6c9a7b7f7a11ec84ee1e0727a3c8231982
R
248
6
rnk.file <- "./inst/extdata/naive.vs.th1.rnk" exampleRanks <- read.table(rnk.file, header=TRUE, colClasses = c("character", "numeric")) exampleRanks <- setNames(exampleRanks$t, exampleRanks$ID) devtools::use_data(exampleRanks)
0177529708e457e751674b41538b0ff73bf06e4792ba84651770e8b0d303c748
R
253
5
df <- read.csv("Extend Fig.2f.csv", row.names = 1) ggplot(df, aes(x = prediction_score, group = age, color = age)) + geom_density(aes(y = after_stat(scaled)), size = 1.2) + theme_minimal() + labs(x = "Prediction Score", y = "Scaled Density")
7ea4fe9c9cbe2db012e760f45768d0167971f899e3f121464ff001da7af03b09
R
279
5
# code to prepare `exampleExpressionMatrix` dataset goes here expressionMatrixFile <- "./inst/extdata/gse14308_expression_matrix.tsv" exampleExpressionMatrix <- as.matrix(read.table(expressionMatrixFile, sep = "\t")) usethis::use_data(exampleExpressionMatrix, overwrite = TRUE)
d0135f61cab68af646e2041527918d6ed8cb1f11102475597ace5f1d151f4697
R
294
8
## from PR#8905 library(nlme) fm <- lme(distance ~ poly(age, 3) + Sex, data = Orthodont, random = ~ 1) # data for predictions Newdata <- head(Orthodont) Newdata$Sex <- factor(Newdata$Sex, levels = levels(Orthodont$Sex)) (pr <- predict(fm, Newdata)) stopifnot(all.equal(c(pr), fitted(fm)[1:6]))
e66695c0a709a243e879f063f9d665aca41c7dcb8d56c142c94be48e7968d6ce
R
302
6
df <- read.csv("Extend Fig.2g.csv", row.names = 1) ggplot(df, aes(x = prediction_score, color = Major, group = Major)) + geom_density(aes(y = after_stat(scaled)), size = 1.2) + facet_wrap(~group, scales = "free") + theme_minimal() + labs(x = "Prediction Score", y = "Scaled Density (0-1)")
b2a8fbe65dc2ed9dfe0fa719ad9a7cc17b5b83ffafe9a030a41c24fe30727230
R
366
10
options(na.action=na.exclude) # preserve missings options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type library(survival) # # A test to exercise the "infinity" check on 2 variables # test3 <- data.frame(futime=1:12, fustat=c(1,0,1,0,1,0,0,0,0,0,0,0), x1=rep(0:1,6), x2=c(rep(0,6), rep(1,6)))...
36e05c55f76ce29abc827ac17d4aa3d8b85be370e8eeb1a5fa7bc9fc5ecb8cad
R
374
12
# This file is part of the standard setup for testthat. # It is recommended that you do not modify it. # # Where should you do additional test configuration? # Learn more about the roles of various files in: # * https://r-pkgs.org/tests.html # * https://testthat.r-lib.org/reference/test_package.html#special-files libr...
339b494d77bc50e68c0259b7cf8ecc063a4d404b764d52d6dd987365a557d51e
R
385
16
#' MAsP Web Application #' #' This function initiates the R shiny app 'MAsP'. #' #' #' @export MAsPShiny <- function(){ options(shiny.maxRequestSize=100000*1024^2) appDir <- system.file("shiny", "MAsP",package = "MAsP") if (appDir == "") { stop("Could not find UI directory. Try re-installing `MAsP`.", call. ...
6965899ad91d8af3f9ce1e91029de96dc140d318621d20596d9ff52b96a4e1f7
R
388
17
data=read.table('bac-2008-02-13.blast') pdf("bacplot10.pdf") hist(data$V3,breaks=10) hist(data$V4,breaks=10) hist(data$V5,breaks=10) hist(data$V6,breaks=10) hist(data$V7,breaks=10) hist(data$V8,breaks=10) hist(data$V9,breaks=10) hist(data$V10,breaks=10) hist(data$V11,breaks=10) hist(data$V12,breaks=10) plot(data$V12,da...
7affabb8662cad4ca3e83d4dc171fd49ecb87b32b49311db9f5f55465de54047
R
395
13
set.seed(1234) library(knockoff) library(corpcor) library(RSpectra) library(Rdsdp) library(gtools) for(i in 1:25) { X<-read.table(paste("data/X_64_",as.character(i),".txt",sep="")) X<-scale(X) X1<-X[1:8000,] #exclude the test sets X_k<-create.second_order(X1,shrink=T) write.table(X_k,file=paste("dat...
7b5d428caf9eb5e7587b277074a8a1286d193cdf7f48f61dfc8a3b9409ed50f3
R
403
14
basic_test <- function() { env1 <- new.env(hash=TRUE, parent=emptyenv()) env1$a <- 1:3 env1$b <- "foo" env1[[".hidden"]] <- 3.1 z <- copyEnv(env1) checkEquals(env1$a, z$a) checkEquals(env1$b, z$b) checkTrue(!exists(".hidden", z)) z <- copyEnv(env1, all.names=TRUE) checkEquals(env...
986859b29817a03fd66fc813b996cae94cfe560d2379c2aa3fb398595c31857e
R
403
11
#setwd("F:\\mgf\\") #data<-scan("F://mgf//171010_Ip_Hela_ugi.raw.intensity0.charge0-comet-human.txt") data<-read.table("F://mgf//171010_Ip_Hela_ugi.raw.intensity0.charge0-comet-human.txt",header=T,sep="\t",skip=1,row.names=NULL) summary(data) mzd=data$charge-data$exp_neutral_mass hist(mzd) aft<-fft(mzd) aft<-fft...
b7e959948179b3f420ec63511335c67d2d34de004407b8e25d534397df907105
R
450
38
hamming.distance <- function(x,y){ z<-NULL if(is.vector(x) && is.vector(y)){ z <- sum(as.logical(x) != as.logical(y)) } else{ z <- matrix(0,nrow=nrow(x),ncol=nrow(x)) for(k in 1:(nrow(x)-1)){ for(l in (k+1):nrow(x)){ z[k,l] <- hamming.distance(x[k,], x[l,]) z[l,k] <- z[k,l]...
f0f6e35ed5de7243aa463af177273c57bddd33f19b5a6706937bd492c0493a16
R
458
14
## tests of fix for PR#9831 library(nlme) val <- c("10"=1.10,"14"=1.14) vf <- varIdent(value=val, form=~1|age, fixed=c("12"=1.12)) vfi <- Initialize(vf,Orthodont) str(vfi) coef(vfi) coef(vfi, unconstrained = FALSE, allCoef = TRUE) vfiCopy <- vfi # copy of an initialized object length(vfiCopy) # lengt...
b9dd88e4dc0028c54d255e6dee4c66bed784fea1028d6e07cc78149fc51a2faa
R
461
8
df <- read.csv("Extend Fig.7c.csv", row.names = 1) df$cluster <- rownames(df) df$cluster <- factor(df$cluster, levels = df$cluster) cluster_colors <- c("LRP1.0" = "#2EBAD1", "LRP2.1" = "#5BC2AE", "LRP2.2" = "#60BD6E") ggplot(df, aes(x = cluster, y = Prop, fill = cluster)) + geom_bar(stat = "identity") + scale_fi...
1cfef547241ecd993ea1897673a73c3bd5dd4ccccdcd848ba21853952132ece7
R
474
5
df <- read.csv("Extend Fig.4f.csv") df$subclass_clean <- factor(df$subclass_clean, levels = c("Other", "053 Sst Gaba", "052 Pvalb Gaba")) ggplot(df, aes(x = "PV Atlas", y = fraction, fill = subclass_clean)) + geom_bar(stat = "identity") + scale_fill_manual(values = c("052 Pvalb Gaba" = "#F0E444", "053 Sst Gaba" = ...
f6e422cc63b49e6093c7e06f1b8f2753677338a411f84777b8ccebfab9705142
R
487
29
## test some typical completion attempts testLine <- function(line, cursor = nchar(line)) { str(utils:::.win32consoleCompletion(line, cursor)) } testLine("") testLine("lib") testLine("data(") testLine("data(US") testLine("data(US", 3) testLine("?INS") testLine("utils::data") testLine("utils:::.show_help_on_to...
b6de7b9f8f07868038bdaa6924d139fd19a71513780e72b7428037b2af17c176
R
499
13
pdf("depth.pdf"); scf=read.table('Pwgs6dhmovlcod.posmap.frgscf.500.depth') deg=read.table('Pwgs6dhmovlcod.posmap.frgdeg.500.depth') hist(scf$V6,breaks=100,main="Scf") hist(deg$V6,breaks=100000,main="Deg",xlim=range(0,40)) plot(density(abs(scf$V6)),col="blue",xlab="Depth",main="Scf Vs Deg",ylab="Density of Depth",xlim=r...
70a31747e26bc4f07d42c9ada08415f954ada3e926496d2c0707beffb7a2453a
R
519
18
context("Pathways") test_that("reactomePathways works", { if (!requireNamespace("reactome.db")) { skip("No reactome.db") } data(exampleRanks) pathways <- reactomePathways(names(exampleRanks)) expect_true("12504" %in% pathways$`TCR signaling`) expect_false(any(duplicated(names(pathways)...
364a20d7186115e20d081e66127214e717137a96d2944d80bcb8043165303676
R
520
10
a=read.table('rest_of_list.txt.aln.aln2hydro.txt') a=read.table('groel.msa.aln.aln2hydro.txt') b <- cor(a, method="pearson") write.table( b , file = "groel.msa.aln.hydro.cor.txt", sep = "\t",col.names = FALSE, row.names = FALSE ) c<-symnum(clS <- cor(a, method = "spearman")) write.table( c , file = "rest_of_list_hydr...
685af3003f26ed204e053b905118054dbaa3a749ec3afc51199f55cacd9607cf
R
523
12
#for i in /cluster/work/users/ash022/veronica/*He*.d ; do echo $i ; timsconvert --chunk_size 5000000000 --verbose --input $i ; done #sage sage.json -f human_crap.fasta --batch-size 40 /cluster/work/users/ash022/*.mzML #cp lfq.tsv $HOME/PD/TIMSTOF/LARS/2024/240605_Veronica/HeLa/ inpF <-"TIMSTOF/LARS/2024/240605_Veronic...
a2c3a2c99389c937147621e400675dda0c8000cfd09c32a974f7c4b658b69b30
R
526
35
> newbler=read.table('NEWBLERAn') > phrap=read.table('PHRAPAn') > cap3=read.table('CAP3An') > mira=read.table('MIRAAn') summary(newbler$V2) summary(newbler$V3) summary(newbler$V6) summary(newbler$V7) summary(newbler$V8) summary(mira$V2) summary(mira$V3) summary(mira$V6) summary(mira$V7) summary(mira$V8...
d1cfd7338954908ef7c8ff9eec5f3b77d2e5140ecaa2977637292019f30f6733
R
543
23
getWAIC <- function (stanfitsfile,waicfile,model2fit){ waicname = paste("M",model2fit,"WAIC",sep="") if(!file.exists(waicfile)){ # calculate WAIC. load(stanfitsfile) f2@.MISC<-new.env(parent=globalenv()) modelWAIC <- list(waicname=waicname,waic=waic(f2),mstr=mstr) rm(f2) # clear from ...
4716d0da8ef316b03fff7a17eb6a0ef05d988cba0374cb539c92a7bbd396ba82
R
546
8
df <- read.csv("Fig.4f.csv") df <- df %>% mutate(Supertype = factor(Supertype, levels = rev(sort(unique(Supertype)))), group = factor(group, levels = rev(sort(unique(group))))) ggplot(df, aes(x = Supertype, y = relative_proportion_toP1, fill = group)) + geom_bar(stat = "identity", position = position_dodge()) +...
5a9b3c7dceac6f9080f9682c3f1d4314dad64c72c290a7e8e30651f5b1a701c9
R
549
10
# Fig 1B #### data <- read.csv('Fig.1b.csv') ggplot(data, aes(x = reorder(Dataset, -SST_cells), y = SST_cells, fill = Dataset == "DS17")) + geom_bar(stat = "identity") + scale_fill_manual(values = c("FALSE" = "gray", "TRUE" = "skyblue")) + geom_text(aes(label = SST_cells), vjust = -0.5, size = 3) + geom_h...
049c199c9bcece5e53df95a39931cb001fee40aa875c43a6e5f00cc95e43a563
R
560
7
df <- read.csv("Extend Fig.2i.csv") major_colors <- c("LRP" = "#1CB5BE", "Martinotti" = "#6770B2", "Non-Martinotti" = "#D9636E") major_order <- c("LRP", "Martinotti", "Non-Martinotti") df$Major <- factor(df$Major, levels = major_order) df$group <- factor(df$group, levels = c("E12", "E16", "P1", "P5")) ggplot(df, a...
7dac78a7f4dada654afd278fcc2759f6c035065d10f7c9a60c5abfddc1a0ecef
R
576
21
# First terms of 1d Halton sequence https://en.wikipedia.org/wiki/Van_der_Corput_sequence h <- c(1/2, 1/4, 3/4, 1/8, 5/8, 3/8, 7/8, 1/16) n <- length(h) test_that("the first terms of halton() are correct", { expect_identical(sapply(seq_along(h), halton), h) }) test_that("halton_sequence(n) equals h", { expect_ide...
5e7def9e993a977eb4668251f0321ede6ff4771d6f297eabd68c1c7bd300c9ae
R
586
15
rm(list = ls()); gc() setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/Documents_2020.07.04_1/real_data/rna2') library(dplyr) dvec = c(20, 30, 40, 50, 100, 200, 300, 400, 500) out = matrix(NA, 100, length(dvec)) colnames(out) = paste0('d', dvec) for (v in 1:length(dvec)) { selected = read.csv(paste0...
f4a2b8b97427973ec5c9a4aba62d10dab01fe1b0958db5a2d42049ab50cca8bc
R
586
15
rm(list = ls()); gc() setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/Documents_2020.07.04_1/real_data/rna1') library(dplyr) dvec = c(20, 30, 40, 50, 100, 200, 300, 400, 500) out = matrix(NA, 100, length(dvec)) colnames(out) = paste0('d', dvec) for (v in 1:length(dvec)) { selected = read.csv(paste0...
65c6b1b64cb0f73140b6081b13c78a92a67b87eadfce72865e5b41b730dbe22e
R
607
17
library(fgsea) library(limma) library(GEOquery) es <- getGEO("GSE19429", getGPL = FALSE)[[1]] exprs(es) <- normalizeBetweenArrays(log2(exprs(es)+1), method="quantile") es <- es[!grepl("///", fData(es)$`Gene ID`), ] es <- es[fData(es)$`Gene ID` != "", ] es <- es[order(apply(exprs(es), 1, mean), decreasing=TRUE), ] es <-...
e1799bfe735f091a5bd1639a2fb88e2d50656e7df2eaae8d13c88be0b9bc34ef
R
617
13
jpeg("depth.jpg") tech20map=read.table('ecoltech20pa.txt.depth.txt') plot(density(tech20map$V2),col="black",xlab="Coverage",main="gsMapped Reads",ylab="Density",xlim=c(0,200)) allmap=read.table('allmapread.depth.txt') lines(density(allmap$V2),col="red") srmap=read.table('srmapread.depth.txt') lines(density(srmap$V2),co...
2f751723d1447677111058b6b6af37f19356f58f60904a35b6ce9f8f97e65b8c
R
618
9
data <- read.csv('Fig.2b_DS_anchors.csv') ggplot(data, aes(x = reorder(dataset_id, -Anchors), y = Anchors)) + stat_summary(fun = mean, geom = "bar", fill = "gray", width = 0.7) + stat_summary(fun.data = mean_se, geom = "errorbar", width = 0.2, color = "black") + geom_jitter(width = 0.2, alpha = 1, size = 2) +...
e140c8adfd3377306a5ab74c159617b4204ed95a6ac087794d281c27743be172
R
622
13
df <- read.csv("Fig.4e.csv") supertype_order <- df %>% filter(Major == "Martinotti") %>% arrange(desc(proportion)) %>% pull(Supertype_Other) df$Supertype_Other <- factor(df$Supertype_Other, levels = supertype_order) ggplot(df, aes(x = Supertype_Other, y = proportion, fill = Major)) + geom_bar(stat = "...
0ef74f89ae2a5621ee86fe0c80fcfd446c06e279533fdde324c0313a2d665978
R
626
6
df <- read.csv("Fig.3d.csv") subclass_colors <- c("045 OB-STR-CTX Inh IMN" = "#0E9E74","052 Pvalb Gaba" = "#F0E444", "053 Sst Gaba" = "#E6A126", "056 Sst Chodl Gaba" = "#5DB4E5", "Other" = "#E5E5E5") df$Subclass <- factor(df$Subclass, levels = c("Other", "045 OB-STR-CTX Inh IMN","052 Pvalb Gaba", "056 Sst Chodl Gaba"...
9bfdb7cbe23e7a070d62cda52d44e7b4f8b8b3937af512a2d94a5a48774d2a8b
R
626
14
library(Matrix) library(imager) library(raster) library(rgdal) source('~/Documents/MIT/Research/Rafalab/Projects/slideseq/Cell Demixing/ContentStructure/CSIDE/analysis/helper_functions/alzheimers_helper.R') IM_DIR <- '~/Documents/MIT/Research/Rafalab/Projects/slideseq/Cell Demixing/ContentStructure/RCTD/data/Images/Pl...
fb646421790c86e9a2fc7b185432b718c88bcebdf89105b85edb49dd5c663a40
R
634
8
# Fig 1E #### stacked_bar_data <- read_csv("Fig.1f_Stacked_Bar_Data.csv") stacked_bar_data$subclass_name <- factor(stacked_bar_data$subclass_name, levels = c("052 Pvalb Gaba", "045 OB-STR-CTX Inh IMN", "056 Sst Chodl Gaba", "053 Sst Gaba")) ggplot(stacked_bar_data, aes(x = "Atlas-v0", y = Fraction, fill = subclass_n...
c5d01545b0d6db436c33a420afa62fc1ae4cf38d0306ef7ddeef7f4c80d2bfc1
R
640
23
setwd("D:\\animesh\\projects\\research\\nonlinear") 'java weka.classifiers.meta.ClassificationViaRegression -t data4.arff -W weka.classifiers.trees.M5P -- -M 4.0] data_tr$V1 <- data_xor$V1 data_tr$V2 <- data_xor$V2 data_tr$V3 <- data_xor$V3 data_xor <- read.table("xora.txt") ftr = data.frame(data_xor$...
a3d82af4b19b38d5b5b1c25b218425f8a5b510447500bb6022dd3b5a18421892
R
647
17
#source http://al2na.github.io/genomation/ #install.packages( c("data.table","plyr","reshape2","ggplot2","gridBase","devtools")) #install packages ("Rtools") from http://cran.r-project.org/bin/windows/Rtools/ and run find_rtools() #had to restart R after Rtools installation library(devtools) find_rtools() #source...
01c1d244b8cefb869e9271136d4fd5d8ea9173f2b432b5c9c1274cf11128d979
R
653
14
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/22' myRCTD<- readRDS(file.path(datadir,'myRCTD_j20.rds')) load(file = file.path(datadir,'exvar_thresh.RData')) # exvar, explanatory_variable aggregate_cell_types(myRCTD, names(exvar)) cell_types <- c("...
149922ada102d029422ba6f906e512daf9a891810cb43eb16d40928ec81541a8
R
653
14
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/23' myRCTD<- readRDS(file.path(datadir,'myRCTD_j20.rds')) load(file = file.path(datadir,'exvar_thresh.RData')) # exvar, explanatory_variable aggregate_cell_types(myRCTD, names(exvar)) cell_types <- c("...
9888db7f41b9737903f71317b1880b0676b868f1b2a7aed2852433fded8d2b77
R
653
14
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/24' myRCTD<- readRDS(file.path(datadir,'myRCTD_j20.rds')) load(file = file.path(datadir,'exvar_thresh.RData')) # exvar, explanatory_variable aggregate_cell_types(myRCTD, names(exvar)) cell_types <- c("...
b023e43feaa5a635928e563cd1c545b9769f93531ad7fb52c458d236ae4dd10c
R
653
14
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/21' myRCTD<- readRDS(file.path(datadir,'myRCTD_j20.rds')) load(file = file.path(datadir,'exvar_thresh.RData')) # exvar, explanatory_variable aggregate_cell_types(myRCTD, names(exvar)) cell_types <- c("...
bc69b50998f85fd8c742c6fa590dd2a39b845e27c01bf8db0318073c5003a775
R
658
27
countpattern <- function(x, matching=FALSE) { nvar <- dim(x)[2] n <- dim(x)[1] ## build matrix of all possible binary vectors b <- matrix(0, 2^nvar, nvar) for (i in 1:nvar) b[, nvar+1-i] <- rep(rep(c(0,1),c(2^(i-1),2^(i-1))),2^(nvar-i)) namespat <- b[,1] for (i i...
7ec6f987b584c854c56fa0361edbb202e7f87cb4d827fe49b0c72f1e50bc8c95
R
659
15
# "H:\mt_behavalluse\simpef.R" simpef <- function(model, int, s1, s2) { # e.g. s1=action, s2=valence flab = names(fixef(model)) cv = vector("numeric", length(fixef(model))) cv[flab == int] = 1 cv[flab == s1] = 1 p1 = doBy::esticon(model, cv) cat("simple ", s1, " effect for ", s2, " == 1: est = ", p1$Estima...
e7046014a92d4b3611a787a3db0d1f70027948d2c1b3b35412ee78f87b8de31e
R
671
26
library(MASS) PropCI <- function(x, n, conf = 0.95) { DF <- data.frame(y = x / n, weights = n) mod <- glm(y ~ 1, weights = weights, family = binomial(), data = DF) plogis(confint(mod, level = conf)) } PropCI(14, 35) ## had scope error prior to 7.2-31 ## single variable cases: n.tot <- c(60,17,8,2,187,85,...
bc02b795dedc54524f8c6ee7d23d309a8c75a8f0bedf4fc5e5bd971d4e334461
R
682
31
g<-read.csv('g.csv') s<-read.csv('s.csv') gn<-read.csv('gn.csv') sn<-read.csv('sn.csv') t.test(s$PAIN.6HRS..VAS.,g$PAIN.6.HRS..VAS.) t.test(s$PAIN.12.HRS..VAS.,g$PAIN.12.HRS..VAS.) t.test(s$ANALGESIC.REQ..FIRST.24.Hrs.,g$ANALGESIC.REQ..FIRST.24.Hrs.) t.test(s$Age,g$Age) t.test(s$DURATION,g$DURATION) jpeg(file="vas.jp...
4f8e7c97cd002c3c67e6e5adea0a08b8dcc6d14cad6dc57695a6f4da5a644d20
R
687
10
df <- readRDS("Extend Fig.11l.RDS") df$orig.ident <- ifelse(grepl("HET", df$orig.ident), "P14 ctrl", "P14 Bax cKO") df$supertype_name <- factor(df$supertype_name, levels = sort(unique(df$supertype_name))) ggplot(df, aes(x = supertype_name, y = percentage, fill = orig.ident)) + geom_bar(stat = "identity", position...
37eb7eff4d0636738f437248f318be3091d9945fb53b5bb2dd82ac2e4099210f
R
688
23
# # Data view : functions to visualize data transformation # #' Apply the data transformation function to a given region #' @export region.transform <- function(bw, chrom, start, end, strand, step = 50, bwmap = NULL) { # collect reads reads = step.bpQuery.bigWig(bw, chrom, start, end, step, abs.value = TRUE) ...
e277cda8d82eb2b7987f81f3a68b84157ebc36f5be62ccb18311e157bbbce329
R
700
22
#### -*- R -*- require(stats) Fr <- c(68,42,42,30, 37,52,24,43, 66,50,33,23, 47,55,23,47, 63,53,29,27, 57,49,19,29) Temp <- gl(2, 2, 24, labels = c("Low", "High")) Soft <- gl(3, 8, 24, labels = c("Hard","Medium","Soft")) M.user <- gl(2, 4, 24, labels = c("N", "Y")) Brand <- gl(2, 1, 24, labels = c("X", "M")) detg <...
6cbf55d413ab2c6b7d7ea94ed540602ece759e1a52c140ae4761a62af3d6905a
R
702
17
rm(list = ls()); gc() setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/Documents_2020.07.04_1/real_data/zeller/screen/') library(dplyr) out = matrix(NA, 100, 5) colnames(out) = c('d20', 'd30', 'd40', 'd50', 'd100') selected162 = read.csv(paste0('./v162/Zeller_raw_real_selected_v162.csv'), head = T)[,-1...
84dd55cd4f0df95f0dacab2e651a681e47a1f3a3e1d0732aa510495f1e5fed04
R
703
8
df <- read.csv("Extend Fig.2d.csv") ggplot(df, aes(x = "DS17", y = mean_anchors)) + stat_summary(geom = "boxplot", fun.data = function(x) { data.frame(ymin = min(x),lower = quantile(x, 0.25),middle = median(x),upper = quantile(x, 0.75),ymax = max(x))}, fill = ...
096ed2efb1450274c3a32f37732ab34c270b838b5d8a89e7dffc59485997ade3
R
706
24
#' @aliases shapviz-package "_PACKAGE" # Suppress R CMD check note #' @importFrom xgboost xgb.train globalVariables(c( "from", "i", "id", "label", "to", "x", "shap", "SHAP", "feature", "value", "color", "Var1", "Var2", "Var3", "S", "ind", "values" )) .onLoad <- function(libname, pkgname) { op <- options() op...
7b021e59c6990ea5c7f21f04611f5ec8491f9663cda759de5e5c86ba0b0ead20
R
712
20
jpeg("sol-read-map-asm.jpg"); t=read.table('sr2cs.pairdist.txt',sep='\t') summary(t) t=t$V7[t$V7<10000]; plot(density(abs(t)),col="red",xlab="Distance in bp",main="gsMapped unique solexa reads",ylab="Density of Pairs",xlim=c(0,500)) t=read.table('sr2ns.pairdist.txt',sep='\t') summary(t) t=t$V7[t$V7<10000]; lines(densit...
0ace294e2a0ebbcbfd000e2d8677a053255eab15ebc59843a40086b7afb03b49
R
729
44
--- #title: Distribution of Ions" output: html_document runtime: shiny --- ```{r data,echo=F} lPep=100 nPep=100000 nTot=lPep*nPep data<-runif(nTot) #hist(sample(data,100000,replace=T),breaks=nPep) sPep=rnorm(lPep) n=1 i=1 while(n<=lPep){ print(n) print(i) sPep[c(seq(n,n+i-1))]=sample(data,i,replace=T) n=n+i ...
39e13c02155cf8aa14ab8dfacff6a6014cc3ab8b403b7b681632b3f7764ffe6a
R
730
12
df <- read.csv("Fig.2j.csv") cell_colors <- c("LRP" = "#37C2D6", "MC" = "#4B2D83", "nMC" = "#E16037", "NA." = "#B4B4B4") df_long <- df %>% pivot_longer(cols = c(LRP, MC, nMC, NA.), names_to = "cell_type", values_to = "fraction") %>% mutate(cell_type = factor(cell_type, levels = c("NA.", "nMC", "MC", "LRP"))) g...
9028648f29831f3038e0b33ea6ba08a04d209bfc8974b40a51e0da50c1262975
R
730
19
jpeg("asmb-comp.jpg"); t=read.table('nre',sep='\t') plot(abs(t$V4),col="blue",type="l",xlab="Match #",main="ATACked assemblies",ylab="Cumulated length",xlim=range(0,10000)) summary(t) t=read.table('cre',sep='\t') summary(t) lines((abs(t$V4)),col="red") t=read.table('crn',sep='\t') lines((abs(t$V4)),col="orange") t=rea...
1cded46bf7d6832172e2cfe53382a3b8dda5c4b35300deb4f3a419c3ff629962
R
748
37
res1 <- read.table("WT347356.txt") resap <- read.table("ap.txt") resapt <- read.table("apt.txt") resdm <- read.table("dm.txt") resfl <- read.table("fl.txt") resm347 <- read.table("m347.txt") resm356 <- read.table("m356.txt") reswt <- read.table("wtt.txt") df$ytrans <- df$conc/df$vel resflc3 <- re...
54c9395ccc994cbf18778124b59f50af333b29887870de4234a57feabdede2f8
R
753
20
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/22' reference <- readRDS('../RCTD/data/Reference/DropVizHC/scRefSubsampled1000.RDS') nUMI <- reference@meta.data$nUMI names(nUMI) <- rownames(reference@meta.data) cell_type_names <- reference@meta.data...
822fd45b944a138d80ef899c0fdc618a7a36d4893c3bfbde106b17f4c8bca9e3
R
753
20
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/23' reference <- readRDS('../RCTD/data/Reference/DropVizHC/scRefSubsampled1000.RDS') nUMI <- reference@meta.data$nUMI names(nUMI) <- rownames(reference@meta.data) cell_type_names <- reference@meta.data...
a3427765d658eedd16ef445e09f17a700b24002be89fd4447e6c8c5e50b41a5a
R
753
20
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/21' reference <- readRDS('../RCTD/data/Reference/DropVizHC/scRefSubsampled1000.RDS') nUMI <- reference@meta.data$nUMI names(nUMI) <- rownames(reference@meta.data) cell_type_names <- reference@meta.data...
d768101e77b7c702653d6b4717ed426bb4022b34fcf2d0e6a828b71c2b538069
R
753
20
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) datadir <- '../RCTD/data/SpatialRNA/Puck_210605/24' reference <- readRDS('../RCTD/data/Reference/DropVizHC/scRefSubsampled1000.RDS') nUMI <- reference@meta.data$nUMI names(nUMI) <- rownames(reference@meta.data) cell_type_names <- reference@meta.data...
b0f802850decac099c088f6d2979dece3bbeb468e619016418809586d3dc09fd
R
755
22
pdf("solexa-map-plot.pdf"); t=read.table('sr2cspp',sep='\t') plot(density(t2$V7),col="blue",xlab="Distance in bp",main="Solexa read mapping",ylab="Density of Pairs") t2=read.table('sr2nspp',sep='\t') lines(density(t$V3),col="red") legend(x="topright", legend=c("Celera","Newbler"),text.col=c("blue","red")) dens=(density...
4887ddba9514f57ff12106895e35e1875597ff5c980173f188117e3a42d331e5
R
761
21
library(GEOquery) library(limma) # for collapseBy source("https://raw.githubusercontent.com/assaron/r-utils/master/R/exprs.R") gse14308 <- getGEO("GSE14308")[[1]] pData(gse14308)$condition <- sub("-.*$", "", gse14308$title) gse14308 <- gse14308[!rownames(gse14308) %in% c("NONE", "NA", "none", "NULL")] exprs(gse14308...
03a1b18a9d1e517995e9cc9cdea76128bd561686590a95c4af90f5076e4a7a33
R
763
28
pdf("align_result.pdf") fugu_align=read.table('fugu_align',header=T,sep='\t') summary(fugu_align) hist(fugu_align$AlignLength,breaks=100) plot(fugu_align$SubjAccno) medaka_align=read.table('medaka_align',header=T,sep='\t') summary(medaka_align) hist(medaka_align$AlignLength,breaks=100) plot(medaka_align$SubjAccno) s...
d41935d34085629004b661c890b88ad0e0ca6c06a4de5a7c8757b2ccb6b3f903
R
769
20
# Set environment language and working directory Sys.setenv(LANG = "en") setwd("D:/project/ndreamer_plot/") # Read the dataframe df <- read.csv("./AD_ADNC/down_significant_unparametric.csv", stringsAsFactors = FALSE) # Filter to the top 100 rows (assuming rows represent the rank of significance) df_top100 <- df[1:100...
90b975fcfa14dc8461db6bc5cd7fd8d84b8cd6e84f42f4be71fb4e24db36b75c
R
777
10
NEWBLER = read.table('NEWBLER10x') MIRA = read.table('MIRAAn') PHRAP = read.table('PHRAPAn') CAP3 = read.table('CAP3An') par(mfrow = c(2,2)) hist(PHRAP$V3, xlab = "Contig Length",ylab = "Number of Contig (s)", col="cyan", border="black", main = "PHRAP", breaks=10,xlim=c(0,5000), ylim=c(0,5000)) hist(CAP3$V3, xlab...
cbb364cc2b506d017b98883005038016e0f1bc988ea3d0b33a05076c74057fd7
R
783
23
l250=read.table('l250.txt') l250e=read.table('l250e.txt') l500=read.table('l500.txt') l500e=read.table('l500e.txt') t.test(l250$V2,l250$V3,paired=TRUE) t.test(l250$V4,l250$V5,paired=TRUE) t.test(l250$V6,l250$V7,paired=TRUE) t.test(l250$V8,l250$V9,paired=TRUE) t.test(l250e$V2,l250e$V3,paired=TRUE) t.test(l250e$V4,l250e$...
c12d28986f4078e63efd620c6390828c224840a5ed8e70bc6480c2f83158834a
R
806
9
df <- read.csv("Extend Fig.5d,e.csv", row.names = 1) df$dataset <- rownames(df) df$color <- ifelse(grepl("S_", df$dataset), "#38B34A", "#1A6333") base_dot <- function(x_var, x_lab) { ggplot(df, aes(x = .data[[x_var]], y = mean_anchors, shape = dataset)) + geom_point(size = 3, stroke = 1.5, color = df$color) + ...
5d4622917ad6c740f7007dbb36447e4a2e5c14d5ec1b3566ae7076ed92556508
R
810
25
#' Location Formatting Function #' #' This function converts the location information to an coding-tractable format #' #' @param location the location information of each micro-slot #' @return a new format that the codes are easy to deal with #' @export loc_convert <- function(location){ loc_vector <- base::unname(un...
1098055c096701d41b2ba7c558cd863b1a5d26922a7804c6006ee1594cf6d805
R
829
36
rm(list=ls()) library(tidyverse) b1 = read_csv("batch1_pro.csv") b2 = read_csv("batch2_pro.csv") words = read_tsv("all_stories.tok") b = bind_rows(b1, b2) offset = 230 d = b %>% filter(!(item == 3 & zone == offset + 1)) %>% mutate(zone=if_else(item == 3 & zone > offset, zone - 3, zone - 2)) %>% inner_jo...
751f31417d6d524311056c33bf3d32b6d1449db0fb3fda1ced77a6bb93d86580
R
834
25
pdf("solexa-read-plot.pdf"); t=read.table('sr2csp',sep='\t') plot(density(abs(t$V7)),col="blue",xlab="Distance in bp",main="Solexa read mapping",ylab="Density of Pairs",xlim=range(0,1000)) t2=read.table('sr2nsp',sep='\t') lines(density(abs(t2$V7)),col="red") legend(x="topright", legend=c("Celera","Newbler"),text.col=c(...
0e761beee2026a955e379b38bb79ddfdfca4cac8ce65d3feb9b25a06b41c733d
R
836
27
## tests of offsets, and prediction from them. data(anorexia, package = "MASS") ## via formula fit1 <- lm(Postwt ~ Prewt + Treat + offset(Prewt), data = anorexia) summary(fit1) pred <- fitted(fit1) stopifnot(all.equal(predict(fit1, anorexia), pred)) ## via argument fit2 <- lm(Postwt ~ Prewt + Treat, data = anorexia,...
520e41992f1e0c70ee5ff39b8d892eea7a44d01268f04781ab417972aedfb1ff
R
837
11
df <- read.csv("Fig.2h.csv") score_colors <- c("0" = "black", "1" = "#88191B", "2" = "#F79520", "3" = "#096B38") criteria_info <- data.frame(DS = c("DS6", "DS7.1", "DS7.2", "DS16", "DS12.1", "DS12.2", "DS25.2","DS18", "DS19", "DS20", "DS21", "DS22", "DS23", "DS24", "DS25.1", "DS26","DS17.1", "DS17.2", "DS17.3", "DS17...
eaa5a93d12b02f072007df60f96e5cd2800cad61e221c5dce4177351ce1a9a60
R
852
29
library(cluster) ### clusplot() & pam() RESULT checking ... ## plotting votes.diss(dissimilarity) in a bivariate plot and ## partitioning into 2 clusters data(votes.repub) votes.diss <- daisy(votes.repub) for(k in 2:4) { votes.clus <- pam(votes.diss, k, diss = TRUE)$clustering print(clusplot(votes.diss, votes...
17658259d2ac01e56f62e17d0f0eed663b628fa0705eb090c3167d6f79faf5e2
R
858
12
df <- read.csv("Extend Fig.13e.csv") df$Group <- recode(df$Group, "Dach1+" = "LRP2.1", "Dach1-" = "LRP1") df_summary <- df %>% group_by(Age, Group) %>% summarise(mean = mean(Proportion), se = sd(Proportion)/sqrt(dplyr::n()), .groups = "drop") ggplot(df_summary, aes(x = Age, y = mean, fill = Group)) + geom_b...
fbefcfedc5dab5ac5117210a708eee62084f59368148959cdece456a9432eb64
R
860
18
#https://stackoverflow.com/a/37487673 #data#### df<-read.table("proteinGroups.txt",header=T,sep="\t",row.names=NULL) #group#### library("dplyr") df$End<-as.Date(df$End,format="%m/%d/%Y") df$Start<-as.Date(df$Start,format="%m/%d/%Y") cumsum((df$Start)-lag((df$End), default=as.Date(1)) != 1) cumsum(as.numeric(df$Start)-l...
5c73376d231e7581a9c53cfcf4363fe262a49bb5aceb6fd76d6d895e2e96f8c4
R
872
28
options(na.action=na.exclude) # preserve missings options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type library(survival) # # Simple tests of concordance. These numbers were derived in multiple # codes. # aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...) tdata <- aml[aml$x...
e5e1f20bc8568207571cc0266d0e3a9d9b074d4ae828fb6b84f54f54ed50a6e6
R
884
39
library(data.table) library(mclust) methods <- c("scVI", "saturn", "scanorama", "bbknn", "saturn") output_dirs <- list( scVI = "PATH_TO_OUTPUT_DIR/all/", scANVI = "PATH_TO_OUTPUT_DIR/all/", saturn = "PATH_TO_OUTPUT_DIR/all/", scanorama = "PATH_TO_OUTPUT_DIR/all/", bbknn = "PATH_TO_OUTPUT_DIR/...
ea518a1ef63515ace5990dfede38ca431a1e95b81af1fbf93b2bb5deccab38a6
R
922
36
resdataap <- read.table("ap.txt") resdataapip <- read.table("apip.txt") resdatafl <- read.table("fl.txt") resdata <- read.table("data.txt") resconc <- read.table("concval.txt") t.test(resdataap$Ap,resdatafl$Fl) t.test(resdataapip$Ap_Ip,resdatafl$Fl) Welch Two Sample t-test data: resdataap$A...
ae7503c3dbd38de5a0fc3707c1323686744fd33efb56f4b6d94455acf3fb0379
R
951
25
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) library(devtools) library(mgcv) load_all() pwd = getwd() datadir <- paste0(pwd,'/data/tumor','/') resultsdir <- paste0(pwd,'/results/ResultsTumorNonparam','/') # Load RCTD which contains cropped puck, also load full puck myRCTD = readRDS(paste0(dat...
ff4a1feb8c1e8b586cd0e64db8b6b1811a2a7a96c70b741816872bd29b797275
R
958
19
library(DropSeq.util) refdir = "Data/Reference/DropVizCerAnnotated" dge.path <- file.path(refdir,"F_GRCm38.81.P60Cerebellum_ALT.raw.dge.txt.gz") class_path <- file.path(refdir,"F_GRCm38.81.P60Cerebellum_ALT.subcluster.assign.RDS") dge <- loadSparseDge(dge.path) cluster <- readRDS(class_path) common_barcodes = intersect...
416c101f72cc7ff7c60bd78b1eba3a019be9236a3f5d4108f02be43101b40c97
R
961
29
library(GEOquery) library(limma) library(org.Mm.eg.db) library(data.table) # for collapseBy source("https://raw.githubusercontent.com/assaron/r-utils/master/R/exprs.R") gse14308 <- getGEO("GSE14308")[[1]] pData(gse14308)$condition <- sub("-.*$", "", gse14308$title) es <- collapseBy(gse14308, fData(gse14308)$ENTREZ_G...
aa5e2ed8204cbf4d4b75823cb072f5ca5673d81e338bc97182844268b83d9746
R
966
30
repliterate <- function(init_mean, likelihood_fn, epsilon = 1e-8, MAX.ITER = 20) { mean_est_prev <- -100 posterior_mean <- init_mean for(i in 1:MAX.ITER) { ld <- likelihood_fn(posterior_mean) samp_dist <- likelihood_to_dist(posterior_mean, ld$d1, ld$d2) posterior_mean <- get_posterior_mean(samp_dist$m...
e546b6084e70d10ed6b7c78e04a323f0ab07076b442ced38e768df4905b39bcb
R
969
14
df <- read.csv("Extend Fig.3b.csv", row.names = 1) df$dataset <- rownames(df) score_colors <- c("0" = "black", "1" = "#88191B", "2" = "#F79520", "3" = "#096B38") criteria_map <- case_when(grepl("N1|N3", df$dataset) ~ "2", grepl("Af2", df$dataset) ~ "1", TRUE ~ "3") df$criteria_score <- criteria_map df_long <- df %...
80ffc1f505e3b94941283e8ac1a3f06937103fb32c3007150375d502319ca1a5
R
981
25
library(reactome.db) library(org.Mm.eg.db) library(data.table) mouse.universe <- keys(org.Mm.eg.db, "ENTREZID") # Selecting reactome gene sets pathways <- na.omit(select(reactome.db, keys=mouse.universe, c("PATHID"), keytype = 'ENTREZID')) pathways <- split(pathways$ENTREZID, pathways$PATHI...
ce8d1998af9c39d08d1e9d338453d038dcbc90fd64c7a685777b3385f8873367
R
993
30
#!/usr/bin/env Rscript rnk.file <- "./inst/extdata/naive.vs.th1.rnk" gmt.file <- "./inst/extdata/mouse.reactome.gmt" tag <- "naive_vs_th1" res.dir <- "./inst/broad_gsea" system.time( system2("java", c( "-cp", "~/Dropbox/gsea2-2.1.0.jar", "-Xmx512m", ...
4622c85baf73dc154f40c9c7f661f441ef2f9cf08887133e4e23ead69505a19a
R
995
31
#' Creates a piechart of number of isoforms needed to cross deltaPI threshold #' @description A quick way to summarize DIE for a single comparison #' @seealso \code{\link{DiffSplicingAnalysis}} #' @param compDir output directory containing DiffSplicingAnalysis for a #' specific comparison #' @return Directory labelled ...
b2b8e1cb29a960650607fd1eaf644b715edefc53f02b7e3df26f40abd163e152
R
1,002
39
library(naniar) library(ggplot2) data <- read.csv("Z:/Download/clinical_data-20260608T085237Z-3-001/clinical_data/heart_disease-switzerland.csv") View(data) data[data==-9] <- NA gg_miss_case(data) gg_miss_var(data) miss_var_summary(data) ggplot(data = data,aes(x = trestbps,y = num)) + geom_miss_point() miss_...
c7867bd165e25485b9b685ad672b78eb38da09a5507f692d5e0b5a4607537280
R
1,009
18
df <- read.csv("Extend Fig.4a,b.csv", row.names = 1) df$dataset <- rownames(df) df$dataset <- factor(df$dataset, levels = df$dataset) df$color <- ifelse(df$dataset == "DS25.3", "#00AEEF", "#5A5B5B") ggplot(df, aes(x = dataset, y = X.Cells, fill = color)) + geom_bar(stat = "identity") + geom_hline(yintercept = 10...
35c9cd42b8d67920c91db5badba835dd61198ffc87883b4525712cd4e646680c
R
1,026
13
df <- read.csv("Fig.2f,g.csv") score_colors <- c("0" = "black", "1" = "#88191B", "2" = "#F79520", "3" = "#096B38") plot_box <- function(data, y_var, y_label, y_lim) { ggplot(data, aes(x = criteria_group, y = .data[[y_var]])) + stat_summary(geom = "boxplot", fun.data = function(x) { ...