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

Manipulating data

Before you can start exploring your data, you first need to import it into your data analysis environment. There are many types of data, ranging from plain data in comma-separated value files to binary data in databases. Different R packages are equipped to handle these different kinds of data expertly and to import them almost ready for use in our environment. Since we are using R and RStudio, we will describe some of the most powerful R packages to import data in the following sections:

  • readr: readr can be used to read flat, rectangular data into R. It works with both comma-separated and tab-separated values.
  • readxl: We can use the readxl package to read data from MS Excel files.
  • jsonlite: Web services have increasingly started to provide data in a JSON format. The jsonlite package is a good way to import this kind of data into R.
  • httrrvest: httr, and rvest are very good packages to get data from the web, either from web APIs or by web scraping.
  • DBI: DBI is used to read data from relational databases into R.
主站蜘蛛池模板: 漳平市| 廊坊市| 临桂县| 内黄县| 天等县| 老河口市| 玉溪市| 枞阳县| 东乡| 治县。| 建水县| 雷波县| 黄大仙区| 和静县| 安阳县| 桦南县| 奈曼旗| 嘉义县| 贡嘎县| 石屏县| 社会| 根河市| 易门县| 兴海县| 迁安市| 赤峰市| 临泉县| 山丹县| 湛江市| 巴楚县| 玉树县| 响水县| 京山县| 怀仁县| 甘洛县| 志丹县| 芜湖市| 亚东县| 罗平县| 无棣县| 稻城县|