-
Book Overview & Buying
-
Table Of Contents
R for Data Science Cookbook (n)
By :
The use of a data frame enables the user to select and filter data by row names and column names. As not all imported datasets contain row names and column names, we need to rename this dataset with a built-in naming function.
In this recipe, you need to prepare your environment with R installed and a computer that can access the Internet.
Perform the following steps to rename data:
First, download employees.csv from the GitHub link https://github.com/ywchiu/rcookbook/raw/master/chapter3/employees.csv:
> download.file("https://github.com/ywchiu/rcookbook/raw/master/chapter3/employees.csv", " employees.csv")
Additionally, download salaries.csv from the GitHub link https://github.com/ywchiu/rcookbook/raw/master/chapter3/salaries.csv:
> download.file("https://github.com/ywchiu/rcookbook/raw/master/chapter3/salaries.csv", "salaries.csv")
Next, read the file into an R session with the read.csv function:
> employees <- read.csv('employees...
Change the font size
Change margin width
Change background colour