Portal Project Tidy Tuesday - Tidyverse

There are three tables in this dataset.

surveys, which has one row for each individual animal caught:

head(surveys, n = 3)
  censusdate month day year treatment plot stake species  sex reprod  age
1 1978-01-08     1   8 1978 exclosure    3    11      OL <NA>   <NA> <NA>
2 1978-01-08     1   8 1978 exclosure    3    22      NA <NA>   <NA> <NA>
3 1978-01-08     1   8 1978 exclosure    3    54      PF    M   <NA> <NA>
  testes vagina pregnant nipples lactation hfl wgt tag note2 ltag note3
1   <NA>   <NA>     <NA>    <NA>      <NA>  NA  NA   0  <NA>    0  <NA>
2   <NA>   <NA>     <NA>    <NA>      <NA>  NA  NA   0  <NA>    0  <NA>
3      S   <NA>     <NA>    <NA>      <NA>  15   7   0  <NA>    0  <NA>

species, which has one row for each species in the dataset:

head(species, n = 3)
  species       scientificname   taxa            commonname censustarget
1      BA      Baiomys taylori Rodent  Northern pygmy mouse            1
2      PB  Chaetodipus baileyi Rodent Bailey's pocket mouse            1
3      PH Chaetodipus hispidus Rodent   Hispid pocket mouse            1
  unidentified rodent granivore minhfl  meanhfl maxhfl minwgt   meanwgt maxwgt
1            0      1         1      6 13.25065     15      6  9.449086     18
2            0      1         1     16 26.03125     47     10 31.873515     79
3            0      1         1     21 25.12821     28     18 30.717949     48
    juvwgt
1       NA
2 18.99505
3 24.00000

plots, which has one row per plot that tells you if the plot is a control plot or an exclosure plot where the dominant kangaroo rat species have been excluded.

head(plots, n = 3)
  plot treatment
1    3 exclosure
2    4   control
3   11   control
Install packages

You can install packages that are available for webr using webr::install() with a vector of packages you want to install. dplyr and ggplot2 are already installed. Install any additional packages you want here:


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"