Philippe J. S. De Brouwer - The Big R-Book

Здесь есть возможность читать онлайн «Philippe J. S. De Brouwer - The Big R-Book» — ознакомительный отрывок электронной книги совершенно бесплатно, а после прочтения отрывка купить полную версию. В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Жанр: unrecognised, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

The Big R-Book: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «The Big R-Book»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

Introduces professionals and scientists to statistics and machine learning using the programming language R Written by and for practitioners, this book provides an overall introduction to R, focusing on tools and methods commonly used in data science, and placing emphasis on practice and business use. It covers a wide range of topics in a single volume, including big data, databases, statistical machine learning, data wrangling, data visualization, and the reporting of results. The topics covered are all important for someone with a science/math background that is looking to quickly learn several practical technologies to enter or transition to the growing field of data science. 
The Big R-Book for Professionals: From Data Science to Learning Machines and Reporting with R Provides a practical guide for non-experts with a focus on business users Contains a unique combination of topics including an introduction to R, machine learning, mathematical models, data wrangling, and reporting Uses a practical tone and integrates multiple topics in a coherent framework Demystifies the hype around machine learning and AI by enabling readers to understand the provided models and program them in R Shows readers how to visualize results in static and interactive reports Supplementary materials includes PDF slides based on the book’s content, as well as all the extracted R-code and is available to everyone on a Wiley Book Companion Site
is an excellent guide for science technology, engineering, or mathematics students who wish to make a successful transition from the academic world to the professional. It will also appeal to all young data scientists, quantitative analysts, and analytics professionals, as well as those who make mathematical models.

The Big R-Book — читать онлайн ознакомительный отрывок

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «The Big R-Book», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

S

R is a modern language with a rather short history. In 1992, the R-project was started by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand. The first version was available in 1995 and the first stable version was available in 2000.

Now, the R Development Core Team (of which Chambers is a member) develops R further and maintains the code. Since a few years Microsoft has embraced the project and provides MRAN (Microsoft R Application Network). This package is also free and open source software (FOSS) and has some advantages over standard R such as enhanced performance (e.g. multi-thread support, the checkpoint package that makes results more reproducible).

FOSS

Essentially, R is …

a programming language built for statistical analysis, graphics representation and reporting;

an interpreted computer language which allows branching, looping, modular programming as well as object and functional oriented programming features.

R offers its users …

integration with the procedures written in the C, C++, .Net, Python, or FORTRAN languages for efficiency;

C

C++

.Net

Fortran

zero purchase cost (available under the GNU General Public License), and pre-compiled binary versions are provided for various operating systems like Linux, Windows, and Mac;

Linux

Windows

Mac

simplicity and effectiveness;

a free and open environment;

an effective data handling and storage facility;

a suite of operators for calculations on arrays, lists, vectors, and matrices;

a large, coherent, and integrated collection of tools for data analysis;

graphical facilities for data analysis and display either directly at the computer or printing;

a supportive on-line community;

the ability for you to stand on the shoulders of giants (e.g. by using libraries).

R is arguably the most widely used statistics programming language and is used fromuniversities to business applications, while it still gains rapidly in popularity.

картинка 11Hint – Getting more help

If at any point you are trying to solve a particular issues and you are stuck, the online community will be very helpful. To get unstuck, do the following:

First, look up your problems by adding the keyword “R” in the search string. Most probably, someone else encountered the very same problem before you, and the answer is already posted. Avoid to post a question that has been answered before.

If you need to ask your question in a forum such as for example www.stackexchange.comthen you will need to add a minimal reproducible example. The package reprex can help you to do just that.

4.1 Getting Started with R

Before we can start, we need a working installation of R on our computer. On Linux, this can be done via the command line. On Debian and its many derivatives such as Ubuntu or Mint, this looks as follows: 1

installing R

sudo apt-get install r-base

On Windows or Mac, you want to refer to https://cran.r-project.organd download the right package for your system.

To start R, open the command line and type R(followed by enter). This is the R interpreter (or R console). You can do all your data crunching here. To leave the environment type q()followed by [enter].

картинка 12Hint – Using R Online

It is also possible to use R online:

https://www.tutorialspoint.com/execute_r_online.php

http://www.r-fiddle.org

RStudio

For the user, who is not familiar with the command line, it is highly recommendable to use an IDE, such as RStudio (see https://www.rstudio.com). Later on – for example in Chapter 32“ R Markdown ” on page 879 – we will see that RStudio has some unique advantages over the R-console in store, that will convince even the most traditional command-line-users.

IDE

RStudio

Whether you use standard R or MRAN, using RStudio will enhance your performance and help you to be more productive.

MRAN

Rstudio is an integrated development environment (IDE) for R and provides a console, editor with syntax-highlighting, a window to show plots and some workspace management.

IDE

integrated development environment

картинка 13Hint – RStudio is free

Rstudio can be downloaded from https://www.rstudio.comfor free.

RStudio is also in the repositories of most Linux distributions. That means that there is no need to go to the website or RStudio, but it is possible to download R, and install it with just one line in the CLI of your OS. For example, in Debian and its derivatives, this would be:

# Note that the first 2 lines are just to make sure that # you are using the latest version of the repository. sudo apt-get update sudo apt-get upgrade # Install RStudio: sudo apt-get install rstudio

This process is very simple: provide your admin password and the script will take care of everything. Then use your preferred way to start the new software. R can be started by typing Rin the command prompt and RStudio will launch with the command rstudio.

An important note is that RStudio will work with the latest version of R that is installed. Also when you install MRAN, RStudio will automatically load this new version.

Basic arithmetic

The basic operators work as one would expect. Simply type in the R terminal 2+3followed by ENTERand R will immediately display the result.

addition product power

#addition2 +3 #product2 *3 #power2 **3 2 ∧3 #logic2 <3 x <- c(1,3,4,3) x.mean <- mean(x) x.mean y <- c(2,3,5,1) x +y

картинка 14Hint – White space

Usually, white space is not important for R.

For example, mean ( c (c + pi, 2 ) )will do exactly the same as mean(c(1+pi,2)). However, it is a good habit to add a white space before and after operators and after the comma. This will improve readability, which makes the debugging process easier and is helpful for other people who want to read your code.

Editing variables interactively

To create a variable x, type:

scan()

x <- scan()

will start an interface that invites you to type all values of the vector one by one.

In order to get back to the command prompt: type enter without typing a number (ie. leave one empty to end).

картинка 15Further information – Other ways to import data

This is only one of the many ways to get data into R. Most probably you will use a mix of defining variables in the code and reading in data from files. See for example Chapter 15“ Connecting R to an SQL Database ” on page 327.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «The Big R-Book»

Представляем Вашему вниманию похожие книги на «The Big R-Book» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «The Big R-Book»

Обсуждение, отзывы о книге «The Big R-Book» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x