Getting started with webR for Tidy Tuesday
Load the data
WebR only has limited packages, so we’ll load the data directly. Click Run code
to load the data.
Take a look at the data here (e.g., head(surveys)
). Any commands you enter will be run when you click Run code
.
There is a species code "NA"
for Neotoma albigula. Try adding na.strings = ""
to read.csv()
for surveys
and species
to properly import it. You can change them right in the code block and click Run code
to rerun.
Install packages
To install packages in webr
use webr::install()
with a vector of packages you want to install.
The following packages are currently available in webr
:
[1] "Hmisc" "MASS" "Matrix" "R6" "RColorBrewer"
[6] "Rcpp" "askpass" "base64enc" "bit" "bit64"
[11] "bitops" "brio" "bslib" "cachem" "cellranger"
[16] "cli" "clipr" "colorspace" "commonmark" "cpp11"
[21] "crayon" "data.table" "decor" "desc" "diffobj"
[26] "digest" "dplyr" "ellipsis" "evaluate" "fansi"
[31] "farver" "fastmap" "fontawesome" "forcats" "fs"
[36] "generics" "ggplot2" "glue" "gtable" "hexbin"
[41] "hms" "htmltools" "htmlwidgets" "httpuv" "httr"
[46] "isoband" "jquerylib" "jsonlite" "labeling" "later"
[51] "lattice" "latticeExtra" "lifecycle" "magrittr" "memoise"
[56] "mgcv" "mime" "mockr" "munsell" "nlme"
[61] "openssl" "pillar" "pkgconfig" "pkgload" "praise"
[66] "prettyunits" "progress" "promises" "purrr" "rappdirs"
[71] "readr" "readxl" "rematch" "rematch2" "rlang"
[76] "rprojroot" "rstudioapi" "sass" "scales" "shiny"
[81] "survival" "sourcetools" "stringi" "stringr" "svglite"
[86] "sys" "testthat" "tibble" "tidyr" "tidyselect"
[91] "tinytest" "tzdb" "unitizer" "utf8" "vctrs"
[96] "viridisLite" "vroom" "waldo" "whoami" "withr"
[101] "writexl" "xtable" "yaml"
Install any packages you want here by changing package1
with the package name you want to install:
Big packages like ggplot2
can be a little slow to install and load in WebR
Tidy Tuesday away!
Anything you type in this block will run when you click Run code
. This cell also has access to objects created in other WebR cells on this page (like the data and packages installed above). Enjoy!