r - arulesSequences 中的 cspade 函数引发连接错误
问题描述
我正在使用arulesSequences
R 库。这部分代码工作正常:
x <- read_baskets(con = system.file("misc", "zaki2.txt", package = "arulesSequences"), info = c('sequenceID', 'eventID', 'SIZE', 'items'))
zaki2.txt
位于_
C:\Users\USERNAME\Documents\R\win-library\3.5\arulesSequences\misc
但是,当我运行以下代码时:
s1 <- cspade(x, parameter = list(support = 0.1, maxsize = 1, maxlen = 1), control = list(verbose = TRUE))
我收到以下错误:
Error in file(con, "r") : cannot open the connection
3. file(con, "r")
2. read_spade(con = out, labels = itemLabels(data), transactions = if (control@tidLists) data, class = class)
1. cspade(x, parameter = list(support = 0.1, maxsize = 1, maxlen = 1), control = list(verbose = TRUE))
我只是想知道为什么会出现此连接问题。我对此文件夹进行了完全访问控制(我使用的是 Windows 10),但仍然收到相同的错误。有什么帮助吗?
更新
我找到了有关该错误的更多详细信息。我检查了这个文件夹,目录中似乎没有 *.out 文件。
reading sequences ...cannot open file
'C:\Users\ERKANE~1\AppData\Local\Temp\RtmpohPsWy\cspade3894f1b4b9f.out': No
such file or directoryError in file(con, "r") : cannot open the connection
解决方案
这是因为您没有获得临时文件夹“C:\Users\ERKANE~1\AppData\Local\Temp\RtmpohPsWy”的写权限。
您可以以管理员身份运行 R.exe 而不是 Rstudio,或者删除临时文件夹的只读属性。
推荐阅读
- c - 在 C 中使用 Go 切片
- java - 比较两个 ArrayList
基于共同类属性的不同类型 - wix - WiX 安装程序 - 在 UAC 提示后,LocalAppDataFolder 的子项安装到错误的位置
- javascript - 如何防止尾随内容与标签内容重叠?
- azure - 使用 Python 监视 Azure 虚拟机规模集 (VMSS) 中的实例
- odata - ODataLib 7.5 中的 UnBoundFunctionPathSegment 在哪里?
- mongodb - 启动 mongod 服务的 Ansible 任务永远挂起
- jquery - jQuery AJAX + ASMX - 开发上的内部服务器错误但不是本地的
- c# - 无需使用托管在 C# WebApi 中的 ngrok 即可用于生产的 Slack 应用程序
- r - Shiny - 基于复选框的聚合条形图