Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Inserting a dynamic data table

Now we will add a dynamic table with the data we simulated in the previous chapter, so first of all, we need to bring that data into the application, and we do so with the line shown below. You should place this data-loading line above the ui object in your app. This way, it will only be run once, when starting up the Shiny application, as any code that would normally be run when executing an R script:

ORIGINAL_DATA <- read.csv("../chapter-09/data.csv", stringsAsFactors = FALSE)

At this point, we need to introduce the DT package. It provides an easy way to create dynamic tables for Shiny applications. Since we will reference it through its package name, we don't need to load it with library(DT). Referencing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content