Skip to content

More Control over Footnotes in R Markdown

January 22, 2019 by edpflager

In R Markdown include footnotes in documents to provide a reference or comment that may provide additional context or an aside to the topic. Traditionally, these numbered notes are placed at the bottom of the page and a corresponding superscript number is added to the text body at the relevant text. R Markdown supports footnotes natively without the need for any additional packages.I’ll cover that first, and then show how to gain more control over footnotes using an additional LaTeX package.

The native footnote syntax is simple, and requires just a paired set of footnote tags.

[^1] – denotes where the footnote superscript notation should be placed.

[^1]: {footnote text} – is the corresponding footnote text. The character within the brackets has to be match the superscript tag and be followed by the trailing the colon. This footnote text can be placed at any spot in the document, but for clarity’s sake, place it close to the text it refers to.

(more…)

Continue Reading

Quick Tips – Spacing and Bulleted Lists

December 27, 2018 by edpflager

Wrapping up the year with a few simple tips for R Markdown that work with PDF, Word or HTML output.

\VSPACE

When you insert a series of blank lines in an R Markdown document and knit the document, the parsing of your document strips out those blank lines. As an example I entered in my file the lines on the left in the image below, and when I Knitted the document, the results were those on the right:

(more…)

Continue Reading

RStudio on Linux Mint 19

December 18, 2018 by edpflager

R Studio is a popular IDE to use with R and runs on Windows (7/8/10), Mac OS X (10.6+) and the most widely used Linux distributions: Debian/Ubuntu and Fedora/Red Hat/OpenSuSE.

For Linux, that generally means installation on any other distributions that are derivatives of these should also work with with minimal effort. For my personal Linux efforts, I have bounced between CentOS (a derivative of Red Hat), and Linux Mint (version 19 built from Ubuntu 18.04). Recently I picked up a refurbished Acer Swift 1 (cheap!) so I would have a Linux laptop to work with.

The Comprehensive R Archive Network (CRAN) has Ubuntu installation packages of R-base up through Ubuntu Cosmic 18.10. Before installing RStudio, you need to install base-R the minimum installation of R. Here is instructions for that based on the CRAN website.

(more…)

Continue Reading

SmartDiagram in R Markdown

December 15, 2018 by edpflager

A useful plugin from the LaTeX environment that works with RMarkdown is smartdiagram developed by Claudio Fiandrino. Conceived as a way to create diagrams from a list of items, it will generate output as circular diagrams, flow diagrams, sequence diagrams and several others. Components within the diagrams can be different colors or a single uniform one. Combined these elements provide a visual layer to describe activities within your R Markdown diagrams and make what your are trying to convey more intuitive to the reader. I won’t cover using all of the different diagrams in smartdiagrams with R Markdown, but this should be a good introduction to how to get it to work.

To get started, in your Markdown document YAML header-includes line add a call to use the smartdiagram package:

header-includes: \usepackage{smartdiagram}

(more…)

Continue Reading

Power BI R Packages – An RVEST example

December 5, 2018 by edpflager

Activity in my day job often provides inspiration for content here, and this post is an example of that.  In my work, I use Microsoft’s SQL Server and Power BI. Both applications now offer some level of support for R:

  • Microsoft now includes an R server with SQL Server
  • Power BI allows you to use R visualizations to provide functionality that is not included natively.
  • If you have an R script that cleans and preps your data, Power BI use it as a data source for visualizations and analytics.

Power BI doesn’t support all R packages. Of the 10,000 plus packages available in the CRAN repository only 850 or so packages are currently supported. This webpage includes an explanation for what they do support and why.

All of that is a preface to this post. At the above link is a table of the supported Power BI packages with version number and a URL for the package on CRAN. I wanted to capture that information for incorporation into some (non-work) documentation. I could easily copy and paste it into a spreadsheet or a text file, but I wanted to set it up as a repeatable process in case the website is updated. I could then capture the updated information quickly and easily. Enter RVEST – a screen scrapping package for R.

(more…)

Continue Reading

Hyperlinks in R Markdown PDF output

November 23, 2018 by edpflager

R Markdown documents can be generated as PDF, HTML or Word documents. Often times you may want to include hyperlinks in your document to go to a specific webpage, to open an email program, or to even just jump to another location in the document. In this post, I’ll be covering adding hyperlinks to PDF output from R Markdown. Previously, I looked at adding hyperlinks to HTML  and Word output.

SIMPLE HYPERLINKS

When generating PDF output, the simplest method of including a hyperlink is to just type the URL with the preceding http or https protocol indicator or you can enclose the link using the greater-than and less-than symbols, like this: (more…)

Continue Reading

Posts navigation

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 26
  • Next

Recent Posts

  • Diagram SQL Server Graph Databases in R – Part 4
  • Diagram SQL Server Graph Databases in R – Part 3
  • Diagram SQL Server Graph Databases in R – Part 2.5
  • Diagram SQL Server Graph Databases in R – Part 2
  • Diagram SQL Server Graph Databases in R – Part 1

Categories

Archives

RSS BI news

  • Query Generation in R
  • Verbose data.table and uncovering hidden cedta’s data table awareness decisions
  • Weather Forecast from MET Office
  • Geocoding function
  • Take 4+: Presentations on ‘Elements of Neural Networks and Deep Learning’ – Parts 1-8

RSS R related news

  • Query Generation in R
  • Visualizing Language Loss in Taiwan: Create an “Age-Sex Pyramid of Language” with ggplot2
  • Verbose data.table and uncovering hidden cedta’s data table awareness decisions
  • Weather Forecast from MET Office
  • Geocoding function

Tags

Ambassador Bridge Big Data CDH centos Cloudera cookbook Docker ETL external article goofy graph database guides Hadoop HortonWorks How-to howto HUE humor impala inspiration install kettle LaTax LDAP Linux Mac metadata Mint MySQL nat: HNS failed nginx PDI Pentaho photogs R R Markdown RStudio rvest SQL Server SysAdmin technical Ubuntu Windows Windsor YARN
© 2019 | WordPress Theme by Superbthemes