Skip to main content
  • Book
  • © 2021

CRAN Recipes

DPLYR, Stringr, Lubridate, and RegEx in R

Apress

Authors:

  • The first developer and analyst code cookbook on CRAN
  • Includes code and examples applicable to many disciplines
  • Written in everyday language with a minimum of complexity

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (21 chapters)

  1. Front Matter

    Pages i-xxi
  2. DPLYR

    • William Yarberry
    Pages 1-58
  3. Stringr

    • William Yarberry
    Pages 59-107
  4. Lubridate: Date and Time Processing

    • William Yarberry
    Pages 109-160
  5. Regular Expressions: Introduction

    • William Yarberry
    Pages 161-164
  6. Typical Uses

    • William Yarberry
    Pages 165-173
  7. Some Simple Patterns

    • William Yarberry
    Pages 175-181
  8. Character Classes

    • William Yarberry
    Pages 183-190
  9. Elements of Regular Expressions

    • William Yarberry
    Pages 191-206
  10. The Magnificent Seven

    • William Yarberry
    Pages 207-217
  11. Regular Expressions in Stringr

    • William Yarberry
    Pages 219-220
  12. Unicode

    • William Yarberry
    Pages 221-222
  13. Tools for Development and Resources

    • William Yarberry
    Pages 223-233
  14. RegEx Summary

    • William Yarberry
    Pages 235-235
  15. Recipes for Common R Tasks

    • William Yarberry
    Pages 237-239
  16. Data Structures

    • William Yarberry
    Pages 241-242
  17. Visualization

    • William Yarberry
    Pages 243-267
  18. Simple Prediction Methods

    • William Yarberry
    Pages 269-275
  19. Smorgasbord of Simple Statistical Tests

    • William Yarberry
    Pages 277-299
  20. Validation of Data

    • William Yarberry
    Pages 301-302

About this book

Want to use the power of R sooner rather than later? Don’t have time to plow through wordy texts and online manuals? Use this book for quick, simple code to get your projects up and running. It includes code and examples applicable to many disciplines. Written in everyday language with a minimum of complexity, each chapter provides the building blocks you need to fit R’s astounding capabilities to your analytics, reporting, and visualization needs.  

CRAN Recipes recognizes how needless jargon and complexity get in your way. Busy professionals need simple examples and intuitive descriptions; side trips and meandering philosophical discussions are left for other books.  

Here R scripts are condensed, to the extent possible, to copy-paste-run format. Chapters and examples are structured to purpose rather than particular functions (e.g., “dirty data cleanup” rather than the R package name “janitor”). Everyday language eliminatesthe need to know functions/packages in advance. 

What You Will Learn

  • Carry out input/output; visualizations; data munging; manipulations at the group level; and quick data exploration
  • Handle forecasting (multivariate, time series, logistic regression, Facebook’s Prophet, and others)
  • Use text analytics; sampling; financial analysis; and advanced pattern matching (regex)
  • Manipulate data using DPLYR: filter, sort, summarize, add new fields to datasets, and apply powerful IF functions
  • Create combinations or subsets of files using joins
  • Write efficient code using pipes to eliminate intermediate steps (MAGRITTR)
  • Work with string/character manipulation of all types (STRINGR)
  • Discover counts, patterns, and how to locate whole words
  • Do wild-card matching, extraction, and invert-match
  • Work with dates using LUBRIDATE
  • Fix dirty data; attractive formatting; bad habits to avoid


Who This Book Is For 

Programmers/data scientists with at least some prior exposure to R.


Authors and Affiliations

  • Kingwood, USA

    William Yarberry

About the author

William A. Yarberry, Jr., CPA, CISA, is principal consultant, ICCM Consulting LLC, based in Houston, Texas. His practice is focused on IT governance, Sarbanes-Oxley compliance, security consulting, and business analytics for cost management. He was previously a senior manager with PricewaterhouseCoopers, responsible for telecom and network services in the Southwest region. Yarberry has more than 30 years’ experience in a variety of IT-related services, including application development, internal audit management, outsourcing administration, and Sarbanes-Oxley consulting.

His books include The Effective CIO (co-authored), Computer Telephony Integration, $250K Consulting, DPLYR, 50,000 Random Numbers, Telecommunications Cost Management, and GDPR: A Short Primer. In addition, he has written over 20 professional articles on topics ranging from wireless security to change management. One of his articles, "Audit Rights in anOutsource Environment," received the Institute of Internal Auditors Outstanding Contributor Award.

Prior to joining PricewaterhouseCoopers, Yarberry was director of telephony services for Enron Corporation. He was responsible for operations, planning, and architectural design for voice communications servers and related systems for more than 7,000 employees. Yarberry graduated Phi Beta Kappa in chemistry from the University of Tennessee and earned an MBA at the University of Memphis. He enjoys reading history, swimming, hiking, and spending time with family.


Bibliographic Information

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access