r - 在 R 中上传 EPUB 文件
问题描述
我正在尝试在 r 中读取 EPUB 文件。它被放置在工作目录中。我写了这段代码:
library(epubr)
library(tm)
x <- epub("Perchisuonalacampana.epub") # parse entire e-book
但我得到以下错误:
Error in file.exists(path) :
file name conversion problem -- name too long?
(我的 EPUB 文件包含一本小说。)
编辑
getwd()
[1] "C:/Users/Standard/Downloads/aaa"
list.files()
[1] "dtm from pdf.R" "Perchisuonalacampana.epub"
解决方案
从这两个来源(它们几乎相同):
似乎您需要添加system.file()
:
library(epubr)
library(tm)
file <- system.file("Perchisuonalacampana.epub", package = "epubr")
x <- epub(file) # parse entire e-book
不确定这些是否有帮助,但这里有两个稍微不同的方法的来源:
推荐阅读
- ruby-on-rails - 如何让 ActiveRecord 在原始语句中绑定?
- c# - 由于文件格式或文件扩展名无效而无法打开文件的 C# Web API 导出 excel 文件的问题
- algorithm - 如何使用powershell从文件夹>子文件夹打印文件
- python - 如何为每个学生插入正确的价值,为每个核心价值选择每个分数
- hadoop - 计算键和数字格式的出现次数
- r - 如何在 R Shiny 中将反应值设置为默认值?
- django - django:ManyToMany:更新和插入业务规则
- azure - ARM 模板,服务器名称已存在但实际上不存在
- java - 后台服务不停止 Android
- amazon-web-services - AWS Glue Crawler 更新现有目录表非常慢