To answer my own question, I wrote a small package in R for RBMs: https://github.com/zachmayer/rbm
This package is still under heavy development, and I know very little about RBMs, so I'd welcome any feedback (and pull requests!) you have. You can install the package using devtools:
devtools:::install_github('zachmayer/rbm')
library(rbm)
?rbm
?rbm_gpu
?stacked_rbm
The code is similar to Andrew Landgraf's implementation in R and Edwin Chen's implementation in python, but I wrote the function to be similar to the pca function in base R and include functionality for stacking. I think it's a little more user-friendly than the darch package, which I could never figure out how to use (even before it was removed from CRAN).
If you have the gputools package installed you can use your GPU for matrix operations with the rbm_gpu function. This speeds things up a lot! Furthermore, most of the work in an RBM is done with matrix operations, so just installing a good BLAS, such as openBLAS will also speed things up a lot.
Here's what happens when you run the code on Edwin's example dataset:
set.seed(10)
print('Data from: https://github.com/echen/restricted-boltzmann-machines')
Alice <- c('Harry_Potter' = 1, Avatar = 1, 'LOTR3' = 1, Gladiator = 0, Titanic = 0, Glitter = 0) #Big SF/fantasy fan.
Bob <- c('Harry_Potter' = 1, Avatar = 0, 'LOTR3' = 1, Gladiator = 0, Titanic = 0, Glitter = 0) #SF/fantasy fan, but doesn't like Avatar.
Carol <- c('Harry_Potter' = 1, Avatar = 1, 'LOTR3' = 1, Gladiator = 0, Titanic = 0, Glitter = 0) #Big SF/fantasy fan.
David <- c('Harry_Potter' = 0, Avatar = 0, 'LOTR3' = 1, Gladiator = 1, Titanic = 1, Glitter = 0) #Big Oscar winners fan.
Eric <- c('Harry_Potter' = 0, Avatar = 0, 'LOTR3' = 1, Gladiator = 1, Titanic = 0, Glitter = 0) #Oscar winners fan, except for Titanic.
Fred <- c('Harry_Potter' = 0, Avatar = 0, 'LOTR3' = 1, Gladiator = 1, Titanic = 1, Glitter = 0) #Big Oscar winners fan.
dat <- rbind(Alice, Bob, Carol, David, Eric, Fred)
#Fit a PCA model and an RBM model
PCA <- prcomp(dat, retx=TRUE)
RBM <- rbm_gpu(dat, retx=TRUE, num_hidden=2)
#Examine the 2 models
round(PCA$rotation, 2) #PCA weights
round(RBM$rotation, 2) #RBM weights