尝试使用Hadley Wickhams pryr包中的library(data.table)
dt<-data.table(Rank=c(1,1,2,3,4,1,3,2,1,2,4), Name=c(rep("Ashish", 3), rep("Mark", 3), rep("Spencer", 3), "Mary", "Joseph"))
setkey(dt, Rank, Name)
dt<-unique(dt)
setkey(dt, Name)
dt<-unique(dt) # works because of the above setkey call which sorted it
setkey(dt, Rank) # if you want to order them by Rank again
,每次收到以下错误消息:
show_c_source()
即使功能文档中提供的示例也不起作用:
Error in file(con, "r") : cannot open the connection
我在10.11.3 Mac OSX,R 3.2.4
上运行此操作