Message-ID: <58778fc8-c1ff-b78d-3096-92e541cebdd3@yeah.net>
Date: 2020-10-20T12:20:34Z
From: Jinsong Zhao
Subject: write.csv covert Åland to <c5>land
In-Reply-To: <e72f7f23-6320-4ee4-a5c8-89d92d2d0a4c@yeah.net>
Hi there,
Why the same string is displayed in different form?
> abc[,1]
[1] "?land" "Afghanistan"
> abc
name
1 <c5>land
2 Afghanistan
And more...
> dput(abc, "aa.txt")
> dget("aa.txt")
name
1 <c5>land
2 Afghanistan
> dget("aa.txt")[,1]
[1] "<c5>land" "Afghanistan"
Best,
Jinsong
On 2020/10/20 17:13, Jinsong Zhao wrote:
> Hi there,
>
> I tried to export the names of country to a csv file with write.csv().
> In the resulted file, ?land was coverted to <c5>land. Is there any way
> could prevent this happening? Thanks!
>
> > abc
> [1] "?land"
> > write.table(abc, file = "")
> "x"
> "1" "<c5>land"
>
> Best,
> Jinsong
>
> ______________________________________________
> R-help at 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.