[R] Accessing Data From packages
Phillip Heinrich
herd_dog @end|ng |rom cox@net
Thu Feb 27 16:05:16 CET 2020
I am continuing to have problems downloading data as prescribed in books
about R such as “Analyzing Baseball Data with R”.
In chapter 3 (page 67) the instructions to download baseball Hall of Fame
data from the package tidyverse are:
library(tidyverse)
-- Attaching packages --------------------------------------- tidyverse
1.3.0 -- v ggplot2 3.2.1
v purrr 0.3.3 v tibble 2.1.3
v dplyr 0.8.3 v tidyr 1.0.0 v stringr 1.4.0
v readr 1.3.1 v forcats 0.4.0
-- Conflicts ------------------------------------------
tidyverse_conflicts() -- x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
Warning messages: 1: package ‘tidyverse’ was built under R version 3.6.2 2:
package ‘purrr’ was built under R version 3.6.2
The package seems to load correctly but when I try to call up the data I get
an error message.
***********************************************************************************************
> hof <- read_csv("data/hofbatting.csv")
Error: 'data/hofbatting.csv' does not exist in current working directory
('C:/Users/Owner/Documents').
***********************************************************************************************
I have no idea where the data is hiding. Can someone give me some
directions.
More information about the R-help
mailing list