𝔖 Scriptorium
✦   LIBER   ✦

📁

R 4 Quick Syntax Reference: A Pocket Guide to the Language, API’s and Library

✍ Scribed by M. Tollefson


Year
2022
Tongue
English
Leaves
602
Edition
3
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Table of Contents


Table of Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Part I: R Basics
Chapter 1: Downloading R and RStudio and Setting Up a File System
Downloading R and RStudio
The Windows Systems
The macOS Systems
The Linux Systems
RStudio
Installing and Updating Packages
The Windows Systems
The macOS Systems
The Linux Systems
Updating R
All Systems
The macOS Systems
Using R in Separate Folders
Projects in RStudio
The Windows Systems
The macOS Systems
The Linux Systems
Chapter 2: The R Prompt and the RStudio Main Menus and Subwindows
The Three Parts of R: Objects, Operators, and Assignments
The R Prompt
An Example of a Calculation
The Main Menus and the Four Subwindows in RStudio
The Main Menus
The First Subwindow
The Second Subwindow
The Third Subwindow
The Fourth Subwindow
Chapter 3: Assignments and Operators
Types of Assignment
Example of Three Types of Assignment
Listing and Removing Objects in RStudio and R
Operators
Logical Operators and Functions
Arithmetic Operators
Matrix Operators and Functions
Relational Operators
Subscripting Operators
Vectors
Matrices
Arrays
Lists
Other Types
Odds and Ends
Part II: Kinds of Objects
Chapter 4: Types and Modes of Objects
Overview of the Types and Modes
Commonly Used Types
Atomic, Recursive, Language, and S4 Kinds
Some Functions for the Atomic Kind of Types
The NULL Type
The Raw Type
The Logical Type
The Integer or Double Types and the Numeric Mode
The Complex Type
The Character Type
The Common Recursive Kind of Types
The List Type
The Closure, Special, and Builtin Types
The Environment Type
The S4 Type
The Less Common Types
The Language Kind of Objects
Notes
Chapter 5: Classes of Objects
Some Basics on Classes
Vectors
Some Common S3 Classes
The Matrix Class: matrix
The Array Class: array
Names for Vectors, Matrices, Arrays, and Lists
The Data Frame Class: data.frame
The Time Series Classes: ts and mts
The Factor Classes: factor and ordered
The Date and Time Classes: Date, POSIXct, POSIXlt, and difftime
The Formula Class: formula
The S4 Class
Reference Classes
Part III: Functions
Chapter 6: Packaged Functions
The Libraries
Loading and Removing Packages
Default Packages and Primitive Functions
Using the Help Pages
Identifier
Title
Description
Usage
Arguments
Details
Value
Some Other Optional Sections
References
See Also
Examples
Chapter 7: Scripts, User-Created Functions, and S4 and Reference Class Methods
Scripts
The Structure of a Function
How to Enter a Function into R
In RStudio
Using an Editor
Inline Entry
An Outside Editor: dget() and Copying and Pasting
S4 Methods
Reference Class Methods
Chapter 8: How to Use a Script or Function
Example of a Script: Mining Twitter
Calling a Function
Arguments
The Output from a Function
Part IV: I/O and Manipulating Objects
Chapter 9: Importing and Creating Data
Reading Data into RStudio and R, Including R Datasets
Connections
file()
url()
gzfile(), bzfile(), and xzfile()
unz()
pipe()
fifo()
socketConnection(), serverSocket(), and serverAccess()
The Other Arguments to the Connection Functions
open(), close(), isOpen(), isIncomplete(), and socketTimeout0()
showConnections(), getConnections(), and closeAllConnections()
stdin(), nullfile(), and isatt()
make.socket(), gzcon(), and pushback()
seek(), isSeekable(), and truncate()
Reading Data Using RStudio
The scan() Function
The read.table() and Related Functions
The readLines(), read.socket(), readClipboard(), and readline() Functions
The dget() and source() Functions
The loadhistory() Function
Some Other Functions That Read Textual Data
The load() and attach() Functions
The readRDS() Function
The readBin(), readChar(), and unserialize() Functions
R Datasets and the library(), attach(), and data() Functions
Probability Distributions and the Function sample()
Probability Distributions
The sample() Function
Manually Entering Data and Generating Data with Patterns
The c() Function
The seq() and rep() Functions
The seq() Function
The rep() Function
Combinatorics and Grid Expansion
The paste() and paste0() Functions
Chapter 10: Exporting from R
Connection Functions That Write
The sink() Function
The cat() and write() Functions
The write.table() and Related Functions
The writeLines(), write.socket(), and writeClipboard() Functions
The dput() and dump() Functions
The savehistory() Function
The save() and save.image() Functions
The saveRDS() Function
The writeBin(), writeChar(), and serialize() Functions
Matching Importing and Exporting Functions
Other Exporting Functions
Chapter 11: Descriptive Functions and Manipulating Objects
Descriptive Functions
The dim() Function
The nrow(), ncol(), NROW(), and NCOL() Functions
The length() Function
The nchar() and nzchar() Functions
Manipulating Objects
The cbind(), rbind(), cbind2(), and rbind2() Functions
The Apply Functions
The apply() Function
The lapply(), sapply(), vapply(), and rapply() Functions
The lapply() Function
The sapply() Function
The vapply() Function
The rapply() Function
The tapply() Function
The mapply() Function
The eapply() Function
The sweep() and scale() Functions
The sweep() Function
The scale() Function
The aggregate(), table(), tabulate(), and ftable() Functions
The aggregate() Function
Data Frames
Formulas
Time Series
The table(), as.table(), and is.table() Functions
The tabulate() Function
The ftable() Function
Some Character String Functions
The grep Functions
Functions to Manipulate Case in Character Strings
The substr(), substring(), and strsplit() Functions
Part V: Flow Control
Chapter 12: Flow Control
Brackets “{}” and the Semicolon “;”
The “if” and “if/else” Control Statements
The “while” Control Statement
The “for” Control Statement
The “repeat” Control Statement
The Statements “break” and “next”
Nesting
Chapter 13: Examples of Flow Control
Nested “for” Loops with an “if/else” Statement
Using Indices
A “while” Loop
Using Indices
Nested “for” Loops
Using Indices
A “for” Loop, “if” Statement, and “next” Statement
Using Indices
A “for” Loop, a “repeat” Loop, an “if” Statement, and a “break” Statement
Using Indices
Chapter 14: The ifelse() and switch() Functions
The ifelse() Function
The switch() Function
Part VI: Some Common Functions, Packages, and Techniques
Chapter 15: Some Common Functions
The options() Function
The round(), signif(), and noquote() Functions
The round() Function
The signif() Function
The noquote() Function
The format(), print(), and plot() Functions
The format() Function
The print() Function
The plot() Function
The eval(), attributes(), attr(), and summary() Functions
The eval() Function
The attributes() and attr() Functions
The summary() Function
The deriv(), numericDeriv(), and integrate() Functions
The deriv() and Related Functions
The numericDeriv() Function
The integrate() Function
The parse() and deparse() Functions
The parse() Function
The deparse() Function
Some Functions for Models: anova(), coef(), effects(), residuals(), fitted(), vcov(), confint(), and predict()
Chapter 16: The base, stats, and graphics Packages
The base Package
Reserved Words
Built-in Constants
Trigonometric and Hyperbolic Functions
Exponential and Log Functions
Beta- and Gamma-Related Functions
Miscellaneous Mathematical Functions
Complex Numbers
Matrices, Arrays, and Data Frames
A Few Other Functions and Some Comments
The stats Package
Basic Descriptive Statistics
Some Functions That Do Tests
Some Modeling Functions in stats
Clustering Algorithms and Other Multivariate Techniques
The graphics Package
Chapter 17: Tricks of the Trade
Value Substitution: NA, NaN, Inf, and –Inf
If Statements and Logical Vectors
Lists and the Functions list() and c()
Paths and URLs
Editing Objects Like Matrices and Data Frames
A Bit More
Recursive Functions
Some Final Comments
Index


📜 SIMILAR VOLUMES


R 4 Quick Syntax Reference: A Pocket Gui
✍ Margot Tollefson 📂 Library 📅 2022 🏛 Apress 🌐 English

<span>This handy reference book detailing the intricacies of R covers version 4.x features, including numerous and significant changes to syntax, strings, reference counting, grid units, and more.<br><br>Starting with the basic structure of R, the book takes you on a journey through the terminology

R Quick Syntax Reference: A Pocket Guide
✍ Margot Tollefson 📂 Library 📅 2019 🏛 Apress 🌐 English

<p>This handy reference book detailing the intricacies of R updates the popular first edition by adding R version 3.4 and 3.5 features. Starting with the basic structure of R, the book takes you on a journey through the terminology used in R and the syntax required to make R work. You will find look

R Quick Syntax Reference: A Pocket Guide
✍ Margot Tollefson 📂 Library 📅 2019 🏛 Apress 🌐 English

This handy reference book detailing the intricacies of R updates the popular first edition by adding R version 3.4 and 3.5 features. Starting with the basic structure of R, the book takes you on a journey through the terminology used in R and the syntax required to make R work. You will find looking

Haskell Quick Syntax Reference: A Pocket
✍ Stefania Loredana Nita, Marius Mihailescu 📂 Library 📅 2019 🏛 Apress 🌐 English

This condensed code and syntax reference presents the essential Haskell syntax in a well-organized format that can be used as a quick and handy reference, including applications to cloud computing and data analysis. This book covers the functional programming features of Haskell as well as strong st

C# 10 Quick Syntax Reference: A Pocket G
✍ Mikael Olsson 📂 Library 📅 2022 🏛 Apress 🌐 English

<span>Discover what's new in C# and .NET for Windows programming. This book is a condensed code and syntax reference to the C# programming language, updated with the latest features of version 10 for .NET 6. <div><br></div><div>You'll review the essential C# 10 and earlier syntax, not previously cov