<- read.csv(here::here("data/newdata.csv")) newdata
Importing data
Download https://jeffreyrstevens.quarto.pub/dpavir/data/newdata.csv and save it in your
data/
directory.Import
newdata.csv
and name itnewdata
usingread.csv()
.
- Import https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv directly from the URL using
readr::read_csv()
.
library(readr)
<- read_csv("https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv") newdata2
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 = FALSE
and name itnewdata3
.
<- read_csv("https://jeffreyrstevens.quarto.pub/dpavir/data/newdata2.csv", col_select = c("Breed", "links"), show_col_types = FALSE) newdata3
- Export the
newdata3
data as a CSV file to yourdata/
directory.
write_csv(newdata3, here::here("data/newdata3.csv"))