inst/testRecommend3.R

library(jsonlite)
library(recommenderlab)

source("R/getRecommendations.R")
load("data/recommender.rda")

jsondata <- '{"moviesArray" : [126, 156, 566, 1333, 1660, 2126, 3126, 4126, 5126, 6126, 7126, 8000, 8007, 8100, 8200, 8300, 8310, 8320, 8330] ,  "ratingsArray" : [5,3,2,4,5,3,2,5,3,1,5,3,3,4,5,4,5,1,4] }'

args <- fromJSON(jsondata)
output <- do.call(getRecommendations, args)
toJSON(output)
paulij/recommendMovies documentation built on May 24, 2017, 1:40 a.m.