hello there. I was writing a file CSV on my own on Excel and saved it as "UTF-8 comma separated CSV". when I read the CSV in R, the only line read correctly is the header while the others lines of the CSV are in the first column although they are comma separated. here i share the example for my problem:
FILE.csv:
String,Number,Number,Number,Number,Number,Number(0-1),Number,Number,String,Date,Date
NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD"
NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD"
NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD"
R:
library(tidyverse)
data <- read_csv("Data/FileName.csv")
OUTPUT:
String Number Number.1 Number.2
1 NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD" NA NA NA
2 NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD" NA NA NA
3 NAME,14.45,200.00,14.04,10,84.13,0,28.45,289.26,S,"YYYY-MM-DD","YYYY-MM-DD" NA NA NA
Number.3 Number.4 Number.0.1. Number.5 Number.6 String.1 Date Date.1
1 NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA
3 NA NA NA NA NA NA NA NA
I can't understand the reason for why R is reading correctly the first row but can't read the rest of the file. someone can help with any advice?