0

これは私のデータフレームです:

transtest<-structure(list(ContactID = c("003E0000008S8TcIAK", "003E0000008S8U3IAK", 
"003E0000008S8U3IAK", "003E0000008S8U4IAK", "003E0000008S8U4IAK", 
"003E0000008S8U4IAK", "003E0000008S8U4IAK", "003E0000008S8U4IAK", 
"003E0000008S8U4IAK", "003E0000008S8U4IAK"), ActivityType = c("Meeting", 
"LitOrder", "Hard Mail", "LitOrder", "Hard Mail", "Sale", "Inbound", 
"Email", "Outbound", "Left Voicemail/Message with Assistant")), .Names = c("ContactID", 
"ActivityType"), row.names = c(NA, -10L), class = c("tbl_dt", 
"tbl", "data.table", "data.frame"))

私はそれを「トランザクション」クラスに変えようとしています

read.transactions(transtest, format = "single")

次のエラーが表示され続けます。

Error in read.transactions(transtest, format = "single") : 
  'cols' must be a numeric or character vector of length 2 for 'single'.

length(colnames(transtest)) = 2 にもかかわらず、なぜこれが起こっているのかわかりません。

4

1 に答える 1