我试图对我的参数执行一个函数,该函数是可变长度的。我似乎无法在我的arguments数组上运行任何函数,包括sort。
library(data.table) # data.table 1.12.0
# small data.table example ## edited to be reproducible
m <- matrix(c(5,5,6,7,6),nrow = 8,ncol = 2)
dt <- setDT(as.data.frame(m))
dt.uniq <- unique(dt)
#this returns the ID or position of the rows in the first table on the second table
match(transpose(dt),transpose(dt.uniq))
## [1] 1 1 2 2 3 2 4 4
我收到此错误:
function findKeyFromNotes()
{
var notes = arguments.slice();
return notes;
}
谢谢, 那库尔