Reputation: 306
Hello i am working in Rpriori. In this algorithum we use itemFrequency() function which return top items from data.Now i want to get the value of top items. not a labels. and assign it to a vector.Thanks in advance
Remember:name argument give the name of the top items.only need has value!!!!!
Upvotes: 1
Views: 55
Reputation: 400
It will return the numeric vector containing names and values.
items <- itemFrequency(myTransactionsData, type = "absolute")
head(sort(items, decreasing = TRUE), n = 20)
But if you want only the value then try something like this
print(items[["whole milk"]])
Output: 2513
Upvotes: 1