Hello, I'm new to R and I'm trying to use the read_csv function. However it gives me parsing errors. I did use the problems() function to view the parsing errors, but I have no idea what the errors mean or how to fix it. I've searched around this issue on RStudio but have not been able to find an explanation. Any help would be appreciated. I created a reprex below. Thank you!
library(tidyverse)
#> Warning: package 'tidyverse' was built under R version 3.6.1
#> Warning: package 'tidyr' was built under R version 3.6.1
#> Warning: package 'dplyr' was built under R version 3.6.1
#> Warning: package 'stringr' was built under R version 3.6.1
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following object is masked from 'package:base':
#>
#> date
#set directory and import data
directory <-"H:/Research/Ophtho"
file_path <- file.path(directory, "Input 2019-10-07_1951 All Raw Data.csv")
data <- read_csv(paste0(file_path))
#> Parsed with column specification:
#> cols(
#> .default = col_double(),
#> mcn_id = col_character(),
#> redcap_event_name = col_character(),
#> first_name = col_character(),
#> last_name = col_character(),
#> dob = col_date(format = ""),
#> mcn = col_character(),
#> exam_date = col_date(format = ""),
#> exam_va_od = col_character(),
#> exam_va_od_pm = col_character(),
#> exam_va_od_other = col_character(),
#> exam_va_os = col_character(),
#> exam_va_os_pm = col_character(),
#> exam_va_os_other = col_character(),
#> exam_iop_od = col_character(),
#> exam_iop_os = col_character(),
#> exam_cup_disc_od = col_character(),
#> exam_cup_disc_os = col_character(),
#> exam_ecc_date = col_date(format = ""),
#> exam_oct_date = col_date(format = ""),
#> exam_vf_od = col_character()
#> # ... with 66 more columns
#> )
#> See spec(...) for full column specifications.
#> Warning: 24 parsing failures.
#> row col expected actual file
#> 1155 gdd_suprachoroidal_dt 1/0/T/F/TRUE/FALSE 2003-03-26 'H:/Research/Ophtho/Input 2019-10-07_1951 All Raw Data.csv'
#> 1202 exam_oct_os a double x 'H:/Research/Ophtho/Input 2019-10-07_1951 All Raw Data.csv'
#> 1203 cornea_compli_fail_uncer 1/0/T/F/TRUE/FALSE 2 'H:/Research/Ophtho/Input 2019-10-07_1951 All Raw Data.csv'
#> 1288 gdd_suprachoroidal_dt 1/0/T/F/TRUE/FALSE 2001-06-13 'H:/Research/Ophtho/Input 2019-10-07_1951 All Raw Data.csv'
#> 1421 exam_tube_length_od 1/0/T/F/TRUE/FALSE 2 'H:/Research/Ophtho/Input 2019-10-07_1951 All Raw Data.csv'
#> .... ........................ .................. .......... ...........................................................................
#> See problems(...) for more details.
problems(data)
#> # A tibble: 24 x 5
#> row col expected actual file
#> <int> <chr> <chr> <chr> <chr>
#> 1 1155 gdd_supra~ 1/0/T/F/TR~ 2003-03-26 'H:/Research/Ophtho ~
#> 2 1202 exam_oct_~ a double x 'H:/Research/Ophtho ~
#> 3 1203 cornea_co~ 1/0/T/F/TR~ 2 'H:/Research/Ophtho ~
#> 4 1288 gdd_supra~ 1/0/T/F/TR~ 2001-06-13 'H:/Research/Ophtho ~
#> 5 1421 exam_tube~ 1/0/T/F/TR~ 2 'H:/Research/Ophtho ~
#> 6 1640 gdd_infec~ 1/0/T/F/TR~ 2005-09-19 'H:/Research/Ophtho ~
#> 7 1743 gdd_perce~ 1/0/T/F/TR~ 2005-09-13 'H:/Research/Ophtho ~
#> 8 1862 exam_ecc_~ a double AC deep with 2+ cell~ 'H:/Research/Ophtho ~
#> 9 2113 exam_oct_~ a double LP 'H:/Research/Ophtho ~
#> 10 2165 gdd_infec~ 1/0/T/F/TR~ 2014-01-30 'H:/Research/Ophtho ~
#> # ... with 14 more rows
Created on 2019-10-07 by the reprex package (v0.3.0.9000)