You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在R中使用Ramf包导入CSV文件时遇报错的技术求助

丛枝菌根数据处理:Ramf包readData()函数报错问题

问题背景

  • 分析丛枝菌根数据,采用devtools管理的Ramf包进行处理
  • 已按要求格式化CSV文件,但无法通过readData()函数加载数据
  • 使用Ramf.data<-read.csv(file.choose())可成功读取到7列数据框,但调用Ramf包的任何功能(包括readData())时均触发报错
  • 尝试过多种CSV选择方式及相关代码变体,CSV始终被识别为"character empty",而非预期的数据框

报错信息

Error in `vroom::vroom()`:
! `file` is not one of the supported inputs:
• A filepath or character vector of filepaths
• A connection or list of connections
• Literal or raw input
Run `rlang::last_trace()` to see where the error occurred.
---
Backtrace:
    ▆
 1. └─Ramf::readData((as.data.frame("Ramf5")), type = "grid")
 2.   ├─base::suppressMessages(read_csv(infile))
 3.   │ └─base::withCallingHandlers(...)
 4.   └─readr::read_csv(infile)
 5.     └─vroom::vroom(...)
Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.

已尝试的无效代码

#Ramf
Ramf.data<-read.csv(file.choose())
Ramf.6 <- dir(system.file("Ramf.csv", package = "Ramf"), full.names = TRUE, pattern = "grid.csv")
readData((as.data.frame("Ramf.data")), type="grid")
readData(Ramf.6, type="grid")

需求

希望正常使用readData()查看数据框,并能调用Ramf包的其他函数。

内容的提问来源于stack exchange,提问作者Sara S

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 21:03:29