dataframe - names(x) <- value 中的错误:“names”属性必须与向量的长度相同——OpenML
问题描述
我正在尝试从 R 中的 OpenML 下载数据集。对于这个特定的数据集,ID:41436
由于以下代码,我得到了错误:
devtools::install_github("openml/openml-r")
install.packages(c("farff", "RWeka"))
library("OpenML")
datInfo <- getOMLDataSet(data.id = 41436, verbosity = 0)
targetVariable <- datInfo$target.features
dat <- datInfo$data
Warning message in getOMLDataSetById(data.id = data.id, cache.only = cache.only, :
“Data set is in preparation and will be activated soon.”
Error in names(x) <- value: 'names' attribute [10] must be the same length as the vector [1]
Traceback:
1. getOMLDataSet(data.id = 41436, verbosity = 0)
2. getOMLDataSetById(data.id = data.id, cache.only = cache.only,
. verbosity = verbosity)
3. arff.reader(f$dataset.arff$path)
4. farff::readARFF(file, show.info = FALSE)
5. `colnames<-`(`*tmp*`, value = header$col.names)
解决方案
推荐阅读
- android-layout - 如何在 MainActivity.kt 中膨胀布局导航视图
- javascript - 如何在本机反应中将无状态函数转换为类组件
- mysql - 如何从 mysql 表中获取数据并使用 php 插入另一个表?
- python - 有人可以帮我弄清楚如何打印此下拉列表中的选项吗?
- android - com.google.android.gms.internal.measurement.zzdf 错误在 android
- python - Zeppelin PySpark - java.net.ConnectException:连接被拒绝(连接被拒绝)
- oracle-data-integrator - 在 ODI 11G 负载计划中将变量传递给场景不起作用
- lua - 您如何在 Roblox 中使用脚本锚定大量群组?
- c# - 在 Unity C# 中,只有赋值、调用、递增、递减、等待和新对象表达式可以用作语句
- json - value 将类变量更改为 JSON 字符串