data.table :: melt中的“Column'^'not found'消息是什么?

时间:2016-07-12 03:06:43

标签: r data.table

MWE:

library(data.table) # version 1.9.6
DT = fread("https://raw.githubusercontent.com/Rdatatable/data.table/master/vignettes/melt_default.csv")

colA = paste("dob_child", 1:3, sep="")
colB = paste("gender_child", 1:3, sep="")
DT.m2 = melt(DT, measure = list(colA, colB), value.name = c("dob", "gender"))

代码取自data table vignette部分“3.增强(新)功能”。

运行代码会出错:

> DT.m2 = melt(DT, measure = list(colA, colB), value.name = c("dob", "gender"))
Error in melt.data.table(DT, measure = list(colA, colB), value.name = c("dob",  : 
  Column 'ˆ ' not found in 'data'

0 个答案:

没有答案