Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The [1] phrase tells you that R returned one result; in this case, 4."
A block of code is set as follows:
<ul> <li>First bullet</li> <li>Second bullet</li> <li>Third bullet</li> </ul>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
tabsetPanel(id = "theTabs",
tabPanel("Summary", textOutput("summary"),
value = "summary"),
tabPanel("Trend", plotOutput("trend"),
value = "trend"),
tabPanel("Map", leafletOutput("map"),
p("Map data is from the most recent year in the selected range"),
value = "map")
)
Any command-line input or output is written as follows:
> 2 + 2 [1] 4
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To set up a new project, go to File | New Project in RStudio."