में this post में सूचियों के कॉलम द्वारा कैसे कुंजी कर सकता हूं, मेरे पास data.table
में सूचियों के कॉलम के बारे में एक और सवाल है।मैं डेटा.table
DT = data.table(x=list(c(1,2),c(1,2),c(3,4,5)))
ऐसा लगता है कि आप सूचियों के कॉलम पर कुंजी नहीं बना सकते हैं।
DT[,y:=.I,by=x]
Erreur dans `[.data.table`(DT, , `:=`(y, .I), by = x) :
The items in the 'by' or 'keyby' list are length (2,2,3). Each must be same length as rows in x or number of rows returned by i (3).
मैंने सोचा कि मैं एक ही लंबाई की सूची के साथ कर सकता है, लेकिन:
DT = data.table(x=list(c(1,2),c(1,2),c(3,5)))
DT[,y:=.I,by=x]
Erreur dans `[.data.table`(DT, , `:=`(y, .I), by = x) :
The items in the 'by' or 'keyby' list are length (2,2,2). Each must be same length as rows in x or number of rows returned by i (3).
वहाँ एक समाधान है? यदि सुविधा अनुरोध के बारे में नहीं है?
हाँ, 'list' (वर्तमान में) एक महत्वपूर्ण स्तंभ के रूप में अनुमति नहीं है। जब आप 'सेटकी (डीटी, "एक्स") – Arun