1

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!!!!!

1 Answer 1

1

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
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.