This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Table Cross-Referencing" | |
output: bookdown::html_document2 | |
--- | |
## Using figures | |
Refer to table \@ref(fig:mytbl-1) | |
```{r mytbl-1, fig.cap="This is my table"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install sf from source on CentOS/RHEL 7. Tested with sf 0.9-6 on R 3.6.3. | |
yum update -y | |
# Pre-reqs: gcc, gcc-c++, make | |
yum install -y gcc gcc-c++ make | |
# Install EPEL 7 | |
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a list of all CRAN packages with Bioc dependencies | |
cran_bioc_pkgs <- function(bioc_repo = "https://bioconductor.org/packages/3.8/bioc", recursive = TRUE) { | |
bioc_pkgs <- rownames(available.packages(repos = bioc_repo, filters = list())) | |
unique(unlist(tools::package_dependencies(bioc_pkgs, reverse = TRUE, recursive = recursive))) | |
} | |
# Set a CRAN repo if necessary | |
options(repos = "https://cloud.r-project.org") | |
pkgs <- sort(cran_bioc_pkgs()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Package | Downloads | SystemRequirements | |
---|---|---|---|
stringi | 484311 | ICU4C (>= 52, optional) | |
knitr | 458342 | Package vignettes based on R Markdown v2 or reStructuredText require Pandoc (http://pandoc.org). The function rst2pdf() require rst2pdf (https://github.com/rst2pdf/rst2pdf). | |
curl | 419127 | libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb). | |
rmarkdown | 395870 | pandoc (>= 1.12.3) - http://pandoc.org | |
openssl | 389541 | OpenSSL >= 1.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
printCallStack <- function(calls = sys.calls()) { | |
shiny::printStackTrace(structure(list(), stack.trace = calls)) | |
} | |
ui <- fluidPage( | |
textInput("txtA", "txtA"), | |
textInput("txtB", "txtB") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort selected rows in DT server-side | |
library(shiny) | |
library(DT) | |
ui <- fluidPage( | |
actionButton("sort", "Sort selected rows"), | |
DT::dataTableOutput("tbl") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sort selected rows in DT using a checkbox column | |
# Live DOM ordering in DataTables | |
# https://datatables.net/plug-ins/sorting/#Custom-data-source-sorting | |
# https://datatables.net/examples/plug-ins/dom_sort.html | |
# Select extension already supports sorting on selected rows | |
# https://datatables.net/extensions/select/ | |
# https://github.com/DataTables/Select/blob/24cc36565cca064118466bcffb9ce3037eaa9777/js/dataTables.select.js#L122-L132 |