Hi all,
Anyone knows if there's an easy way to tell read_csv
to skip empty columns?
Often when handling stuff on Excel the file gets saved with an extra empty column, which gets read as all NA's. For example:
> x <- read_lines('example.csv')
> x
[1] "Some,Example,Here" ",," "A,B," "1,a,"
[5] "2,b," "3,c,"
> y <- read_csv('example.csv', skip = 2)
Parsed with column specification:
cols(
A = col_integer(),
B = col_character(),
X3 = col_character()
)
> y
# A tibble: 3 x 3
A B X3
<int> <chr> <chr>
1 1 a NA
2 2 b NA
3 3 c NA