Re: [R] Symbol/String comparison in R

2022-04-14 Thread Rui Barradas
Hello, Inline. Às 22:09 de 14/04/2022, Kristjan Kure escreveu: Thank you, Rui. Not sure I got everything right, but here it is: *current_loc <- Sys.getlocale("LC_COLLATE")* #> [1] "Estonian_Estonia.1257" "A" < "a" #41 < 61 #> [1] FALSE raw_A <- charToRaw("A") #41 raw_a <- charToRaw("a") #61 #

Re: [R] Symbol/String comparison in R

2022-04-14 Thread Richard O'Keefe
an you wanted to know > >about collation as hint at it. > > > >These days, with Unicode and internationalisation, > >text encoding and collation are just insanely complex. > >R goes to a lot of trouble to hide this from you. > >LET IT. > > > > > > > >On Thu, 1

Re: [R] Symbol/String comparison in R

2022-04-14 Thread Rui Barradas
Hello, 1) The best I could find on lower case/upper case is [1]; The Wikipedia page you link to is about a code page and the collating sequence is the same as ASCII so no, that's not it. 2) In the cp1252 table "A" < "a", it follows the numeric order 0x31 < 0x41. But what R is using is the loc

Re: [R] Symbol/String comparison in R

2022-04-14 Thread Kristjan Kure
Hi Rui Thank you for the code snippet. 1) How do you find your "Portuguese_Portugal.1252" symbols table now? Is it this https://en.wikipedia.org/wiki/Windows-1252? 2) What attributes and values do you check to validate the end result? I see there is a section "Codepage layout" and I can find "A"

Re: [R] Symbol/String comparison in R

2022-04-13 Thread Bert Gunter
"I was not able to find answers to my questions (tried Google, Stack Overflow, etc). Please correct me if anything is wrong here." R has an extensive Help system. That should always be your first place to look. In this case, ?"<" (at the R prompt) brings you to the Help page for comparisons (as wo

Re: [R] Symbol/String comparison in R

2022-04-13 Thread Ebert,Timothy Aaron
: [R] Symbol/String comparison in R [External Email] Hi! Sorry, I am a beginner in R. I was not able to find answers to my questions (tried Google, Stack Overflow, etc). Please correct me if anything is wrong here. When comparing symbols/strings in R - raw numeric values are compared symbol by