newdata <- read.csv(here::here("data/newdata.csv"))Importing data
Download https://jeffreyrstevens.quarto.pub/dpavir/data/newdata.csv and save it in your
data/directory.Import
newdata.csvand name itnewdatausingread.csv().
- Import https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv directly from the URL using
readr::read_csv().
library(readr)
newdata2 <- read_csv("https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv")Rows: 198 Columns: 11
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): Breed, links, Image
dbl (8): X2013.Rank, X2014.Rank, X2015.Rank, X2016.Rank, X2017.Rank, X2018.R...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
- Repeat the previous import of
newdata2.csv, but add the argumentscol_select = c("Breed", "links")andshow_col_types = FALSEand name itnewdata3.
newdata3 <- read_csv("https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv", col_select = c("Breed", "links"), show_col_types = FALSE)- Export the
newdata3data as a CSV file to yourdata/directory.
write_csv(newdata3, here::here("data/newdata3.csv"))