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

We will be using the ml-100k dataset from the MovieLens website (https://grouplens.org/datasets/movielens/ ) in this recipe.

  1. First, download the movieTitle data:
> movie_URL <- "http://files.grouplens.org/datasets/movielens/ml-100k/u.item" 
> movieTitleDF <- read.table(movie_URL, header = F, sep = "|", quote = "\"") 
 
  1. Next, download the user-rating data:
> users_URL <- "http://files.grouplens.org/datasets/movielens/ml-100k/u.data" 
> userDF <- read.table(users_URL, header = F, sep = "\t", quote = "\"")

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