Kundkorgsanalys i R
Christopher Bruffaerts
Statistician
| TID | Transaktion |
|---|---|
| 1 | {Bread, Butter, Cheese, Wine} |
| 2 | {Bread, Butter, Wine} |
| 3 | {Bread, Butter} |
| 4 | {Butter, Cheese, Wine} |
| 5 | {Butter, Cheese} |
| 6 | {Cheese, Wine} |
| 7 | {Butter, Wine} |
Frekvensplot för artiklar

Absolut typ
itemFrequencyPlot(data_trx,
main='Absolute Item Frequency Plot',
type="absolute"
)
Relativ typ
itemFrequencyPlot(data_trx,
main='Relative Item Frequency Plot',
type="relative"
)


Sortera och filtrera med topN
itemFrequencyPlot(
data_trx,
topN = 4,
main = 'Absolute Item Frequency Plot',
type = "absolute"
)

Rotera och anpassa plotten
itemFrequencyPlot(
data_trx,
topN = 4,
main = 'Absolute Item Frequency Plot',
type = "absolute",
col = rainbow(4),
ylab = "",
cex.names = 1.2,
horiz = TRUE
)

Kundkorgsanalys i R