diff --git a/docs/404.html b/docs/404.html index 7afac8d..3a466d4 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ metacal - 0.1.0.9011 + 0.2.0 @@ -97,6 +97,9 @@ Tutorial + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • Here I will use a pseudocount to make all the taxa abundances positive prior to calibration.

    -
    -ps.pseudo <- transform_sample_counts(ps, function(x) x + 1)
    +
    +ps.pseudo <- transform_sample_counts(ps, function(x) x + 1)
     ps.pseudo.cal <- calibrate(ps.pseudo, bias) %>% print
     #> phyloseq-class experiment-level object
     #> otu_table()   OTU Table:         [ 9 taxa and 567 samples ]
     #> sample_data() Sample Data:       [ 567 samples by 16 sample variables ]
     #> tax_table()   Taxonomy Table:    [ 9 taxa by 7 taxonomic ranks ]
    -#> refseq()      DNAStringSet:      [ 9 reference sequences ]
    -

    To verify calibration that worked as expected, let’s compare the observed, calibrated, and actual taxon proportions in the 10 control samples. Again, I’ll start by adding the calibrated proportions to the data frame with observed and actual proportions,

    -
    -ps.pseudo.cal.mock <- ps.pseudo.cal %>% 
    +#> refseq()      DNAStringSet:      [ 9 reference sequences ]
    +

    To verify that calibration worked as expected, let’s compare the observed, calibrated, and actual taxon proportions in the 10 control samples. Again, I’ll start by adding the calibrated proportions to the data frame with observed and actual proportions,

    +
    +ps.pseudo.cal.mock <- ps.pseudo.cal %>% 
       subset_samples(Samp_type == "Mock")
     props.cal <- bind_rows(
       props, 
       psmelt(ps.pseudo.cal.mock) %>% add_column(Type = "Calibrated")
     ) %>%
    -  select(Type, OTU, Sample, Abundance)
    + select(Type, OTU, Sample, Abundance)

    First, let’s look at bar plots comparing the observed, calibrated, and actual compositions,

    -
    -props.cal %>%
    +
    +props.cal %>%
       mutate(
         across(Type, fct_rev),
         across(Sample, factor, levels = sample_names(mock_actual)),
    @@ -420,11 +424,11 @@ 

    facet_wrap(~Sample, ncol = 5) + theme( axis.text.x = element_text(angle = 90, vjust = 0.5) - )

    + )

    We can see that the calibrated compositions are typically substantially closer to the actual proportions than the original observations. We can also plot the calibrated vs. actual (pseudo-log-transformed) proportions and compare to the earlier plot of observed vs. actual.

    -
    -props.cal %>%
    +
    +props.cal %>%
       pivot_wider(names_from = Type, values_from = Abundance) %>%
       pivot_longer(c(Observed, Calibrated), 
         names_to = "Type", values_to = "Proportion") %>%
    @@ -434,15 +438,15 @@ 

    geom_quasirandom() + facet_wrap(~Type) + axes + - scale_color_brewer(type = "qual", palette = 3)

    + scale_color_brewer(type = "qual", palette = 3)

    -

    This plot has essentially same information as the earlier plot examining the model fit, but seen from a slightly different angle. We can see that calibration in this dataset clearly reduces the relative error in proportions across the full range of tested true proportions, but leads to estimates that are systematically too low at low proportions by a small factor.

    +

    This plot has essentially same information as the earlier plot examining the model fit, but seen from a different angle. We can see that calibration in this dataset clearly reduces the relative error in proportions across the tested range of actual proportions, but leads to estimates that are systematically too low at low proportions.

    Session info

    -
    -sessioninfo::session_info()
    +
    +sessioninfo::session_info()
     #> ─ Session info ───────────────────────────────────────────────────────────────
     #>  setting  value                       
     #>  version  R version 4.0.3 (2020-10-10)
    @@ -453,119 +457,123 @@ 

    #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York -#> date 2020-10-21 +#> date 2020-12-20 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── -#> package * version date lib source -#> ade4 1.7-15 2020-02-13 [2] CRAN (R 4.0.0) -#> ape 5.4-1 2020-08-13 [2] CRAN (R 4.0.2) -#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0) -#> backports 1.1.10 2020-09-15 [2] CRAN (R 4.0.2) -#> beeswarm 0.2.3 2016-04-25 [2] CRAN (R 4.0.0) -#> Biobase 2.48.0 2020-04-27 [2] Bioconductor -#> BiocGenerics 0.34.0 2020-04-27 [2] Bioconductor -#> biomformat 1.16.0 2020-04-27 [2] Bioconductor -#> Biostrings 2.56.0 2020-04-27 [2] Bioconductor -#> blob 1.2.1 2020-01-20 [2] CRAN (R 4.0.0) -#> broom 0.7.1 2020-10-02 [2] CRAN (R 4.0.2) -#> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.0) -#> cli 2.0.2 2020-02-28 [2] CRAN (R 4.0.2) -#> cluster 2.1.0 2019-06-19 [3] CRAN (R 4.0.3) -#> codetools 0.2-16 2018-12-24 [3] CRAN (R 4.0.3) -#> colorspace 1.4-1 2019-03-18 [2] CRAN (R 4.0.0) -#> cowplot * 1.1.0 2020-09-08 [2] CRAN (R 4.0.2) -#> crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0) -#> data.table 1.13.0 2020-07-24 [2] CRAN (R 4.0.2) -#> DBI 1.1.0 2019-12-15 [2] CRAN (R 4.0.0) -#> dbplyr 1.4.4 2020-05-27 [2] CRAN (R 4.0.0) -#> desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0) -#> digest 0.6.25 2020-02-23 [2] CRAN (R 4.0.0) -#> dplyr * 1.0.2 2020-08-18 [2] CRAN (R 4.0.2) -#> ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0) -#> evaluate 0.14 2019-05-28 [2] CRAN (R 4.0.0) -#> fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0) -#> farver 2.0.3 2020-01-16 [2] CRAN (R 4.0.0) -#> forcats * 0.5.0 2020-03-01 [2] CRAN (R 4.0.0) -#> foreach 1.5.0 2020-03-30 [2] CRAN (R 4.0.2) -#> fs 1.5.0 2020-07-31 [2] CRAN (R 4.0.2) -#> generics 0.0.2 2018-11-29 [2] CRAN (R 4.0.0) -#> ggbeeswarm * 0.6.0 2017-08-07 [2] CRAN (R 4.0.0) -#> ggplot2 * 3.3.2 2020-06-19 [2] CRAN (R 4.0.1) -#> glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.2) -#> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.0) -#> haven 2.3.1 2020-06-01 [2] CRAN (R 4.0.1) -#> here 0.1 2017-05-28 [2] CRAN (R 4.0.0) -#> hms 0.5.3 2020-01-08 [2] CRAN (R 4.0.0) -#> htmltools 0.5.0 2020-06-16 [2] CRAN (R 4.0.1) -#> httr 1.4.2 2020-07-20 [2] CRAN (R 4.0.2) -#> igraph 1.2.5 2020-03-19 [2] CRAN (R 4.0.0) -#> IRanges 2.22.2 2020-05-21 [2] Bioconductor -#> iterators 1.0.12 2019-07-26 [2] CRAN (R 4.0.0) -#> jsonlite 1.7.1 2020-09-07 [2] CRAN (R 4.0.2) -#> knitr 1.30 2020-09-22 [2] CRAN (R 4.0.2) -#> labeling 0.3 2014-08-23 [2] CRAN (R 4.0.0) -#> lattice 0.20-41 2020-04-02 [3] CRAN (R 4.0.3) -#> lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.0) -#> lubridate 1.7.9 2020-06-08 [2] CRAN (R 4.0.1) -#> magrittr 1.5 2014-11-22 [2] CRAN (R 4.0.0) -#> MASS 7.3-53 2020-09-09 [3] CRAN (R 4.0.3) -#> Matrix 1.2-18 2019-11-27 [3] CRAN (R 4.0.3) -#> memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.0) -#> metacal * 0.1.0.9011 2020-10-21 [1] local -#> mgcv 1.8-33 2020-08-27 [3] CRAN (R 4.0.3) -#> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.0) -#> multtest 2.44.0 2020-04-27 [2] Bioconductor -#> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.0) -#> nlme 3.1-149 2020-08-23 [3] CRAN (R 4.0.3) -#> permute 0.9-5 2019-03-12 [2] CRAN (R 4.0.0) -#> phyloseq * 1.32.0 2020-04-27 [2] Bioconductor -#> pillar 1.4.6 2020-07-10 [2] CRAN (R 4.0.2) -#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0) -#> pkgdown 1.6.1 2020-09-12 [2] CRAN (R 4.0.2) -#> plyr 1.8.6 2020-03-03 [2] CRAN (R 4.0.0) -#> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.0) -#> R6 2.4.1 2019-11-12 [2] CRAN (R 4.0.0) -#> ragg 0.3.1 2020-07-03 [2] CRAN (R 4.0.2) -#> RColorBrewer 1.1-2 2014-12-07 [2] CRAN (R 4.0.0) -#> Rcpp 1.0.5 2020-07-06 [2] CRAN (R 4.0.2) -#> readr * 1.3.1 2018-12-21 [2] CRAN (R 4.0.0) -#> readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.0) -#> reprex 0.3.0 2019-05-16 [2] CRAN (R 4.0.1) -#> reshape2 1.4.4 2020-04-09 [2] CRAN (R 4.0.0) -#> rhdf5 2.32.2 2020-07-03 [2] Bioconductor -#> Rhdf5lib 1.10.1 2020-07-09 [2] Bioconductor -#> rlang 0.4.7 2020-07-09 [2] CRAN (R 4.0.2) -#> rmarkdown 2.4 2020-09-30 [2] CRAN (R 4.0.2) -#> rprojroot 1.3-2 2018-01-03 [2] CRAN (R 4.0.0) -#> rstudioapi 0.11 2020-02-07 [2] CRAN (R 4.0.0) -#> rvest 0.3.6 2020-07-25 [2] CRAN (R 4.0.2) -#> S4Vectors 0.26.1 2020-05-16 [2] Bioconductor -#> scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.0) -#> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.0) -#> stringi 1.5.3 2020-09-09 [2] CRAN (R 4.0.2) -#> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.0) -#> survival 3.2-7 2020-09-28 [3] CRAN (R 4.0.3) -#> systemfonts 0.3.2 2020-09-29 [2] CRAN (R 4.0.2) -#> tibble * 3.0.3 2020-07-10 [2] CRAN (R 4.0.2) -#> tidyr * 1.1.2 2020-08-27 [2] CRAN (R 4.0.2) -#> tidyselect 1.1.0 2020-05-11 [2] CRAN (R 4.0.0) -#> tidyverse * 1.3.0 2019-11-21 [2] CRAN (R 4.0.0) -#> useful 1.2.6 2018-10-08 [2] CRAN (R 4.0.0) -#> utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.0) -#> vctrs 0.3.4 2020-08-29 [2] CRAN (R 4.0.2) -#> vegan 2.5-6 2019-09-01 [2] CRAN (R 4.0.0) -#> vipor 0.4.5 2017-03-22 [2] CRAN (R 4.0.0) -#> viridisLite 0.3.0 2018-02-01 [2] CRAN (R 4.0.0) -#> withr 2.3.0 2020-09-22 [2] CRAN (R 4.0.2) -#> xfun 0.18 2020-09-29 [2] CRAN (R 4.0.2) -#> xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.0) -#> XVector 0.28.0 2020-04-27 [2] Bioconductor -#> yaml 2.2.1 2020-02-01 [2] CRAN (R 4.0.0) -#> zlibbioc 1.34.0 2020-04-27 [2] Bioconductor +#> package * version date lib source +#> ade4 1.7-16 2020-10-28 [2] CRAN (R 4.0.3) +#> ape 5.4-1 2020-08-13 [2] CRAN (R 4.0.2) +#> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0) +#> backports 1.2.0 2020-11-02 [2] CRAN (R 4.0.3) +#> beeswarm 0.2.3 2016-04-25 [2] CRAN (R 4.0.0) +#> Biobase 2.50.0 2020-10-27 [2] Bioconductor +#> BiocGenerics 0.36.0 2020-10-27 [2] Bioconductor +#> biomformat 1.18.0 2020-10-27 [2] Bioconductor +#> Biostrings 2.58.0 2020-10-27 [2] Bioconductor +#> broom 0.7.2 2020-10-20 [2] CRAN (R 4.0.3) +#> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.0) +#> cli 2.2.0 2020-11-20 [2] CRAN (R 4.0.3) +#> cluster 2.1.0 2019-06-19 [3] CRAN (R 4.0.3) +#> codetools 0.2-16 2018-12-24 [3] CRAN (R 4.0.3) +#> colorspace 2.0-0 2020-11-11 [2] CRAN (R 4.0.3) +#> cowplot * 1.1.0 2020-09-08 [2] CRAN (R 4.0.2) +#> crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0) +#> data.table 1.13.2 2020-10-19 [2] CRAN (R 4.0.3) +#> DBI 1.1.0 2019-12-15 [2] CRAN (R 4.0.0) +#> dbplyr 2.0.0 2020-11-03 [2] CRAN (R 4.0.3) +#> desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0) +#> digest 0.6.27 2020-10-24 [2] CRAN (R 4.0.3) +#> dplyr * 1.0.2 2020-08-18 [2] CRAN (R 4.0.2) +#> ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0) +#> evaluate 0.14 2019-05-28 [2] CRAN (R 4.0.0) +#> fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0) +#> farver 2.0.3 2020-01-16 [2] CRAN (R 4.0.0) +#> forcats * 0.5.0 2020-03-01 [2] CRAN (R 4.0.0) +#> foreach 1.5.1 2020-10-15 [2] CRAN (R 4.0.3) +#> fs 1.5.0 2020-07-31 [2] CRAN (R 4.0.2) +#> generics 0.1.0 2020-10-31 [2] CRAN (R 4.0.3) +#> ggbeeswarm * 0.6.0 2017-08-07 [2] CRAN (R 4.0.0) +#> ggplot2 * 3.3.2 2020-06-19 [2] CRAN (R 4.0.1) +#> glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.2) +#> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.0) +#> haven 2.3.1 2020-06-01 [2] CRAN (R 4.0.1) +#> here 1.0.0 2020-11-15 [2] CRAN (R 4.0.3) +#> hms 0.5.3 2020-01-08 [2] CRAN (R 4.0.0) +#> htmltools 0.5.0 2020-06-16 [2] CRAN (R 4.0.1) +#> httr 1.4.2 2020-07-20 [2] CRAN (R 4.0.2) +#> igraph 1.2.6 2020-10-06 [2] CRAN (R 4.0.3) +#> IRanges 2.24.0 2020-10-27 [2] Bioconductor +#> iterators 1.0.13 2020-10-15 [2] CRAN (R 4.0.3) +#> jsonlite 1.7.1 2020-09-07 [2] CRAN (R 4.0.2) +#> knitr 1.30 2020-09-22 [2] CRAN (R 4.0.2) +#> labeling 0.4.2 2020-10-20 [2] CRAN (R 4.0.3) +#> lattice 0.20-41 2020-04-02 [3] CRAN (R 4.0.3) +#> lifecycle 0.2.0 2020-03-06 [2] CRAN (R 4.0.0) +#> lubridate 1.7.9.2 2020-11-13 [2] CRAN (R 4.0.3) +#> magrittr 2.0.1 2020-11-17 [2] CRAN (R 4.0.3) +#> MASS 7.3-53 2020-09-09 [3] CRAN (R 4.0.3) +#> Matrix 1.2-18 2019-11-27 [3] CRAN (R 4.0.3) +#> memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.0) +#> metacal * 0.2.0 2020-12-20 [1] local +#> mgcv 1.8-33 2020-08-27 [3] CRAN (R 4.0.3) +#> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.0) +#> multtest 2.46.0 2020-10-27 [2] Bioconductor +#> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.0) +#> nlme 3.1-149 2020-08-23 [3] CRAN (R 4.0.3) +#> permute 0.9-5 2019-03-12 [2] CRAN (R 4.0.0) +#> phyloseq * 1.34.0 2020-10-27 [2] Bioconductor +#> pillar 1.4.7 2020-11-20 [2] CRAN (R 4.0.3) +#> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0) +#> pkgdown 1.6.1 2020-09-12 [2] CRAN (R 4.0.2) +#> plyr 1.8.6 2020-03-03 [2] CRAN (R 4.0.0) +#> prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.0) +#> progress 1.2.2 2019-05-16 [2] CRAN (R 4.0.2) +#> ps 1.4.0 2020-10-07 [2] CRAN (R 4.0.3) +#> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.0) +#> R6 2.5.0 2020-10-28 [2] CRAN (R 4.0.3) +#> ragg 0.4.0 2020-10-05 [2] CRAN (R 4.0.3) +#> RColorBrewer 1.1-2 2014-12-07 [2] CRAN (R 4.0.0) +#> Rcpp 1.0.5 2020-07-06 [2] CRAN (R 4.0.2) +#> readr * 1.4.0 2020-10-05 [2] CRAN (R 4.0.3) +#> readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.0) +#> reprex 0.3.0 2019-05-16 [2] CRAN (R 4.0.1) +#> reshape2 1.4.4 2020-04-09 [2] CRAN (R 4.0.0) +#> rhdf5 2.34.0 2020-10-27 [2] Bioconductor +#> rhdf5filters 1.2.0 2020-10-27 [2] Bioconductor +#> Rhdf5lib 1.12.0 2020-10-27 [2] Bioconductor +#> rlang 0.4.8 2020-10-08 [2] CRAN (R 4.0.3) +#> rmarkdown 2.5 2020-10-21 [2] CRAN (R 4.0.3) +#> rprojroot 2.0.2 2020-11-15 [2] CRAN (R 4.0.3) +#> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.0.3) +#> rvest 0.3.6 2020-07-25 [2] CRAN (R 4.0.2) +#> S4Vectors 0.28.0 2020-10-27 [2] Bioconductor +#> scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.0) +#> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.0) +#> stringi 1.5.3 2020-09-09 [2] CRAN (R 4.0.2) +#> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.0) +#> survival 3.2-7 2020-09-28 [3] CRAN (R 4.0.3) +#> systemfonts 0.3.2 2020-09-29 [2] CRAN (R 4.0.2) +#> textshaping 0.2.1 2020-11-13 [2] CRAN (R 4.0.3) +#> tibble * 3.0.4 2020-10-12 [2] CRAN (R 4.0.3) +#> tidyr * 1.1.2 2020-08-27 [2] CRAN (R 4.0.2) +#> tidyselect 1.1.0 2020-05-11 [2] CRAN (R 4.0.0) +#> tidyverse * 1.3.0 2019-11-21 [2] CRAN (R 4.0.0) +#> useful 1.2.6 2018-10-08 [2] CRAN (R 4.0.0) +#> utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.0) +#> vctrs 0.3.5 2020-11-17 [2] CRAN (R 4.0.3) +#> vegan 2.5-6 2019-09-01 [2] CRAN (R 4.0.0) +#> vipor 0.4.5 2017-03-22 [2] CRAN (R 4.0.0) +#> viridisLite 0.3.0 2018-02-01 [2] CRAN (R 4.0.0) +#> withr 2.3.0 2020-09-22 [2] CRAN (R 4.0.2) +#> xfun 0.19 2020-10-30 [2] CRAN (R 4.0.3) +#> xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.0) +#> XVector 0.30.0 2020-10-27 [2] Bioconductor +#> yaml 2.2.1 2020-02-01 [2] CRAN (R 4.0.0) +#> zlibbioc 1.36.0 2020-10-27 [2] Bioconductor #> -#> [1] /tmp/RtmppncHeN/temp_libpath18eca245f54b6 +#> [1] /tmp/Rtmp4AlMtO/temp_libpathfe674631225b #> [2] /home/michael/R/x86_64-pc-linux-gnu-library/4.0 -#> [3] /usr/lib/R/library

    +#> [3] /usr/lib/R/library
    diff --git a/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.css b/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.css new file mode 100644 index 0000000..07aee5f --- /dev/null +++ b/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.css @@ -0,0 +1,4 @@ +/* Styles for section anchors */ +a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} +a.anchor-section::before {content: '#';} +.hasAnchor:hover a.anchor-section {visibility: visible;} diff --git a/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.js b/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.js new file mode 100644 index 0000000..570f99a --- /dev/null +++ b/docs/articles/tutorial_files/anchor-sections-1.0/anchor-sections.js @@ -0,0 +1,33 @@ +// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. +document.addEventListener('DOMContentLoaded', function() { + // Do nothing if AnchorJS is used + if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { + return; + } + + const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + // Do nothing if sections are already anchored + if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { + return null; + } + + // Use section id when pandoc runs with --section-divs + const section_id = function(x) { + return ((x.classList.contains('section') || (x.tagName === 'SECTION')) + ? x.id : ''); + }; + + // Add anchors + h.forEach(function(x) { + const id = x.id || section_id(x.parentElement); + if (id === '') { + return null; + } + let anchor = document.createElement('a'); + anchor.href = '#' + id; + anchor.classList = ['anchor-section']; + x.classList.add('hasAnchor'); + x.appendChild(anchor); + }); +}); diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-11-1.png index 2fd0121..e9f108b 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-17-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-17-1.png index 413c7db..49f924c 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-17-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-20-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-20-1.png index 97027c5..d235491 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-20-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-23-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-23-1.png index 02d111d..9985d46 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-23-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-23-1.png differ diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-24-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-24-1.png index 73186c9..0c5d8f5 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-24-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-24-1.png differ diff --git a/docs/articles/tutorial_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/tutorial_files/figure-html/unnamed-chunk-8-1.png index 07239a9..d2438ed 100644 Binary files a/docs/articles/tutorial_files/figure-html/unnamed-chunk-8-1.png and b/docs/articles/tutorial_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/docs/articles/tutorial_files/header-attrs-2.5/header-attrs.js b/docs/articles/tutorial_files/header-attrs-2.5/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/docs/articles/tutorial_files/header-attrs-2.5/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/docs/authors.html b/docs/authors.html index ded5f45..56a8f6c 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ metacal - 0.1.0.9011 + 0.2.0 @@ -97,6 +97,9 @@ Tutorial + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog
  • + +
  • + Changelog