buildMatrix: Build Ratings Matrix

Description Usage Arguments Details Value Author(s) Examples

Description

Create a new, specified matrix given a data set with three columns in which the rows are the values in the first column of the data set, the columns are the values of the second column of the data set, and the new data is the values of the 3rd column of the data set

Usage

1
buildMatrix(ratingsIn)

Arguments

ratingsIn

Raw data, in (user ID, item ID, rating) format.

Details

The buildMatrix function inputs a user ratings matrix, and returns the ratings matrix, with element (i,j) containing the rating of item j by user i

a new matrix in which the rows, columns, and values of the new matrix are the data first, second, and third column respectively.

Value

A new matrix given the first three columns of data

Author(s)

Pooja Rajkumar

Examples

1
2
d <- rbind(c(1,3,8),c(2,1,3),c(1,4,5))
buildMatrix(d)  # non-0s at (1,3), (1,4), (2,1)

Pooja-Rajkumar/rectools documentation built on May 8, 2019, 2:56 p.m.