售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Learning Shiny
Table of Contents
Learning Shiny
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introducing R, RStudio, and Shiny
About R
Installing R
A quick guide to R
About RStudio
Installing RStudio
A quick guide to RStudio
About Shiny
Installing and loading Shiny
Summary
2. First Steps towards Programming in R
Object-oriented programming concepts
Variables in R
Classes in depth
Vectors
Lists
Matrices and arrays
Data frames
Factors
Element selection
Selecting elements from vectors
Selecting elements from arrays
Selecting elements from lists
Selecting elements from data frames
Control structures in R
The if...else block
The while loop
The for loop
The switch statement
Reading data
Delimited data
Reading line by line
Reading a character set
Reading JSON
Reading XML
Reading databases – SQL
Reading data from external sources
Summary
3. An Introduction to Data Processing in R
Sorting elements
sort() versus order()
Basic summary functions
grep and regular expressions
A brief introduction to regular expressions
Sets
Shortcuts
Dot
Non-printable characters
Negation
Alternation
Quantifiers
Special quantifiers
Anchors
Expressions
Escapes
Examples
Example 1
Example 2
The lapply, vapply, sapply, and apply functions
Examples
plyr
The data.table package
reshape2
Summary
4. Shiny Structure – Reactivity Concepts
Shiny as a package
An introduction to server.R and UI.R
UI.R as a JavaScript/HTML wrapper
Including HTML within UI.R
The concept of reactivity
Reactive independent processes within an application
An introduction to global.R
Running a Shiny web application
An overview of simple examples
Example 1 – a general example of how render-like functions work
Example 2 – using reactive objects
Example 3 – Loading data outside reactive context
Example 4 – using global.R
Summary
5. Shiny in Depth – A Deep Dive into Shiny's World
UI.R
The structure
conditionalPanel() – Example 1
conditionalPanel() – Example 2
An example on the use of tabPanel() in tabsetPanel()
Inputs
Free inputs
Lists
Dates
Files
Buttons
submitButton() with conditionalPanel()
downloadButton() - an example
Optimal usage of server.R and global.R
Shiny options
Summary
6. Using R's Visualization Alternatives in Shiny
The graphics package
Barplot
Histograms
Boxplots
Pie charts
Points
Lines
Plotting options
Legends
Plotting a fully customized plot with the graphics package
Including a plot in a Shiny application
A walk around the googleVis package
googleVis in R
An overview of some functions
Candlesticks
Geolocalized visualizations
Treemaps
Motion chart
googleVis in Shiny
A small example of googleVis in Shiny
ggplot2 – first steps
ggplot's main logic – layers and aesthetics
Layers
Aesthetics
Some graphical tools in ggplot2
geom_point
geom_line
geom_bars
An applied example with multiple layers
ggplot and Shiny
Summary
7. Advanced Functions in Shiny
The validate() function
The isolate() function
The observe() function
The reactiveValues() function
Input updates
Summary
8. Shiny and HTML/JavaScript
The www directory
Creating UIs from plain HTML
The use of tags in UI.R
JavaScript
CSS
Other tags
Relating HTML/JavaScript and server.R
Summary
9. Interactive Graphics in Shiny
Interaction possibilities within R graphics
D3.js integration
What is D3?
networkD3
An introduction to htmlwidgets
D3BarChart.R
D3BarChart.js
D3BarChart.yaml
Summary
10. Sharing Applications
runGist/runGitHub/runUrl
shinyapps.io
Deploying applications on your own server
Installing R
Installing the RStudio server
Installing the Shiny package
run_as
listen
location
site_dir/app_dir
directory_index
Summary
11. From White Paper to a Full Application
Problem presentation
Conceptual design
Pre-application processing
Workclass
global.R coding
global.R
UI.R partial coding
UI.R
server.R coding
Gender bar chart
Age chart
Ethnic bar chart
Marital status
Education curve
Earnings chi-square test
Activity summary
UI.R completion
UI.R
Styling
Discovering insights in the application
Summary
Reference
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜