Peeking data

We already saw a couple of things in data, such as the first ten rows. There is more to look at. Let's check the dimensions we've got:

dim(clean_dt)# [1] 951   2

We got 951 mentions to R packages after withdrawing seven observations. Let's check the last 10 observations:

tail(clean_dt, 10)# A tibble: 10 x 2#   word n#   <chr> <int># 1 wpp2017 1# 2 wrapr 1# 3 WufooR 1# 4 xgboost 1# 5 XR 1# 6 xray 1# 7 XRJulia 1# 8 xtractomatic 1# 9 ZeBook 1#10 zipfextR 1

A summary could also be useful:

summary(clean_dt)#     word n # Length:951       Min. : 1.00 # Class :character 1st Qu.: 1.00 # Mode :character  Median : 2.00 #                  Mean : 10.58 #                  3rd Qu.: 7.00 #                  Max. :481.00

Given that the first quarter was one, the median was two, and the third quarter was seven, ...

Get Hands-On Data Science with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.