Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View built-in dataset from a package

Tags:

r

arules

I have installed the packages arules. How can I view the built-in dataset as usual?

I tried:

library(arules)
data(Groceries)
Groceries

While it only offer me:

transactions in sparse format with
 9835 transactions (rows) and
 169 items (columns)

What is sparse format?

like image 201
useR Avatar asked Feb 28 '14 09:02

useR


People also ask

How do I view an inbuilt dataset in R?

The default R datasets included in the base R distributionIf you look at the package listing in the Packages panel, you will find a package called datasets. Simply check the checkbox next to the package name to load the package and gain access to the datasets.

How do I list preloaded datasets in R?

Command data() will list all the datasets in loaded packages. The command data(phones) will load the data set phones into memory.


1 Answers

inspect(Adult)
inspect(Adult[1:10,1:10])

inspect(Groceries)
like image 118
Troy Avatar answered Oct 12 '22 07:10

Troy