library(magrittr)
Page Not Found
-The page you requested cannot be found (perhaps it was moved or renamed).
-Try going back to the previous page or leave a GitHub issue for more information.
- - - -diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index e350050..0000000 --- a/docs/404.html +++ /dev/null @@ -1,558 +0,0 @@ - -
- - - - - - - -The page you requested cannot be found (perhaps it was moved or renamed).
-Try going back to the previous page or leave a GitHub issue for more information.
- - - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Cras pulvinar mattis nunc sed blandit. Egestas integer eget aliquet nibh praesent tristique. Phasellus faucibus scelerisque eleifend donec pretium. Consequat ac felis donec et odio pellentesque diam volutpat. Maecenas volutpat blandit aliquam etiam erat. Aenean et tortor at risus viverra adipiscing at in. Integer quis auctor elit sed. Rhoncus dolor purus non enim praesent elementum facilisis leo vel. Amet tellus cras adipiscing enim eu turpis egestas. Fermentum iaculis eu non diam phasellus. Et netus et malesuada fames ac. Mauris a diam maecenas sed enim ut sem. Dignissim cras tincidunt lobortis feugiat vivamus at augue eget arcu. Amet est placerat in egestas erat imperdiet sed euismod. Volutpat commodo sed egestas egestas fringilla phasellus faucibus.
-Nullam vehicula ipsum a arcu cursus vitae congue. Scelerisque varius morbi enim nunc. Eleifend mi in nulla posuere sollicitudin aliquam ultrices. Nunc sed blandit libero volutpat sed. Sit amet porttitor eget dolor morbi non. Pellentesque habitant morbi tristique senectus et netus. Scelerisque eleifend donec pretium vulputate sapien nec sagittis aliquam. Tortor posuere ac ut consequat semper viverra nam libero justo. Bibendum ut tristique et egestas quis ipsum suspendisse ultrices gravida. Convallis aenean et tortor at. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Hendrerit gravida rutrum quisque non tellus orci ac auctor augue. Nibh mauris cursus mattis molestie. Eu non diam phasellus vestibulum lorem sed risus ultricies tristique.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Cras pulvinar mattis nunc sed blandit. Egestas integer eget aliquet nibh praesent tristique. Phasellus faucibus scelerisque eleifend donec pretium. Consequat ac felis donec et odio pellentesque diam volutpat. Maecenas volutpat blandit aliquam etiam erat. Aenean et tortor at risus viverra adipiscing at in. Integer quis auctor elit sed. Rhoncus dolor purus non enim praesent elementum facilisis leo vel. Amet tellus cras adipiscing enim eu turpis egestas. Fermentum iaculis eu non diam phasellus. Et netus et malesuada fames ac. Mauris a diam maecenas sed enim ut sem. Dignissim cras tincidunt lobortis feugiat vivamus at augue eget arcu. Amet est placerat in egestas erat imperdiet sed euismod. Volutpat commodo sed egestas egestas fringilla phasellus faucibus.
-Nullam vehicula ipsum a arcu cursus vitae congue. Scelerisque varius morbi enim nunc. Eleifend mi in nulla posuere sollicitudin aliquam ultrices. Nunc sed blandit libero volutpat sed. Sit amet porttitor eget dolor morbi non. Pellentesque habitant morbi tristique senectus et netus. Scelerisque eleifend donec pretium vulputate sapien nec sagittis aliquam. Tortor posuere ac ut consequat semper viverra nam libero justo. Bibendum ut tristique et egestas quis ipsum suspendisse ultrices gravida. Convallis aenean et tortor at. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Hendrerit gravida rutrum quisque non tellus orci ac auctor augue. Nibh mauris cursus mattis molestie. Eu non diam phasellus vestibulum lorem sed risus ultricies tristique.
- - - -Every chapter also needs Learning objectives.
-For this chapter, we’ll need the following packages attached:
-*Remember to add any additional packages you need to your course’s own docker image.
-library(magrittr)
You can write all your text in sections like this, using ##
to indicate a new header. you can use additional pound symbols to create lower levels of headers.
See here for additional general information about how you can format text within R Markdown files. In addition, see here for more in depth and advanced options.
-Here’s a subheading (using three pound symbols) and some text in this subsection!
-You can demonstrate code like this:
-<- file.path("resources", "code_output")
- output_dir if (!dir.exists(output_dir)) {
-dir.create(output_dir)
- }
And make plots too:
-<- hist(iris$Sepal.Length) hist_plot
You can also save these plots to file:
-png(file.path(output_dir, "test_plot.png"))
- hist_plot
$breaks
-[1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0
-
-$counts
-[1] 5 27 27 30 31 18 6 6
-
-$density
-[1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000
-[8] 0.08000000
-
-$mids
-[1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75
-
-$xname
-[1] "iris$Sepal.Length"
-
-$equidist
-[1] TRUE
-
-attr(,"class")
-[1] "histogram"
-dev.off()
png
- 2
-How to include a Google slide. It’s simplest to use the ottrpal
package:
But if you have the slide or some other image locally downloaded you can also use HTML like this:
-You may also want to embed videos in your course. If alternatively, you just want to include a link you can do so like this:
-Check out this link to a video using markdown syntax.
-knitr
To embed videos in your course, you can use knitr::include_url()
like this: Note that you should use echo=FALSE
in the code chunk because we don’t want the code part of this to show up. If you are unfamiliar with how R Markdown code chunks work, read this.
https://www.youtube.com/embed/VOCYL-FNbr0400pxhttps://www.youtube.com/embed/VOCYL-FNbr0
-knitr
https://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview400pxhttps://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview
-Yet again you can use a link to a website like so:
- -You might want to have users open a website in a new tab by default, especially if they need to reference both the course and a resource at once.
- -Or, you can embed some websites.
-knitr
This works:
-https://yihui.org400pxhttps://yihui.org
-Occasionally, you might find it useful to emphasize a particular piece of information. To help you do so, we have provided css code and images (no need for you to worry about that!) to create the following stylized boxes.
-You can use these boxes in your course with either of two options: using HTML code or Pandoc syntax.
-rmarkdown
container syntaxThe rmarkdown
package allows for a different syntax to be converted to the HTML that you just saw and also allows for conversion to LaTeX. See the Bookdown documentation for more information. Note that Bookdown uses Pandoc.
::: {.notice}
-Note using rmarkdown syntax.
-
-:::
-Note using rmarkdown syntax.
-As an example you might do something like this:
-Please click on the subsection headers in the left hand navigation bar (e.g., 2.1, 4.3) a second time to expand the table of contents and enable the scroll_highlight
feature (see more)
To add a warning box like the following use:
-Followed by the text you want inside
-This will create the following:
-Followed by the text you want inside
-Here is a <div class = "warning">
box:
Note text
-Here is a <div class = "github">
box:
GitHub text
-Here is a <div class = "dictionary">
box:
dictionary text
-Here is a <div class = "reflection">
box:
reflection text
-Here is a <div class = "wip">
box:
Work in Progress text
-This course is part of a series of courses for the Informatics Technology for Cancer Research (ITCR) called the Informatics Technology for Cancer Research Education Resource. This material was created by the ITCR Training Network (ITN) which is a collaborative effort of researchers around the United States to support cancer informatics and data science training through resources, technology, and events. This initiative is funded by the following grant: National Cancer Institute (NCI) UE5 CA254170. Our courses feature tools developed by ITCR Investigators and make it easier for principal investigators, scientists, and analysts to integrate cancer informatics into their workflows. Please see our website at www.itcrtraining.org for more information.
-This course is available in multiple formats which allows you to take it in the way that best suites your needs. You can take it for certificate which can be for free or fee.
-Testing testing
-We think understanding AI is essential for executives. It helps today’s leaders make strategic decisions, drive innovation, enhance efficiency, and foster a culture that embraces the transformative power of these technologies. Specifically, AI proficiency can help leaders in the following ways.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Eu sem integer vitae justo eget magna. Viverra nibh cras pulvinar mattis. Est placerat in egestas erat imperdiet sed euismod. Diam quam nulla porttitor massa id neque. Fringilla urna porttitor rhoncus dolor purus non enim. Quis commodo odio aenean sed ad.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Eu sem integer vitae justo eget magna. Viverra nibh cras pulvinar mattis. Est placerat in egestas erat imperdiet sed euismod. Diam quam nulla porttitor massa id neque. Fringilla urna porttitor rhoncus dolor purus non enim. Quis commodo odio aenean sed adipiscing diam donec. Facilisi morbi tempus iaculis urna id volutpat. Natoque penatibus et magnis dis parturient montes. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus. Lectus magna fringilla urna porttitor rhoncus dolor purus non enim. Pellentesque pulvinar pellentesque habitant morbi tristique senectus et. Lacus suspendisse faucibus interdum posuere lorem ipsum dolor sit. Egestas sed tempus urna et. Tincidunt eget nullam non nisi est sit amet. Erat imperdiet sed euismod nisi porta lorem mollis. Sit amet mauris commodo quis. Massa massa ultricies mi quis hendrerit dolor magna eget.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Massa massa ultricies mi quis hendrerit dolor magna. Lobortis scelerisque fermentum dui faucibus. Vulputate odio ut enim blandit volutpat maecenas volutpat blandit. Molestie a iaculis at erat pellentesque adipiscing commodo elit.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Massa massa ultricies mi quis hendrerit dolor magna. Lobortis scelerisque fermentum dui faucibus. Vulputate odio ut enim blandit volutpat maecenas volutpat blandit. Molestie a iaculis at erat pellentesque adipiscing commodo elit.
- - -Shannon, C. E. (1948). A Mathematical Theory of Communication. Bell System Technical Journal, 27(3), 379–423. https://ieeexplore.ieee.org/document/6773024
-Turing, A. M. (1950). Computing Machinery and Intelligence. Mind, 59(236), 433–460. https://mind.oxfordjournals.org/content/LIX/236/433
-Turing, A. M. (1936). On Computable Numbers, with an Application to the Entscheidungsproblem. Proceedings of the London Mathematical Society, s2-42(1), 230–265. https://www.cs.virginia.edu/~robins/Turing_Paper_1936.pdf
-Thompson, K. (1984). Reflections on Trusting Trust. Communications of the ACM, 27(8), 761–763. https://dl.acm.org/doi/10.1145/358198.358210
-Ghemawat, S., Gobioff, H., & Leung, S.-T. (2003). The Google File System. In Proceedings of the Nineteenth ACM Symposium on Operating Systems Principles (pp. 29–43). https://research.google.com/archive/gfs-sosp2003.pdf
- - - -Every chapter also needs Learning objectives.
-For this chapter, we’ll need the following packages attached:
-*Remember to add any additional packages you need to your course’s own docker image.
-library(magrittr)
You can write all your text in sections like this, using ##
to indicate a new header. you can use additional pound symbols to create lower levels of headers.
See here for additional general information about how you can format text within R Markdown files. In addition, see here for more in depth and advanced options.
-Here’s a subheading (using three pound symbols) and some text in this subsection!
-You can demonstrate code like this:
-<- file.path("resources", "code_output")
- output_dir if (!dir.exists(output_dir)) {
-dir.create(output_dir)
- }
And make plots too:
-<- hist(iris$Sepal.Length) hist_plot
You can also save these plots to file:
-png(file.path(output_dir, "test_plot.png"))
- hist_plot
$breaks
-[1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0
-
-$counts
-[1] 5 27 27 30 31 18 6 6
-
-$density
-[1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000
-[8] 0.08000000
-
-$mids
-[1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75
-
-$xname
-[1] "iris$Sepal.Length"
-
-$equidist
-[1] TRUE
-
-attr(,"class")
-[1] "histogram"
-dev.off()
png
- 2
-How to include a Google slide. It’s simplest to use the ottrpal
package:
But if you have the slide or some other image locally downloaded you can also use HTML like this:
-You may also want to embed videos in your course. If alternatively, you just want to include a link you can do so like this:
-Check out this link to a video using markdown syntax.
-knitr
To embed videos in your course, you can use knitr::include_url()
like this: Note that you should use echo=FALSE
in the code chunk because we don’t want the code part of this to show up. If you are unfamiliar with how R Markdown code chunks work, read this.
https://www.youtube.com/embed/VOCYL-FNbr0400pxhttps://www.youtube.com/embed/VOCYL-FNbr0
-knitr
https://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview400pxhttps://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview
-Yet again you can use a link to a website like so:
- -You might want to have users open a website in a new tab by default, especially if they need to reference both the course and a resource at once.
- -Or, you can embed some websites.
-knitr
This works:
-https://yihui.org400pxhttps://yihui.org
-Occasionally, you might find it useful to emphasize a particular piece of information. To help you do so, we have provided css code and images (no need for you to worry about that!) to create the following stylized boxes.
-You can use these boxes in your course with either of two options: using HTML code or Pandoc syntax.
-rmarkdown
container syntaxThe rmarkdown
package allows for a different syntax to be converted to the HTML that you just saw and also allows for conversion to LaTeX. See the Bookdown documentation for more information. Note that Bookdown uses Pandoc.
::: {.notice}
-Note using rmarkdown syntax.
-
-:::
-Note using rmarkdown syntax.
-As an example you might do something like this:
-Please click on the subsection headers in the left hand navigation bar (e.g., 2.1, 4.3) a second time to expand the table of contents and enable the scroll_highlight
feature (see more)
To add a warning box like the following use:
-Followed by the text you want inside
-This will create the following:
-Followed by the text you want inside
-Here is a <div class = "warning">
box:
Note text
-Here is a <div class = "github">
box:
GitHub text
-Here is a <div class = "dictionary">
box:
dictionary text
-Here is a <div class = "reflection">
box:
reflection text
-Here is a <div class = "wip">
box:
Work in Progress text
-${missingFields[0]}
field.`,
- message: `The items being returned for this search do not include all the required fields. Please ensure that your index items include the ${missingFields[0]}
field or use index-fields
in your _quarto.yml
file to specify the field names.`,
- };
- } else if (missingFields.length > 1) {
- const missingFieldList = missingFields
- .map((field) => {
- return `${field}
`;
- })
- .join(", ");
-
- throw {
- name: `Error: Search index is missing the following fields: ${missingFieldList}.`,
- message: `The items being returned for this search do not include all the required fields. Please ensure that your index items includes the following fields: ${missingFieldList}, or use index-fields
in your _quarto.yml
file to specify the field names.`,
- };
- }
- }
-}
-
-let lastQuery = null;
-function showCopyLink(query, options) {
- const language = options.language;
- lastQuery = query;
- // Insert share icon
- const inputSuffixEl = window.document.body.querySelector(
- ".aa-Form .aa-InputWrapperSuffix"
- );
-
- if (inputSuffixEl) {
- let copyButtonEl = window.document.body.querySelector(
- ".aa-Form .aa-InputWrapperSuffix .aa-CopyButton"
- );
-
- if (copyButtonEl === null) {
- copyButtonEl = window.document.createElement("button");
- copyButtonEl.setAttribute("class", "aa-CopyButton");
- copyButtonEl.setAttribute("type", "button");
- copyButtonEl.setAttribute("title", language["search-copy-link-title"]);
- copyButtonEl.onmousedown = (e) => {
- e.preventDefault();
- e.stopPropagation();
- };
-
- const linkIcon = "bi-clipboard";
- const checkIcon = "bi-check2";
-
- const shareIconEl = window.document.createElement("i");
- shareIconEl.setAttribute("class", `bi ${linkIcon}`);
- copyButtonEl.appendChild(shareIconEl);
- inputSuffixEl.prepend(copyButtonEl);
-
- const clipboard = new window.ClipboardJS(".aa-CopyButton", {
- text: function (_trigger) {
- const copyUrl = new URL(window.location);
- copyUrl.searchParams.set(kQueryArg, lastQuery);
- copyUrl.searchParams.set(kResultsArg, "1");
- return copyUrl.toString();
- },
- });
- clipboard.on("success", function (e) {
- // Focus the input
-
- // button target
- const button = e.trigger;
- const icon = button.querySelector("i.bi");
-
- // flash "checked"
- icon.classList.add(checkIcon);
- icon.classList.remove(linkIcon);
- setTimeout(function () {
- icon.classList.remove(checkIcon);
- icon.classList.add(linkIcon);
- }, 1000);
- });
- }
-
- // If there is a query, show the link icon
- if (copyButtonEl) {
- if (lastQuery && options["copy-button"]) {
- copyButtonEl.style.display = "flex";
- } else {
- copyButtonEl.style.display = "none";
- }
- }
- }
-}
-
-/* Search Index Handling */
-// create the index
-var fuseIndex = undefined;
-var shownWarning = false;
-
-// fuse index options
-const kFuseIndexOptions = {
- keys: [
- { name: "title", weight: 20 },
- { name: "section", weight: 20 },
- { name: "text", weight: 10 },
- ],
- ignoreLocation: true,
- threshold: 0.1,
-};
-
-async function readSearchData() {
- // Initialize the search index on demand
- if (fuseIndex === undefined) {
- if (window.location.protocol === "file:" && !shownWarning) {
- window.alert(
- "Search requires JavaScript features disabled when running in file://... URLs. In order to use search, please run this document in a web server."
- );
- shownWarning = true;
- return;
- }
- const fuse = new window.Fuse([], kFuseIndexOptions);
-
- // fetch the main search.json
- const response = await fetch(offsetURL("search.json"));
- if (response.status == 200) {
- return response.json().then(function (searchDocs) {
- searchDocs.forEach(function (searchDoc) {
- fuse.add(searchDoc);
- });
- fuseIndex = fuse;
- return fuseIndex;
- });
- } else {
- return Promise.reject(
- new Error(
- "Unexpected status from search index request: " + response.status
- )
- );
- }
- }
-
- return fuseIndex;
-}
-
-function inputElement() {
- return window.document.body.querySelector(".aa-Form .aa-Input");
-}
-
-function focusSearchInput() {
- setTimeout(() => {
- const inputEl = inputElement();
- if (inputEl) {
- inputEl.focus();
- }
- }, 50);
-}
-
-/* Panels */
-const kItemTypeDoc = "document";
-const kItemTypeMore = "document-more";
-const kItemTypeItem = "document-item";
-const kItemTypeError = "error";
-
-function renderItem(
- item,
- createElement,
- state,
- setActiveItemId,
- setContext,
- refresh,
- quartoSearchOptions
-) {
- switch (item.type) {
- case kItemTypeDoc:
- return createDocumentCard(
- createElement,
- "file-richtext",
- item.title,
- item.section,
- item.text,
- item.href,
- item.crumbs,
- quartoSearchOptions
- );
- case kItemTypeMore:
- return createMoreCard(
- createElement,
- item,
- state,
- setActiveItemId,
- setContext,
- refresh
- );
- case kItemTypeItem:
- return createSectionCard(
- createElement,
- item.section,
- item.text,
- item.href
- );
- case kItemTypeError:
- return createErrorCard(createElement, item.title, item.text);
- default:
- return undefined;
- }
-}
-
-function createDocumentCard(
- createElement,
- icon,
- title,
- section,
- text,
- href,
- crumbs,
- quartoSearchOptions
-) {
- const iconEl = createElement("i", {
- class: `bi bi-${icon} search-result-icon`,
- });
- const titleEl = createElement("p", { class: "search-result-title" }, title);
- const titleContents = [iconEl, titleEl];
- const showParent = quartoSearchOptions["show-item-context"];
- if (crumbs && showParent) {
- let crumbsOut = undefined;
- const crumbClz = ["search-result-crumbs"];
- if (showParent === "root") {
- crumbsOut = crumbs.length > 1 ? crumbs[0] : undefined;
- } else if (showParent === "parent") {
- crumbsOut = crumbs.length > 1 ? crumbs[crumbs.length - 2] : undefined;
- } else {
- crumbsOut = crumbs.length > 1 ? crumbs.join(" > ") : undefined;
- crumbClz.push("search-result-crumbs-wrap");
- }
-
- const crumbEl = createElement(
- "p",
- { class: crumbClz.join(" ") },
- crumbsOut
- );
- titleContents.push(crumbEl);
- }
-
- const titleContainerEl = createElement(
- "div",
- { class: "search-result-title-container" },
- titleContents
- );
-
- const textEls = [];
- if (section) {
- const sectionEl = createElement(
- "p",
- { class: "search-result-section" },
- section
- );
- textEls.push(sectionEl);
- }
- const descEl = createElement("p", {
- class: "search-result-text",
- dangerouslySetInnerHTML: {
- __html: text,
- },
- });
- textEls.push(descEl);
-
- const textContainerEl = createElement(
- "div",
- { class: "search-result-text-container" },
- textEls
- );
-
- const containerEl = createElement(
- "div",
- {
- class: "search-result-container",
- },
- [titleContainerEl, textContainerEl]
- );
-
- const linkEl = createElement(
- "a",
- {
- href: offsetURL(href),
- class: "search-result-link",
- },
- containerEl
- );
-
- const classes = ["search-result-doc", "search-item"];
- if (!section) {
- classes.push("document-selectable");
- }
-
- return createElement(
- "div",
- {
- class: classes.join(" "),
- },
- linkEl
- );
-}
-
-function createMoreCard(
- createElement,
- item,
- state,
- setActiveItemId,
- setContext,
- refresh
-) {
- const moreCardEl = createElement(
- "div",
- {
- class: "search-result-more search-item",
- onClick: (e) => {
- // Handle expanding the sections by adding the expanded
- // section to the list of expanded sections
- toggleExpanded(item, state, setContext, setActiveItemId, refresh);
- e.stopPropagation();
- },
- },
- item.title
- );
-
- return moreCardEl;
-}
-
-function toggleExpanded(item, state, setContext, setActiveItemId, refresh) {
- const expanded = state.context.expanded || [];
- if (expanded.includes(item.target)) {
- setContext({
- expanded: expanded.filter((target) => target !== item.target),
- });
- } else {
- setContext({ expanded: [...expanded, item.target] });
- }
-
- refresh();
- setActiveItemId(item.__autocomplete_id);
-}
-
-function createSectionCard(createElement, section, text, href) {
- const sectionEl = createSection(createElement, section, text, href);
- return createElement(
- "div",
- {
- class: "search-result-doc-section search-item",
- },
- sectionEl
- );
-}
-
-function createSection(createElement, title, text, href) {
- const descEl = createElement("p", {
- class: "search-result-text",
- dangerouslySetInnerHTML: {
- __html: text,
- },
- });
-
- const titleEl = createElement("p", { class: "search-result-section" }, title);
- const linkEl = createElement(
- "a",
- {
- href: offsetURL(href),
- class: "search-result-link",
- },
- [titleEl, descEl]
- );
- return linkEl;
-}
-
-function createErrorCard(createElement, title, text) {
- const descEl = createElement("p", {
- class: "search-error-text",
- dangerouslySetInnerHTML: {
- __html: text,
- },
- });
-
- const titleEl = createElement("p", {
- class: "search-error-title",
- dangerouslySetInnerHTML: {
- __html: ` ${title}`,
- },
- });
- const errorEl = createElement("div", { class: "search-error" }, [
- titleEl,
- descEl,
- ]);
- return errorEl;
-}
-
-function positionPanel(pos) {
- const panelEl = window.document.querySelector(
- "#quarto-search-results .aa-Panel"
- );
- const inputEl = window.document.querySelector(
- "#quarto-search .aa-Autocomplete"
- );
-
- if (panelEl && inputEl) {
- panelEl.style.top = `${Math.round(panelEl.offsetTop)}px`;
- if (pos === "start") {
- panelEl.style.left = `${Math.round(inputEl.left)}px`;
- } else {
- panelEl.style.right = `${Math.round(inputEl.offsetRight)}px`;
- }
- }
-}
-
-/* Highlighting */
-// highlighting functions
-function highlightMatch(query, text) {
- if (text) {
- const start = text.toLowerCase().indexOf(query.toLowerCase());
- if (start !== -1) {
- const startMark = "";
- const endMark = "";
-
- const end = start + query.length;
- text =
- text.slice(0, start) +
- startMark +
- text.slice(start, end) +
- endMark +
- text.slice(end);
- const startInfo = clipStart(text, start);
- const endInfo = clipEnd(
- text,
- startInfo.position + startMark.length + endMark.length
- );
- text =
- startInfo.prefix +
- text.slice(startInfo.position, endInfo.position) +
- endInfo.suffix;
-
- return text;
- } else {
- return text;
- }
- } else {
- return text;
- }
-}
-
-function clipStart(text, pos) {
- const clipStart = pos - 50;
- if (clipStart < 0) {
- // This will just return the start of the string
- return {
- position: 0,
- prefix: "",
- };
- } else {
- // We're clipping before the start of the string, walk backwards to the first space.
- const spacePos = findSpace(text, pos, -1);
- return {
- position: spacePos.position,
- prefix: "",
- };
- }
-}
-
-function clipEnd(text, pos) {
- const clipEnd = pos + 200;
- if (clipEnd > text.length) {
- return {
- position: text.length,
- suffix: "",
- };
- } else {
- const spacePos = findSpace(text, clipEnd, 1);
- return {
- position: spacePos.position,
- suffix: spacePos.clipped ? "…" : "",
- };
- }
-}
-
-function findSpace(text, start, step) {
- let stepPos = start;
- while (stepPos > -1 && stepPos < text.length) {
- const char = text[stepPos];
- if (char === " " || char === "," || char === ":") {
- return {
- position: step === 1 ? stepPos : stepPos - step,
- clipped: stepPos > 1 && stepPos < text.length,
- };
- }
- stepPos = stepPos + step;
- }
-
- return {
- position: stepPos - step,
- clipped: false,
- };
-}
-
-// removes highlighting as implemented by the mark tag
-function clearHighlight(searchterm, el) {
- const childNodes = el.childNodes;
- for (let i = childNodes.length - 1; i >= 0; i--) {
- const node = childNodes[i];
- if (node.nodeType === Node.ELEMENT_NODE) {
- if (
- node.tagName === "MARK" &&
- node.innerText.toLowerCase() === searchterm.toLowerCase()
- ) {
- el.replaceChild(document.createTextNode(node.innerText), node);
- } else {
- clearHighlight(searchterm, node);
- }
- }
- }
-}
-
-function escapeRegExp(string) {
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
-}
-
-// highlight matches
-function highlight(term, el) {
- const termRegex = new RegExp(term, "ig");
- const childNodes = el.childNodes;
-
- // walk back to front avoid mutating elements in front of us
- for (let i = childNodes.length - 1; i >= 0; i--) {
- const node = childNodes[i];
-
- if (node.nodeType === Node.TEXT_NODE) {
- // Search text nodes for text to highlight
- const text = node.nodeValue;
-
- let startIndex = 0;
- let matchIndex = text.search(termRegex);
- if (matchIndex > -1) {
- const markFragment = document.createDocumentFragment();
- while (matchIndex > -1) {
- const prefix = text.slice(startIndex, matchIndex);
- markFragment.appendChild(document.createTextNode(prefix));
-
- const mark = document.createElement("mark");
- mark.appendChild(
- document.createTextNode(
- text.slice(matchIndex, matchIndex + term.length)
- )
- );
- markFragment.appendChild(mark);
-
- startIndex = matchIndex + term.length;
- matchIndex = text.slice(startIndex).search(new RegExp(term, "ig"));
- if (matchIndex > -1) {
- matchIndex = startIndex + matchIndex;
- }
- }
- if (startIndex < text.length) {
- markFragment.appendChild(
- document.createTextNode(text.slice(startIndex, text.length))
- );
- }
-
- el.replaceChild(markFragment, node);
- }
- } else if (node.nodeType === Node.ELEMENT_NODE) {
- // recurse through elements
- highlight(term, node);
- }
- }
-}
-
-/* Link Handling */
-// get the offset from this page for a given site root relative url
-function offsetURL(url) {
- var offset = getMeta("quarto:offset");
- return offset ? offset + url : url;
-}
-
-// read a meta tag value
-function getMeta(metaName) {
- var metas = window.document.getElementsByTagName("meta");
- for (let i = 0; i < metas.length; i++) {
- if (metas[i].getAttribute("name") === metaName) {
- return metas[i].getAttribute("content");
- }
- }
- return "";
-}
-
-function algoliaSearch(query, limit, algoliaOptions) {
- const { getAlgoliaResults } = window["@algolia/autocomplete-preset-algolia"];
-
- const applicationId = algoliaOptions["application-id"];
- const searchOnlyApiKey = algoliaOptions["search-only-api-key"];
- const indexName = algoliaOptions["index-name"];
- const indexFields = algoliaOptions["index-fields"];
- const searchClient = window.algoliasearch(applicationId, searchOnlyApiKey);
- const searchParams = algoliaOptions["params"];
- const searchAnalytics = !!algoliaOptions["analytics-events"];
-
- return getAlgoliaResults({
- searchClient,
- queries: [
- {
- indexName: indexName,
- query,
- params: {
- hitsPerPage: limit,
- clickAnalytics: searchAnalytics,
- ...searchParams,
- },
- },
- ],
- transformResponse: (response) => {
- if (!indexFields) {
- return response.hits.map((hit) => {
- return hit.map((item) => {
- return {
- ...item,
- text: highlightMatch(query, item.text),
- };
- });
- });
- } else {
- const remappedHits = response.hits.map((hit) => {
- return hit.map((item) => {
- const newItem = { ...item };
- ["href", "section", "title", "text", "crumbs"].forEach(
- (keyName) => {
- const mappedName = indexFields[keyName];
- if (
- mappedName &&
- item[mappedName] !== undefined &&
- mappedName !== keyName
- ) {
- newItem[keyName] = item[mappedName];
- delete newItem[mappedName];
- }
- }
- );
- newItem.text = highlightMatch(query, newItem.text);
- return newItem;
- });
- });
- return remappedHits;
- }
- },
- });
-}
-
-let subSearchTerm = undefined;
-let subSearchFuse = undefined;
-const kFuseMaxWait = 125;
-
-async function fuseSearch(query, fuse, fuseOptions) {
- let index = fuse;
- // Fuse.js using the Bitap algorithm for text matching which runs in
- // O(nm) time (no matter the structure of the text). In our case this
- // means that long search terms mixed with large index gets very slow
- //
- // This injects a subIndex that will be used once the terms get long enough
- // Usually making this subindex is cheap since there will typically be
- // a subset of results matching the existing query
- if (subSearchFuse !== undefined && query.startsWith(subSearchTerm)) {
- // Use the existing subSearchFuse
- index = subSearchFuse;
- } else if (subSearchFuse !== undefined) {
- // The term changed, discard the existing fuse
- subSearchFuse = undefined;
- subSearchTerm = undefined;
- }
-
- // Search using the active fuse
- const then = performance.now();
- const resultsRaw = await index.search(query, fuseOptions);
- const now = performance.now();
-
- const results = resultsRaw.map((result) => {
- const addParam = (url, name, value) => {
- const anchorParts = url.split("#");
- const baseUrl = anchorParts[0];
- const sep = baseUrl.search("\\?") > 0 ? "&" : "?";
- anchorParts[0] = baseUrl + sep + name + "=" + value;
- return anchorParts.join("#");
- };
-
- return {
- title: result.item.title,
- section: result.item.section,
- href: addParam(result.item.href, kQueryArg, query),
- text: highlightMatch(query, result.item.text),
- crumbs: result.item.crumbs,
- };
- });
-
- // If we don't have a subfuse and the query is long enough, go ahead
- // and create a subfuse to use for subsequent queries
- if (now - then > kFuseMaxWait && subSearchFuse === undefined) {
- subSearchTerm = query;
- subSearchFuse = new window.Fuse([], kFuseIndexOptions);
- resultsRaw.forEach((rr) => {
- subSearchFuse.add(rr.item);
- });
- }
- return results;
-}
diff --git a/docs/style.css b/docs/style.css
deleted file mode 100755
index 43677eb..0000000
--- a/docs/style.css
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Imports fonts from Google Fonts (Abril Fatface, Karla, and Lora) with different weights and styles */
-@import url('https://fonts.googleapis.com/css?family=Abril+Fatface|Karla:400,400i,700,700i|Lora:400,400i,700,700i&display=swap');
-
-/* Styles for paragraph captions, setting their color and margin */
-p.caption {
- color: #777;
- margin-top: 10px;
-} /* TODO What is this? */
-
-/* Styles for paragraph code, which inherit white-space property */
-p code {
- white-space: inherit;
-}
-
-/* Styles for pre elements to prevent words from breaking unnaturally */
-pre {
- word-break: normal;
- word-wrap: normal;
-}
-
-/* Inherits the white-space property for consistent code formatting */
-pre code {
- white-space: inherit;
-}
-
-
-/*------------- Header text---------------- */
-h1, h2, h3, h4 {
- font-family: 'Lora', arial, sans-serif;
-}
-
-.title {
- font-family: 'Lora';
- font-size: 4em !important;
- color: #012d72;
- margin-top: 0.275em !important;
- margin-bottom: 0.35em !important;
-}
-
-.subtitle {
- font-family: 'Lora';
- color: #0b8d96;
-}
-
-/* Sidebar Logo */
-.sidebar-logo {
- width: 200px;
- margin: 5px;
-}
-
-/* Stylized boxes */
-div.notice, div.warning, div.github, div.dictionary, div.reflection, div.wip {
- padding: 1em;
- margin: 1em 0;
- padding-left: 100px;
- min-height: 120px;
- background-repeat: no-repeat;
-}
-
-div.notice{
- border: 4px #68ace5;
- border-style: solid;
- background-size: 70px;
- background-position: 15px center;
- background-color: #e8ebee;
- background-image: url("img/box-images/note.png");
-}
-
-
-div.warning{
- border: 4px #e0471c;
- border-style: solid;
- background-size: 70px;
- background-position: 15px center;
- background-color: #e8ebee;
- background-image: url("img/box-images/warning.png");
-}
-
-div.github{
- border: 4px #000000;
- border-style: solid;
- background-size: 70px;
- background-position: 15px center;
- background-color: #e8ebee;
- background-image: url("img/box-images/github.png");
-}
-
-div.dictionary{
- border: 4px #68ace5;
- border-style: solid;
- background-size: 70px;
- background-position: 15px center;
- background-color: #e8ebee;
- background-image: url("img/box-images/dictionary.png");
-}
-
-div.reflection{
- border: 4px #68ace5;
- border-style: solid;
- background-size: 90px;
- background-position: 15px center;
- background-color: #e8ebee;
- background-image: url("img/box-images/thinking_face.png");
-}
-
-div.wip{
- border: 4px #000000;
- border-style: solid;
- background-size: 70px;
- background-position: 15px center;
- background-color: #f4d03f;
- background-image: url("img/box-images/under_construction.png");
-}
-
-/* Navbar */
-.chapter-title {
- text-transform: none;
-}
-.menu-text {
- text-transform: uppercase;
-}
-
-
-
-/* iframes */
-iframe {
- -moz-transform-origin: top left;
- -webkit-transform-origin: top left;
- -o-transform-origin: top left;
- -ms-transform-origin: top left;
- transform-origin: top left;
-}
-
-.iframe-container {
- overflow: auto;
- -webkit-overflow-scrolling: touch;
- border: #ddd 2px solid;
- box-shadow: #888 0px 5px 8px;
- margin-bottom: 1em;
-}
-
-.iframe-container > iframe {
- border: none;
-}
-
-
-/* Footer */
-.footer {
- font-family: "Lora", serif;
- font-size: 1em;
- color: #193a5c;
-}
-
-
-/* Navbar Header */
-.navbar-logo {
- max-height: 33px;
-}
-
-
-/* Navbar Footer */
-.nav-footer {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: baseline;
- text-align: center;
- padding-top: .5rem;
- padding-bottom: .5rem;
- background-color: #1B365D;
- color: #fff !important;
-}
\ No newline at end of file
diff --git a/docs/third-section-new-chapter.html b/docs/third-section-new-chapter.html
deleted file mode 100644
index c1e6551..0000000
--- a/docs/third-section-new-chapter.html
+++ /dev/null
@@ -1,952 +0,0 @@
-
-
-
-
-
-
-
-
-
-Every chapter also needs Learning Objectives.
-For this chapter, we’ll need the following packages attached:
-*Remember to add any additional packages you need to your course’s own docker image.
-library(magrittr)
You can write all your text in sections like this, using ##
to indicate a new header. you can use additional pound symbols to create lower levels of headers.
See here for additional general information about how you can format text within R Markdown files. In addition, see here for more in depth and advanced options.
-Here’s a subheading (using three pound symbols) and some text in this subsection!
-You can demonstrate code like this:
-<- file.path("resources", "code_output")
- output_dir if (!dir.exists(output_dir)) {
-dir.create(output_dir)
- }
And make plots too:
-<- hist(iris$Sepal.Length) hist_plot
You can also save these plots to file:
-png(file.path(output_dir, "test_plot.png"))
- hist_plot
$breaks
-[1] 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0
-
-$counts
-[1] 5 27 27 30 31 18 6 6
-
-$density
-[1] 0.06666667 0.36000000 0.36000000 0.40000000 0.41333333 0.24000000 0.08000000
-[8] 0.08000000
-
-$mids
-[1] 4.25 4.75 5.25 5.75 6.25 6.75 7.25 7.75
-
-$xname
-[1] "iris$Sepal.Length"
-
-$equidist
-[1] TRUE
-
-attr(,"class")
-[1] "histogram"
-dev.off()
png
- 2
-How to include a Google slide. It’s simplest to use the ottrpal
package:
But if you have the slide or some other image locally downloaded you can also use HTML like this:
-You may also want to embed videos in your course. If alternatively, you just want to include a link you can do so like this:
-Check out this link to a video using markdown syntax.
-knitr
To embed videos in your course, you can use knitr::include_url()
like this: Note that you should use echo=FALSE
in the code chunk because we don’t want the code part of this to show up. If you are unfamiliar with how R Markdown code chunks work, read this.
https://www.youtube.com/embed/VOCYL-FNbr0400pxhttps://www.youtube.com/embed/VOCYL-FNbr0
-knitr
https://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview400pxhttps://drive.google.com/file/d/1mm72K4V7fqpgAfWkr6b7HTZrc3f-T6AV/preview
-Yet again you can use a link to a website like so:
- -You might want to have users open a website in a new tab by default, especially if they need to reference both the course and a resource at once.
- -Or, you can embed some websites.
-knitr
This works:
-https://yihui.org400pxhttps://yihui.org
-Occasionally, you might find it useful to emphasize a particular piece of information. To help you do so, we have provided css code and images (no need for you to worry about that!) to create the following stylized boxes.
-You can use these boxes in your course with either of two options: using HTML code or Pandoc syntax.
-rmarkdown
container syntaxThe rmarkdown
package allows for a different syntax to be converted to the HTML that you just saw and also allows for conversion to LaTeX. See the Bookdown documentation for more information. Note that Bookdown uses Pandoc.
::: {.notice}
-Note using rmarkdown syntax.
-
-:::
-Note using rmarkdown syntax.
-As an example you might do something like this:
-Please click on the subsection headers in the left hand navigation bar (e.g., 2.1, 4.3) a second time to expand the table of contents and enable the scroll_highlight
feature (see more)
To add a warning box like the following use:
-Followed by the text you want inside
-This will create the following:
-Followed by the text you want inside
-Here is a <div class = "warning">
box:
Note text
-Here is a <div class = "github">
box:
GitHub text
-Here is a <div class = "dictionary">
box:
dictionary text
-Here is a <div class = "reflection">
box:
reflection text
-Here is a <div class = "wip">
box:
Work in Progress text
-