我试图在我的data.table中绘制直方图,它显示所有名称的列表而不是相应的名称,我错过了什么。
data.table(iris[,1:4])[,lapply(.SD,function(x){
hist(x ,
main= paste("Histogram of" , names(.SD) ))
}
)]
答案 0 :(得分:0)
lapply版本:
function newAgent(pcName){
socket.broadcast.emit('newAgent', pcName)
agentList.find({agentName: { $in: pcName}}, function(err, docs) {
if(null === docs){
agentList.insert({agentName: pcName}, function (err) {});
} else {
//since it exists you might want update
agentList.update({
pcName: pcName
}, {
$set: {
//call fields to be updated
}
}, {}, callback);
}
});
}