library(dslabs)Warning: package 'dslabs' was built under R version 4.6.1
library(dplyr)Warning: package 'dplyr' was built under R version 4.6.1
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(ggplot2)
# data(package = "dslabs")
# list.files(system.file("script", package = "dslabs"))
data("movielens")
head(movielens) movieId title year
1 31 Dangerous Minds 1995
2 1029 Dumbo 1941
3 1061 Sleepers 1996
4 1129 Escape from New York 1981
5 1172 Cinema Paradiso (Nuovo cinema Paradiso) 1989
6 1263 Deer Hunter, The 1978
genres userId rating timestamp
1 Drama 1 2.5 1260759144
2 Animation|Children|Drama|Musical 1 3.0 1260759179
3 Thriller 1 3.0 1260759182
4 Action|Adventure|Sci-Fi|Thriller 1 2.0 1260759185
5 Drama 1 4.0 1260759205
6 Drama|War 1 2.0 1260759151