Change R interface to English - r

I'm having an annoying issue with R. When I start the R console, all the Interface is in Japanese, and I don't know why.
I searched and tried a lot of "solutions" but nothing seems to work. Here I attached a screenshot of how it looks.

Check if your R_HOME\etc\Rconsole file contains any config other than en (english) on this line language = xx

I tried all the solutions you gave me and posted on other sites, and I realized the problem wasn't the R configuration, it was something on the MacOS preferences. I can't understand why, but if there is a second language in the preferred languages on the Language & Region Settings, R takes that as the interface language.
So, I removed the Japanese as a second language on my Mac, and it solved the problem. I attach a screenshot, maybe it will be helpful for another person that have the same issue as me.

Related

VSCode : mvbasic extension on editing Unidata code with MV marks in code, ie CHAR(253), CHAR(254)

I have searched for a setting within the mvbasic extension within VSCode but I may have hit a dead end. I am new to using VSCode with the rocket mvbasic extension and still in the learning process, so please bear with me.
Our development for the most part has always been directly on the server using the editor within it to code and develop on a Unix/Aix platform with Unidata. Some of our code has array assignments with CHAR(253)/CHAR(254) characters within them. See the link to the image that shows how its done. Now I didn't do this code, the original software developer did this many many years ago and we just aren't going to go and change it all.
How code looks on actual server
The issue is when pulling the code to edit in VSCode, the extension is changing it, and I uploaded it back and didn't pay attention and it was implemented in our production incorrectly, which created a few bugs.
ALIST="H�V�P�R�M�D"
How code looks in VSCode
How code looks after uploaded back to server from VSCode
Easy to fix, no biggie, but now to my question.
Does anyone have this issue, or has a direction to point me into that maybe I need to create a setting to keep the characters in the correct ASCII format so that this doesn't happen again by mistake?
VSCode defaults to the sane choice for character encoding in 2022: utf-8, but sometimes you have to deal with legacy stuff.
https://code.visualstudio.com/docs/editor/codebasics#_file-encoding-support
If you click on the UTF-8 in the bottom right corner you can choose "Reopen with Encoding":
After that, you can select a different encoding. I chose DOS (CP437) at a guess and literal MV characters are displayed as superscript 2 (²), and for me I can save to the server and confirm those characters remain as #VM after a round trip (though for my terminal emulator they appear as } which is useful).
You can edit preferences and set "files.encoding": "cp437". One other thing that can be helpful if your programs don't have a standard extension (like .bas) as most don't is to set the default mode to basic so most of what you're editing will identify as MVbasic, and you can do a quick CTRL-K M to switch to any other modes if you're just pasting in something else like SQL.
Some useful links - the Rocket forums are helpful and the folks there are always super nice
https://community.rocketsoftware.com/forums/multivalue?CommunityKey=521bce2e-71d5-4d32-b560-dfa95e950eb5
The MV Extensions Community extension is a good group and always has been helpful when I've had issues. I've made some small contributions - they're very open. I prefer this extension, but honestly haven't done a deep comparison.
https://github.com/mvextensions

Get R warnings and errors in english

I'd like R to show me debug messages in english instead that in my locale (Italian). Having messages in italians makes it difficult to look on the internet for help on debugging. Not to mention that sometimes translations are sloppy at least.
How can revert R to use only the original version of messages and not to translate them?
thanks!
You want to set the "LANGUAGE" environment variable (see relevant documentation):
Sys.setenv(LANGUAGE='en')
To do this, though, you need to have message translations installed (which I believe are optional on at least some platforms).

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?
I'm having the hardest time finding anything online (particularly for SAS). Looking for ability to run code from Notepad++ as well as setup color coding.
Thanks.
Why not just go the GUI route: right click, e.g., any foo.R file and select "Open with...", then pick Np++ and click the "always open this file type.." button. Rinse, lather, repeat.
BTW, for R, if you don't already have it, get "NppToR" , a little app which lets you execute code directly from the Npp window.
On windows you can either:
manually edit the keys for the file type to set the value of HKEY_CLASSES_ROOT\FILE_TYPE\shell\edit\command where FILE_TYPE is the appropriate one for each of the files extensions you wish to change this is quite hard work or
you can use a program that does it for you such as the free Default Programs Editor
In either case the first thing to do is to back up the registry.
I would seriously suggest looking into using one of the many, some free IDEs as they will automatically include the run from edit environment, syntax highlighting, code completion and, in many cases, debugging as well.
Notepad++ is my favorite editor and I was in the same shoes as you are now.
I am assuming that you are in Windows (Notepad ++ doesn't exist in Mac, saddest thing for me)
Please follow the steps mentioned in the below webpage and do as the author says.
http://hafniumcity.com/notepad_color.php
Now for in-line editing , it may be not be the best choice for SAS. Although I haven't tried it much so not a good person to comment on it.

What are the available variables in Atom editor and how can I use them?

I'm exploring the Atom editor and trying to set up some Snippets. I would like to know if there are variables that I can use to insert things like the Author's name, file creation date, etc.
I looked around and since Atom is patterned after Sublime, I tried to use $TM_FULLNAME but it didn't seem to work. Where might I find the variables that Atom exposes (if any)?
Regards,
Rene' Robinson
Kind of a late answer, but currently doesn't look like it does support this. Tried looking through the snippets code on GitHub, but so far, not seeing variables
(at least as of today and version d74e73364c5fd48a73524ae28f6fb442c7e6e95d of snippets project)

WordPress Simplified Chinese language code

As part of localization for our WordPress website we need to support Chinese simplified script. Not knowing anything about Chinese we did some research and used zh-CN (also known as zh-Hans).
Our client states this is incorrect and we should use:
ch-cn (also known as ch-hans). We checked several language plugins and did some research on the internet but this code ch-cn seems pretty rare. Is my client wrong? He wants to use simplified script, chinese PRC
Many thanks!
The client is wrong, and zh-CN and zh-Hans are correct (their meanings are different in principle, but they boil down to the same language form). In HTML, on the Internet, and in most other contexts that might be imaginable here, a two-letter code as the first part of a language code must be an ISO 639-1 code. The authoritative registry assigns “ch” to the Chamorro language, whereas “zh” is assigned to Chinese.

Resources