set.seed(123) # this is a randomized algorithm
trainset = system.file("dat", "smalltrain.txt", package = "recosystem")
testset = system.file("dat", "smalltest.txt", package = "recosystem")
r = Reco()
r$convert_train(trainset)
r$convert_test(testset)
r$train(opts = list(dim = 10))
P = tempfile()
Q = tempfile()
r$output(P, Q)
## Inspect these two matrices
head(read.table(P, header = FALSE, sep = ""))
head(read.table(Q, header = FALSE, sep = ""))
Run the code above in your browser using DataLab