0

I'm trying to read an EPUB file in r. It is placed in the working directory. I wrote this code:

library(epubr)
library(tm)
x <- epub("Perchisuonalacampana.epub") # parse entire e-book

But I obtained the following error:

Error in file.exists(path) : 
 file name conversion problem -- name too long?

(My EPUB file contains a novel.)

EDIT

getwd()
[1] "C:/Users/Standard/Downloads/aaa"
list.files()
[1] "dtm from pdf.R"            "Perchisuonalacampana.epub"
Mark
  • 1,577
  • 16
  • 43

1 Answers1

0

From these two sources (they are nearly the same):

  1. rdocumentation.org
  2. docs.ropensci.org

It seems as though you need to do add the system.file():

library(epubr)
library(tm)

file <- system.file("Perchisuonalacampana.epub", package = "epubr")
x <- epub(file) # parse entire e-book

Not sure if these help any more but here are two more sources for a slightly different approach:

  1. docs.ropensci.org
  2. rdrr.io
Jacob Hornbeck
  • 398
  • 2
  • 19