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

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.
主站蜘蛛池模板: 宜兴市| 桑植县| 铁岭县| 静安区| 太谷县| 枣阳市| 云浮市| 民勤县| 双江| 伽师县| 东阿县| 牙克石市| 定襄县| 武安市| 鄯善县| 莲花县| 嘉义县| 芜湖市| 兴业县| 信丰县| 都江堰市| 涟水县| 临泽县| 呼伦贝尔市| 理塘县| 大渡口区| 泽库县| 苗栗县| 澎湖县| 嵊州市| 玉田县| 三原县| 平乐县| 渝北区| 紫云| 唐河县| 通州市| 安龙县| 桃园县| 龙海市| 金塔县|