Import csv file to new line R

I have a csv file that has a text box that contains the new character of the string '\ n', so I cannot import this file correctly in R. My end of the csv line is actually "\ r \ n", and I want to R use it as the end of a line, how can I do this?

thanks

EDIT:

It seems that R is ignoring my new line character in some entries. Example:

data [48,]

Var1 Var2 Var3 345 blue N 

data [49,]

 Var1 Var2 Var3 634 red N\n821,green, 

where the data [50,] should start with 821, green

I am using allowEscapes = TRUE.

+4
source share
1 answer

In many csv processing implementations, you should avoid fields with \ n and other such codes, usually with quotes or double quotes. For example, "this is an example \ nan"

+1
source

Source: https://habr.com/ru/post/1385309/


All Articles