# #设置,包括= FALSE ----------------------------------------------------- knitr: opts_chunk美元集(呼应= TRUE,缓存= TRUE, autodep = TRUE) set.seed (0 xdada) # #——exampledata消息= FALSE,警告= FALSE -------------------------------- 数据(“featuresPerWell”,包=“HD2013SGI”)str (featuresPerWell [[1]]) str (featuresPerWell [[2]]) stopifnot (nrow (featuresPerWell [[1]]) = = nrow (featuresPerWell [[2 ]])) ## ---- xl,结果=“隐藏 "----------------------------------------------------- np = 40 nx = 24纽约= 16 plateNames =独特(featuresPerWell[[1]]美元板)为了::assert_that(长度(plateNames) > = np) plateNames = plateNames [seq_len (np)] xl = lapp (plateNames、功能(pl){选取= (featuresPerWell[[1]],板= = pl &字段= =“1”)房车=代表(NA_real_, nx * ny) r =匹配(featuresPerWell[[1]]美元行(选取),字母)c =匹配(featuresPerWell[[1]]美元坳(选取),paste(seq_len(nx))) i = (r-1) * nx + c assertthat::assert_that(!any(is.na(r)), !any(is.na(c)), !any(复制(i)), all(r>=1), all(r<=ny), all(c>=1), all(c>=1) rv[i] = featuresPerWell[[2]][sel, "count"] rv}) names(xl) = plateNames ## ----fig1,图宽= TRUE,图cap = "Output of ' splots::plotScreen ' .",,图暗=c(10,20)---- class(xl) length(xl) names(xl)[1:4] unique(vapply(xl, function(x) paste(class(x), length(x)), character(1))) xl[[1]][1:30] splot::plotScreen(xl, nx =nx, ny =ny,ncol = 4, fill = c("white", "darkgoldenrod4"), main = "HD2013SGI",图例。Label = "cell count", zrange = c(0, max(unlist(xl), na。rm = TRUE ))) ## ---- sessionInfo -------------------------------------------------------------- sessionInfo ()