Learning R Programming
eBook - ePub

Learning R Programming

Kun Ren

Partager le livre
  1. 582 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Learning R Programming

Kun Ren

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Become an efficient data scientist with R

About This Book

  • Explore the R language from basic types and data structures to advanced topics
  • Learn how to tackle programming problems and explore both functional and object-oriented programming techniques
  • Learn how to address the core problems of programming in R and leverage the most popular packages for common tasks

Who This Book Is For

This is the perfect tutorial for anyone who is new to statistical programming and modeling. Anyone with basic programming and data processing skills can pick this book up to systematically learn the R programming language and crucial techniques.

What You Will Learn

  • Explore the basic functions in R and familiarize yourself with common data structures
  • Work with data in R using basic functions of statistics, data mining, data visualization, root solving, and optimization
  • Get acquainted with R's evaluation model with environments and meta-programming techniques with symbol, call, formula, and expression
  • Get to grips with object-oriented programming in R: including the S3, S4, RC, and R6 systems
  • Access relational databases such as SQLite and non-relational databases such as MongoDB and Redis
  • Get to know high performance computing techniques such as parallel computing and Rcpp
  • Use web scraping techniques to extract information
  • Create RMarkdown, an interactive app with Shiny, DiagramR, interactive charts, ggvis, and more

In Detail

R is a high-level functional language and one of the must-know tools for data science and statistics. Powerful but complex, R can be challenging for beginners and those unfamiliar with its unique behaviors. Learning R Programming is the solution - an easy and practical way to learn R and develop a broad and consistent understanding of the language. Through hands-on examples you'll discover powerful R tools, and R best practices that will give you a deeper understanding of working with data. You'll get to grips with R's data structures and data processing techniques, as well as the most popular R packages to boost your productivity from the offset.

Start with the basics of R, then dive deep into the programming techniques and paradigms to make your R code excel. Advance quickly to a deeper understanding of R's behavior as you learn common tasks including data analysis, databases, web scraping, high performance computing, and writing documents. By the end of the book, you'll be a confident R programmer adept at solving problems with the right techniques.

Style and approach

Developed to make learning easy and intuitive, this book comes packed with a wide variety of statistical and graphical techniques and a wealth of practical information for anyone looking to get started with this exciting and powerful language.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Learning R Programming est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Learning R Programming par Kun Ren en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Informatik et Softwareentwicklung. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2016
ISBN
9781785889776
Édition
1

Learning R Programming


Learning R Programming

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2016
Production reference: 1181016
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-977-6
www.packtpub.com

Credits

Author
Kun Ren
Copy Editor
Karuna Narayanan
Reviewer
Kelly Black
Project Coordinator
Izzat Contractor
Commissioning Editor
Akram Hussain
Proofreader
Safis Editing
Acquisition Editor
Denim Pinto
Indexer
Tejal Daruwale Soni
Content Development Editor
Rohit Kumar Singh
Graphics
Kirk D'Penha
Disha Haria
Jason Monteiro
Technical Editor
Vivek Pala
Production Coordinator
Melwyn D'sa

About the Author

Kun Ren has used R for nearly 4 years in quantitative trading, along with C++ and C#, and he has worked very intensively (more than 8-10 hours every day) on useful R packages that the community does not offer yet. He contributes to packages developed by other authors and reports issues to make things work better. He is also a frequent speaker at R conferences in China and has given multiple talks. Kun also has a great social media presence. Additionally, he has substantially contributed to various projects, which is evident from his GitHub account:
  • https://github.com/renkun-ken
  • https://cn.linkedin.com/in/kun-ren-76027530
  • http://renkun.me/
  • http://renkun.me/formattable/
  • http://renkun.me/pipeR/
  • http://renkun.me/rlist/
I would like to thank my wife, who encouraged me to start working on this book a year ago, and my parents, who support me with unconditional love. I would also like to express my gratitude to the editors, Rohit Kumar Singh, Vivek Pala, and those who also worked hard on this book. They did a great job making the writing and publishing smooth.

About the Reviewer

Kelly Black is a member of the department of mathematics at the University of Georgia. His focus is stochastic differential equations, and he makes use of statistical software in a wide range of contexts, ranging from data analysis from Monte Carlo simulations to educational assessment.
I am grateful for the kindness and patience of Izzat Contractor, who helped guide the final production of this book.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Preface

R is designed for statistical computing, data analysis, and visualization. In recent years, it has become the most popular language for data science and statistics. R programming heavily involves data processing and it can be a challenge to program in R for those who are unfamiliar with the behaviors of the R language.
As a dynamic language, R allows extremely flexible use of data structures that are not as strict as compiled languages, such as C++, Java, and C#. When I started using R to process and analyze data, I found R’s behavior quirky, unpredictable, and sometimes very inconsistent.
In those data analysis projects, most effort was not spent running models. Instead, data cleaning, wrangling, and visualization took a major part of my time. In fact, it is most time consuming to find what’s wrong with the code that produced weird results or died in unexpected errors. Dealing with programming rather than field problems can be frustrating, especially when you have fought against bugs for hours without a clue.
However, as I work on more projects and gain more experience, I gradually know more about the behavior of objects and functions, and find that R is much more beautiful and consistent than I thought. That’s why I've written this book—to share my perspective on programming in R.
Through this book, you will develop a universal and consistent understanding of R as a programming language along with its vast set of tools. You will learn the best practices to boost your productivity, develop a deeper understanding of working with data, and become more confident about programming in R and solving problems with the right techniques.

What this book covers

Chapter 1, Quick Start, discusses a few basic facts about R, how to deploy an R environment, and how to code in RStudio.
Chapter 2, Basic Objects, introduces basic R objects and their behaviors.
Chapter 3, Managing Your Workspace, introduces the methods of managing the working directory, R environment, and the library of extension packages.
Chapter 4, Basic Expressions, covers the basic expressions of the R language: assignment, condition, and loop.
Chapter 5, Working with Basic Objects, discusses the basic functions each analyst should know in order to work with basic objects in R.
Chapter 6, Working with Strings, talks about R objects related with strings, and a number of string manipulation techniques.
Chapter 7, Working with Data, explains simple read/write data functions with some practical examples on various topics using basic objects and functions.
Chapter 8, Inside R, discusses R’s evaluation model by introducing what lazy evaluation, environment, function, and lexical scoping work is.
Chapter 9, Metaprogramming, introduces the metaprogramming techniques to help understand language objects and nonstandard evaluation.
Chapter 10, Object-Oriented Programming, describes the numerous object-oriented programming systems in R: S3, S4, RefClass, and community-provided R6.
Chapter 11, Working with Databases, shows how R works with popular relational databases such as SQLite and MySQL, and non-relational databases such as MongoDB and Redis.
Chapter 12, Data Manipulation, introduces techniques of manipulating relational data using data.table and dplyr, and non-relational data using rlist.
Chapter 13, High Performance Computing, discusses performance issues in R and several methods to boost computing performance.
Chapter 14, Web Scraping, talks about the basic structure of web pages, CSS, and XPath selectors and how to use the rvest package to scrape data from simple web pages.
Chapter 15, Boosting Productivity, demonstrates how R Markdown an...

Table des matiĂšres