Muutke küpsiste eelistusi

E-raamat: Dynamic Documents with R and knitr

(RStudio, Inc. Boston, MA, USA)
  • Formaat - PDF+DRM
  • Hind: 93,59 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Quickly and Easily Write Dynamic Documents

Suitable for both beginners and advanced users, Dynamic Documents with R and knitr, Second Edition makes writing statistical reports easier by integrating computing directly with reporting. Reports range from homework, projects, exams, books, blogs, and web pages to virtually any documents related to statistical graphics, computing, and data analysis. The book covers basic applications for beginners while guiding power users in understanding the extensibility of the knitr package.

New to the Second Edition

  • A new chapter that introduces R Markdown v2
  • Changes that reflect improvements in the knitr package
  • New sections on generating tables, defining custom printing methods for objects in code chunks, the C/Fortran engines, the Stan engine, running engines in a persistent session, and starting a local server to serve dynamic documents

Boost Your Productivity in Statistical Report Writing and Make Your Scientific Computing with R Reproducible

Like its highly praised predecessor, this edition shows you how to improve your efficiency in writing reports. The book takes you from program output to publication-quality reports, helping you fine-tune every aspect of your report.

Arvustused

" a gold mine of ideas: things I had no idea knitr could do (integrate with different languages like Python), and tricks to get around some of the awkward things I needed to do (moving all the code to an appendix for tech-fearful readers). It also explains all the guts of the system and is especially informative about how knitr can cache results of time-intensive calculations, so that they do not have to be rerun each time you compile the document if the precedents have not changed. The book is well written " MAA Reviews, December 2015

Praise for the First Edition:"After reading Dynamic Documents with R and knitr, I became a fan of this package and its flexibility. The book is written in a conversational style that gives a clear and practical introduction to knitr for both beginners and advanced users. Compared with Sweave, knitr is more powerful. Furthermore, knitr is more flexible than Sweave. Most impressively, caching can be incorporated in a simple way by knitr. The book is readable with a clear overall structure. this book allows us to enhance our knowledge of knitrs usage and quickly find what we want." The American Statistician, February 2015

"The book provides a systematic description of the package [ knitr], including its concepts, design principles, and philosophy. It also has many examples, well-thought-out advice, and useful tips and tricks. The book is well written. It has introductory material useful for novices as well as advice for more seasoned users, all explained in conversational English without unnecessary technical jargon. While I have been using Sweave and then knitr for several years, I still learned many new useful things from the book. the book deserves a place on the bookshelves of both new and experienced R and TeX users." Boris Veytsman, TUGboat, Volume 35, 2014

"If you are looking to learn how to use knitr, this book is for you. There are a limited number of resources for learning knitr because the package is relatively new and the documentation produced by Xie is so good. I think this book will continue to be the best resource about knitr easy to understand this is a great read and handy desk reference for the regular knitr user." Journal of Statistical Software, January 2014

"Three recent books have significantly influenced how I use R in reproducible work: Dynamic Documents with R and knitr by Yihui Xie, Reproducible Research with R and RStudio by Christopher Gandrud, and Implementing Reproducible Research edited by Victoria Stodden, Friedrich Leisch, and Roger D. Peng I recommend all three books to R users at any level. There really is something here for everyone." Richard Layton, PhD, PE, Rose-Hulman Institute of Technology, Terre Haute, Indiana, USA

Preface xiii
Author xxi
List of Figures xxiii
List of Tables xxvii
1 Introduction 1(4)
2 Reproducible Research 5(6)
2.1 Literature
5(2)
2.2 Good and Bad Practices
7(2)
2.3 Barriers
9(2)
3 A First Look 11(8)
3.1 Setup
11(1)
3.2 Minimal Examples
12(5)
3.2.1 An Example in LATEX
12(3)
3.2.2 An Example in Markdown
15(2)
3.3 Quick Reporting
17(1)
3.4 Extracting R Code
17(2)
4 Editors 19(8)
4.1 RStudio
19(4)
4.2 LYX
23(2)
4.3 Emacs/ESS
25(1)
4.4 Other Editors
26(1)
5 Document Formats 27(18)
5.1 Input Syntax
27(4)
5.1.1 Chunk Options
28(1)
5.1.2 Chunk Label
29(1)
5.1.3 Global Options
30(1)
5.1.4 Chunk Syntax
30(1)
5.2 Document Formats
31(8)
5.2.1 Markdown
31(4)
5.2.2 LATEX
35(1)
5.2.3 HTML
35(1)
5.2.4 reStructuredText
36(1)
5.2.5 AsciiDoc
36(1)
5.2.6 Textile
37(1)
5.2.7 Customization
37(2)
5.3 Output Renderers
39(4)
5.4 R Scripts
43(2)
6 Text Output 45(14)
6.1 Inline Output
45(1)
6.2 Chunk Output
46(6)
6.2.1 Chunk Evaluation
46(1)
6.2.2 Code Formatting
47(1)
6.2.3 Code Decoration
47(2)
6.2.4 Show/Hide Output
49(2)
6.2.5 Collapse Output
51(1)
6.2.6 Trim Blank Lines
52(1)
6.3 Tables
52(3)
6.4 Automatic Printing
55(1)
6.5 Themes
56(3)
7 Graphics 59(22)
7.1 Graphical Devices
60(4)
7.1.1 Custom Device
60(1)
7.1.2 Choose a Device
60(1)
7.1.3 Device Size
61(1)
7.1.4 More Device Options
61(1)
7.1.5 Encoding
62(2)
7.1.6 The Dingbats Font
64(1)
7.2 Plot Recording
64(5)
7.3 Plot Rearrangement
69(3)
7.3.1 Animation
70(1)
7.3.2 Alignment
71(1)
7.4 Plot Size in Output
72(1)
7.5 Extra Output Options
73(1)
7.6 The tikz() Device
74(2)
7.7 Figure Environment
76(2)
7.8 Figure Path
78(3)
8 Cache 81(10)
8.1 Implementation
81(1)
8.2 Write Cache
82(1)
8.3 When to Update Cache
83(1)
8.4 Side Effects
84(2)
8.5 Chunk Dependencies
86(2)
8.5.1 Manual Dependency
86(1)
8.5.2 Automatic Dependency
87(1)
8.6 Load Cache Manually
88(1)
8.7 Other Options
89(2)
9 Cross Reference 91(8)
9.1 Chunk Reference
91(2)
9.1.1 Embed Code Chunks
91(1)
9.1.2 Reuse Whole Chunks
92(1)
9.2 Code Externalization
93(2)
9.2.1 Labeled Chunks
93(1)
9.2.2 Line-Based Chunks
94(1)
9.3 Child Documents
95(4)
9.3.1 Input Child Documents
95(1)
9.3.2 Child Documents as Templates
96(1)
9.3.3 Standalone Mode
96(3)
10 Hooks 99(12)
10.1 Chunk Hooks
99(4)
10.1.1 Create Chunk Hooks
99(1)
10.1.2 Trigger Chunk Hooks
100(1)
10.1.3 Hook Arguments
101(1)
10.1.4 Hooks and Chunk Options
101(1)
10.1.5 Write Output
102(1)
10.2 Examples
103(8)
10.2.1 Crop Plots
103(2)
10.2.2 rgl Plots
105(1)
10.2.3 Manually Save Plots
106(2)
10.2.4 Optimize PNG Plots
108(1)
10.2.5 Close an rgl Device
109(1)
10.2.6 WebGL
110(1)
11 Language Engines 111(16)
11.1 Design
111(2)
11.1.1 The Engine Function
112(1)
11.1.2 Engine Options
113(1)
11.2 Languages and Tools
113(11)
11.2.1 C++
113(2)
11.2.2 C/Fortran
115(1)
11.2.3 Interpreted Languages
116(2)
11.2.4 Stan
118(2)
11.2.5 TikZ
120(1)
11.2.6 Graphviz
121(1)
11.2.7 Highlight
122(1)
11.2.8 Other Engines
123(1)
11.3 Persistent Sessions
124(3)
12 Tricks and Solutions 127(34)
12.1 Chunk Options
127(4)
12.1.1 Option Aliases
127(1)
12.1.2 Option Templates
128(1)
12.1.3 Program Chunk Options
128(2)
12.1.4 Code in Appendix
130(1)
12.1.5 Local R Options
131(1)
12.1.6 Dynamic Code
131(1)
12.2 Package Options
131(1)
12.3 Typesetting
132(9)
12.3.1 Output Width
132(1)
12.3.2 Message Colors
133(1)
12.3.3 Box Padding
134(1)
12.3.4 Beamer
135(2)
12.3.5 Suppress Long Output
137(1)
12.3.6 Escape Special Characters
138(1)
12.3.7 The Example Environment
139(1)
12.3.8 The Docco Style
140(1)
12.4 Utilities
141(18)
12.4.1 R Package Citation
143(1)
12.4.2 Image URI
144(1)
12.4.3 Upload Images
145(1)
12.4.4 Compile Documents
145(1)
12.4.5 Construct Code Chunks
146(1)
12.4.6 Extract Source Code
147(3)
12.4.7 Reproducible Simulation
150(1)
12.4.8 R Documentation
151(1)
12.4.9 Rst2pdf
151(1)
12.4.10 Package Demos
152(1)
12.4.11 Pretty Printing
152(3)
12.4.12 A Macro Preprocessor
155(1)
12.4.13 Exit Knitting Early
156(1)
12.4.14 Literal knitr Source Code
157(1)
12.4.15 Spell Checking
158(1)
12.5 Debugging
159(1)
12.6 Multilingual Support
160(1)
13 Publishing Reports 161(6)
13.1 RStudio
161(1)
13.2 Pandoc
162(1)
13.3 HTML5 Slides
163(2)
13.4 Jekyll
165(1)
13.5 WordPress
166(1)
14 R Markdown 167(46)
14.1 Overview
167(2)
14.2 Pandoc's Markdown Extensions
169(3)
14.2.1 Basic Syntax
169(3)
14.2.2 YAML Metadata
172(1)
14.3 Output Formats
172(27)
14.3.1 HTML Document
173(11)
14.3.2 LATEX/PDF Document
184(4)
14.3.3 Word Document
188(2)
14.3.4 Markdown Documents
190(1)
14.3.5 ioslides Presentation
191(2)
14.3.6 Slidy Presentation
193(1)
14.3.7 Beamer Presentation
194(4)
14.3.8 Other Formats
198(1)
14.4 Interactive Documents with Shiny
199(4)
14.5 Extending R Markdown v2
203(6)
14.5.1 Templates
204(1)
14.5.2 New Formats
205(3)
14.5.3 HTML Widgets
208(1)
14.6 Changes in R Markdown from v1 to v2
209(4)
15 Applications 213(20)
15.1 Homework
213(4)
15.2 Serve Dynamic Documents
217(2)
15.3 Website and Blogging
219(2)
15.3.1 Vistat and Rcpp Gallery
219(1)
15.3.2 UCLA R Tutorial
220(1)
15.3.3 The cda and RHadoop Wild
220(1)
15.3.4 The ggbio Package
220(1)
15.3.5 Geospatial Data in R and Beyond
221(1)
15.4 Package Vignettes
221(6)
15.4.1 Vignette Metadata and Engines
222(2)
15.4.2 Vignette Examples
224(2)
15.4.3 PDF Vignette
226(1)
15.4.4 HTML Vignette
227(1)
15.5 Books
227(3)
15.5.1 This Book
227(2)
15.5.2 The Analysis of Data
229(1)
15.5.3 The Statistical Sleuth in R
229(1)
15.5.4 Text Analysis with R for Students of Literature
229(1)
15.6 Literate Programming for R Packages
230(3)
16 Other Tools 233(14)
16.1 Sweave
233(5)
16.1.1 Syntax
235(1)
16.1.2 Options
236(1)
16.1.3 Problems
237(1)
16.2 Other R Packages
238(2)
16.3 Python Packages
240(3)
16.3.1 Dexy
241(1)
16.3.2 PythonTEX
241(1)
16.3.3 IPython
242(1)
16.4 More Tools
243(4)
16.4.1 Org-mode
244(1)
16.4.2 SASweave
245(1)
16.4.3 Office
245(2)
Appendix 247(12)
A Internals
247(12)
A.1 Documentation
247(1)
A.2 Closures
248(2)
A.3 Implementation
250(6)
A.3.1 Parser
250(2)
A.3.2 Chunk Hooks
252(1)
A.3.3 Option Aliases
253(1)
A.3.4 Cache
254(1)
A.3.5 Compatibility with Sweave
255(1)
A.3.6 Concordance
255(1)
A.4 Syntax
256(3)
Bibliography 259(6)
Index 265
Yihui Xie is a software engineer at RStudio. He earned a PhD from the Department of Statistics at Iowa State University. His research focuses on interactive statistical graphics and statistical computing. He is an active R user and the author of several award-winning R packages, such as animation, formatR, Rd2roxygen, and knitr. He is also the founder of "Capital of Statistics," a large online statistics community in China.