'Error with missing training data file while running paragraph2vec in r - solutions?

I am trying to run the paragraph2vec function in the doc2vec package in R on a set of Tweets, something that I have done successfully multiple times before, and I suddenly got the following error:

Error in paragraph2vec_train(trainFile = file_train, embeddings = embeddings,  : 
  ERROR: training data file not found!
Warning message:
In file.remove(file_train) :
  cannot remove file 'C:\Users\ANDERS~1.GRA\AppData\Local\Temp\Rtmp4QsZ8i\textspace_635417446397.txt', reason 'Permission denied'

I am pretty confused as to why I am getting the error. I've tried restarting the session multiple times and reinstalling both word2vec and doc2vec packages, but to no avail. The code I used is as follows:

model <- paragraph2vec(x = db1, type = "PV-DBOW",   dim = 50,  iter = 5)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source