Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Simulating the client data

Now that we have gone through the sales data simulation and we have the necessary fundamentals, the rest of the data simulation will be much easier. Furthermore, we will use many of the functions we created before to simulate the client and client messages data, which is great! Reusing functions like this is very efficient, and over time you will get into the habit of doing so. You will build your own collection of reusable code, which will make you increasingly more efficient when programming.

We start by defining the data frame we will use, just as we did before. In this case we will have the CLIENT_ID, BIRTH_DATE, CLIENT_SINCE, GENDER, and STARS variables. The STARS represent a rating between 1 (bad) and 5 (excellent): ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content