官术网_书友最值得收藏!

Reshaping and tidying up erroneous data

Erroneous data is regarded as data that falls outside of what is accepted and what should be rejected by the system. In this section, we will focus on two major activities: reshaping and tidying up erroneous data. With the R programming language, this process can be achieved with the tidyr package. This package is designed specifically for data tidying and works well with manipulated data. It is important that you install this package if you have newly installed the R environment.

The following steps are implemented to include this package in the R environment:

  1. Use the install.packages command to install the tidyr package in its entirety:
> install.packages("tidyr")   

From this, we get the following output:

  1. Now, it is important to include this package in your workspace (R environment). By including it, we can call the necessary libraries and functions associated with this package in the R workspace:
> library(tidyr) 

From this, we get the following output:

Once we have included the tidyr package in our system, we can proceed with reshaping and tidying up the mpg dataset. This process requires the following functions:

  • gather()
  • unite()
  • separate()
  • spread()
主站蜘蛛池模板: 界首市| 鄢陵县| 阿城市| 遵义市| 桐柏县| 二手房| 柳河县| 昌吉市| 湟中县| 新竹市| 唐山市| 汾西县| 固安县| 原平市| 融水| 犍为县| 乐业县| 沈丘县| 友谊县| 大埔区| 灌南县| 西峡县| 叙永县| 海原县| 沅江市| 陆川县| 西乡县| 定陶县| 佛冈县| 进贤县| 兖州市| 中方县| 舞钢市| 宝清县| 井研县| 长顺县| 亳州市| 寿宁县| 凉城县| 黑水县| 建平县|