O'Reilly logo

R Data Analysis Cookbook - Second Edition by Kuntal Ganguly

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

First, create and save the R objects interactively, as shown in the following code. Make sure you have write access to the R working directory.

> customer <- c("John", "Peter", "Jane") > orderdate <- as.Date(c('2014-10-1','2014-1-2','2014-7-6')) > orderamount <- c(280, 100.50, 40.25) > order <- data.frame(customer,orderdate,orderamount) > names <- c("John", "Joan") > save(order, names, file="test.Rdata") > saveRDS(order,file="order.rds") > remove(order) 

After saving the preceding code, the remove() function deletes the object from the current session.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required