[R] Trouble reading a UTF-16LE file

jim holtman jho|tm@n @end|ng |rom gm@||@com
Wed Feb 28 18:51:50 CET 2024


Try this:


> x <- file("C:\\Users\\Jim\\Downloads\\PV2-ch2 - R_Help.ANA",+           encoding = "UTF-16")> y <- readLines(x)> head(y)[1] "1\t36,74\t0"      "2\t269,02\t-44"   "1\t326,62\t29"    "2\t354,52\t24"
[5] "8\t390,75\t1838"  "2\t395,11\t-1053">

>

Thanks

Jim Holtman
*Data Munger Guru*


*What is the problem that you are trying to solve?Tell me what you want to
do, not how you want to do it.*


On Wed, Feb 28, 2024 at 9:23 AM Ebert,Timothy Aaron <tebert using ufl.edu> wrote:

> The earlier post had an attached text file that did not go through.
> I hope this link works. I tested it with a coworker, but that is no
> guarantee.
>
>
> https://uflorida-my.sharepoint.com/:u:/g/personal/tebert_ufl_edu/EXf5u_CtTwJCrhdfTBIPr7wBefZHx4P_suj4wAWb8i8HFA?e=iQawhh
>
>
> Regards,
> Tim
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list