Skip to content
Back to formatted view

Raw Message

Message-ID: <007601d810c7$6050bd30$20f23790$@gmail.com>
Date: 2022-01-24T02:09:09Z
From: dbos@k01 m@iii@g oii gm@ii@com
Subject: [R-pkg-devel] ASCII code for Degree symbol °
In-Reply-To: <CAA42DG=iUZjksgJ-L=VY-V9K6Ou-qMCaG4uteUgHpCdjtPTbRg@mail.gmail.com>

vec <- c("one", "two", "three?")
vec
# [1] "one"    "two"    "three?"

vec1 <- gsub("[\xB0]", ".", vec)
vec1
# [1] "one"    "two"    "three."

-----Original Message-----
From: R-package-devel <r-package-devel-bounces at r-project.org> On Behalf Of Rafael H. M. Pereira
Sent: Sunday, January 23, 2022 8:55 PM
To: r-package-devel at r-project.org
Subject: [R-pkg-devel] ASCII code for Degree symbol ?

Hi all.

In one of the functions of my package (flightsbr), I have a vector with character strings where I need to replace the degree symbol ? with a point '.' So this is what I do:

vec <- gsub("[?]", ".", vec)

However, I keep getting this Warning from devtools::check():
  Found the following file with non-ASCII characters:
    utils.R
  Portable packages must use only ASCII characters in their R code,
  except perhaps in comments.
  Use \uxxxx escapes for other characters.

I assume there is a ASCII representation of ?, but I cannot really find a way to do this using ASCII  characters. Any ideas?

best,
Rafael Pereira

	[[alternative HTML version deleted]]

______________________________________________
R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel