I stumbled upon text2vec package, it implements word embeddings in R. I have been experimenting with it successfully. However, I have been trying implement word vectors onto each document exactly like i found in H2O(python) here https://github.com/h2oai/h2o-tutorials/blob/master/h2o-world-2017/nlp/AmazonReviews.ipynb
In line 21 of this tutorial, the word vectors are averaged and then used as features into a model.
I believe the question is not so much about the code, its about the how can we take the word vectors and assign it to each document. So that they could be fed as features, I am simply following the tutorials mentioned here. http://text2vec.org/glove.html