简体   繁体   中英

Reading a DAT file with vertical rectangle separators in R

I have been trying to import data from a DAT file but the text is separated by white rectangles, looks like "25af" characters but R doesn't recognise this as a separator.

Has anyone encountered this before? This file is encoded via ANSI if this helps?

Thanks in advance

你可以试试这个:

read.csv(text = gsub("\u25af", ",", readLines("my_file.dat", encoding = "UTF-8")))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM