Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

Getting ready

Recall that you have created several R objects in the prior recipes, such as vector, matrix, data frame, and array. Now, you are in a position to create another single R object that could contain all the objects that you have already created and then want to access those as needed. To get ready for this recipe, let's re-run those lines of code and create those objects again:

    cVec <- c("Cricket", "Football", "Basketball", "Rugby")    nVec <- c(1:10)    Lvec <- c(TRUE, FALSE, FALSE, TRUE)    matA <- matrix(1, nrow=2, ncol=2)    datA <- data.frame(ID = 1:5, hourSpetOnInternet = c(5,3,4,1,2),      GENDER = c("M", "F", "F", "M", "F"))    arrayA <- array(1:16, dim=c(2,2,4))

In this recipe, you will organize these heterogeneous objects into a single ...

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

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content