R Markdown Cookbook

個数:1
紙書籍版価格
¥25,966
  • 電子書籍
  • ポイントキャンペーン

R Markdown Cookbook

  • 著者名:Xie, Yihui/Dervieux, Christophe/Riederer, Emily
  • 価格 ¥7,163 (本体¥6,512)
  • Chapman and Hall/CRC(2020/10/21発売)
  • 春分の日の三連休!Kinoppy 電子書籍・電子洋書 全点ポイント30倍キャンペーン(~3/22)
  • ポイント 1,950pt (実際に付与されるポイントはご注文内容確認画面でご確認下さい)
  • 言語:ENG
  • ISBN:9780367563820
  • eISBN:9781000290882

ファイル: /

Description

This new book written by the developers of R Markdown is an essential reference that will help users learn and make full use of the software.

Those new to R Markdown will appreciate the short, practical examples that address the most common issues users encounter. Frequent users will also benefit from the wide ranging tips and tricks that expose ‘hidden’ features, support customization and demonstrate the many new and varied applications of the software.

After reading this book users will learn how to:

  • Enhance your R Markdown content with diagrams, citations, and dynamically generated text
  • Streamline your workflow with child documents, code chunk references, and caching
  • Control the formatting and layout with Pandoc markdown syntax or by writing custom HTML and LaTeX templates
  • Utilize chunk options and hooks to fine-tune how your code is processed
  • Switch between different language engineers to seamlessly incorporate python, D3, and more into your analysis

Table of Contents

  1. Installation
  2. Use a Pandoc version not bundled with the RStudio IDE

    Install LaTeX (TinyTeX) for PDF reports

    Install missing LaTeX packages

  3. Conceptual Overview
  4. What happens when we render?

    R Markdown anatomy

    YAML metadata

    Narrative

    Code chunks

    Document body

    What can we change to change the results?

  5. Basics
  6. Code chunks and inline R code

    Write Markdown in the RStudio visual editor

    Render an R script to a report

    Convert R Markdown to R script

    R Markdown Notebooks

  7. Document Elements
  8. Insert page breaks

    Set the document title dynamically

    Access the document metadata in R code

    Unnumbered sections

    Bibliographies and citations

    Changing citation style

    Add an item to bibliography without using it

    Add all items to bibliography

    Include appendix after bibliography (*)

    Generate R package citations

    Cross-referencing within documents

    Update the date automatically

    Multiple authors in a document

    Numbered figure captions

    Combine words into a comma-separated phrase

    Preserve a large number of linebreaks

    Convert models to equations

    Create an animation from multiple R plots

    Create diagrams

    Basic diagrams

    Adding parameters to plots

    Other packages for making diagrams

    Escape special characters

    Comment out text

    Omit a heading in the table of contents

    Put together all code in the appendix (*)

    Manipulate Markdown via Pandoc Lua filters (*)

  9. Formatting
  10. Font color

    Using an R function to write raw HTML or LaTeX code

    Using a Pandoc Lua filter (*)

    Indent text

    Control the width of text output

    Control the size of plots/images

    Figure alignment

    Verbatim code chunks

    Show a verbatim inline expression

    Line numbers for code blocks (*)

    Multi-column layout (*)

  11. LaTeX Output
  12. Add LaTeX code to the preamble

    Pandoc options for LaTeX output

    Add logo to title page

    Include additional LaTeX packages

    Loading LaTeX packages

    Example packages

    Control the placement of figures

    Floating environments

    Prevent figures from floating

    Force floats forwards

    Adjust LaTeX placement rules (*)

    LaTeX sub-figures

    Render documents containing Unicode characters

    Generate a LaTeX fragment

    Add custom headers and footers (*)

    Use a custom Pandoc LaTeX template (*)

    Write raw LaTeX code

    For hardcore LaTeX users (*)

  13. HTML Output
  14. Apply custom CSS

    Center section headings

    Style code blocks and text output

    Scrollable code blocks (*)

    Fold all code blocks but show some initially

    Put content in tabs

    Embed the Rmd source file in the HTML output file

    Embed arbitrary files in the HTML output file

    Use a custom HTML template (*)

    Include the content of an existing HTML file (*)

    Add a custom browser icon

    Use the

    disclosure element

    Sharing HTML output on the web

    R-specific services

    Static website services

    Improve accessibility of HTML pages

    For hardcore HTML users (*)

  15. Word
  16. Custom Word templates

    The two-way workflow between R Markdown and Word

    Style individual elements

  17. Multiple Output Formats
  18. LaTeX or HTML output

    Display HTML widgets

    Embed a web page

    Multiple figures side-by-side

    Write raw content (*)

    Custom blocks (*)

    Syntax

    Adding a shaded box

    Including icons

  19. Tables
  20. The function knitr::kable()

    Supported table formats

    Change column names

    Specify column alignment

    Add a table caption

    Format numeric columns

    Display missing values

    Escape special characters

    Multiple tables side by side

    Generate multiple tables from a for-loop (*)

    Customize LaTeX tables (*)

    Customize HTML tables (*)

    The kableExtra package

    Set the font size

    Style specific rows/columns

    Group rows/columns

    Scaling down wide tables in LaTeX

    Other packages for creating tables

  21. Chunk Options
  22. Use variables in chunk options

    Do not stop on error

    Multiple graphical output formats for the same plot

    Cache time-consuming code chunks

    Cache a code chunk for multiple output formats

    Cache large objects

    Hide code, text output, messages, or plots

    Hide everything from a chunk

    Collapse text output blocks into source blocks

    Reformat R source code

    Output text as raw Markdown content (*)

    Remove leading hashes in text output

    Add attributes to text output blocks (*)

    Post-process plots (*)

    High-quality graphics (*)

    Step-by-step plots with low-level plotting functions (*)

    Customize the printing of objects in chunks (*)

    Option hooks (*)

  23. Output Hooks (*)
  24. Redact source code

    Add line numbers to source code

    Scrollable text output

    Truncate text output

    Output figures in the HTML format

  25. Chunk Hooks (*)
  26. Crop plots

    Optimize PNG plots

    Report how much time each chunk takes to run

    Show the chunk header in the output

    Embed an interactive D plot with rgl

  27. Miscellaneous knitr Tricks
  28. Reuse code chunks

    Embed one chunk in another chunk (*)

    Use the same chunk label in another chunk

    Use reference labels (*)

    Use an object before it is created (*)

    Exit knitting early

    Generate a plot and display it elsewhere

    Modify a plot in a previous code chunk

    Save a group of chunk options and reuse them (*)

    Use knitr::knit_expand() to generate Rmd source

    Allow duplicate labels in code chunks (*)

    A more transparent caching mechanism

    Invalidate the cache by changing code in the expression

    Invalidate the cache by changes in global variables

    Keep multiple copies of the cache

    Comparison with knitr’s caching

  29. Other Languages
  30. Register a custom language engine (*)

    Run Python code and interact with Python

    Execute content conditionally via the asis engine

    Execute Shell scripts

    Visualization with D

    Write the chunk content to a file via the cat engine

    Write to a CSS file

    Include LaTeX code in the preamble

    Write YAML data to a file and also display it

    Run SAS code

    Run Stata code

    Create graphics with Asymptote

    Generate data in R and read it in Asymptote

    Style HTML pages with Sass/SCSS

  31. Managing Projects
  32. Source external R scripts

    Read external scripts into a chunk

    Read multiple code chunks from an external script (*)

    Child documents (*)

    Keep the plot files

    The working directory for R code chunks

    R package vignettes

    R Markdown templates in R packages

    Template use-cases

    Template set-up

    Write books and long-form reports with bookdown

    Build websites with blogdown

  33. Workflow

          Use RStudio keyboard shortcuts

          Spell check R Markdown

          Render R Markdown with rmarkdown::render()

          Parameterized reports

          Customize the Knit button (*)

          Collaborate on Rmd documents through Google Drive

          Organize an R Markdown project into a research website with workflowr

          Send Emails based on R Markdown

 

最近チェックした商品