DEV Community

Mahesh K
Mahesh K

Posted on

data.table Package in R

In this post, we take a look at the data.table package in R. You use it with the tabular data in R language. You can think of this package as a much improved version of the data.table.

We take a look at this package in a brief and hopefully by the end of it you get the idea of how to use the data.table package.

I created the video that covered the features of the data.table package. You can take a look at the video below.

First step is the installation of the package.

Installation of Data.table

Use the below command to install the package.

install.packages('data.table')

Then use the package.

library(data.table)

Now let's play with the simple data.

dt = data.table(name = c("a", "b", "c", "d"),
id = (7, 0, 3, 4))

Then let's print the dt as a data table.

dt

That's it.

You should check the above video to get the idea on how to do more customization and use the library.

I hope this helps anyone who is trying to learn the data science and exploring the dataset on their own.

Top comments (0)