In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to write r language vscode, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to understand it!
How does vscode write r language?
Install the R extension
(1) R. This plug-in is the core plug-in of R in VS Code, with syntax highlighting, basic code snippets and code execution functions. For example, you can select a few lines in the editor and use ctrl + enter to send the code to the terminal for execution.
R plug-in
R plug-in needs to be configured before it can be used normally after installation, mainly to configure the installation path of R core program R.exe.
Configure R path
Right-click the R icon on the desktop and click "Open File location" to quickly locate the installation path of the R program, copy the path to the configuration bar, save the configuration automatically, and restart VS Code to start writing and debugging R programs using VS Code. Don't forget to add R.exe after the path when configuring the path, that is, C:\ Program Files\ R\ Rmur3.6.1\ bin\ x64\ R.exe
Find the installation path
Copy R installation path
2 、 R LSP Client . LSP means Language Server Protocol, with which you can complete code, view function definitions, and preview parameters.
R LSP Client
However, for it to work, you also need to install the languageserver package in R, which is the only way to synchronize R with the editor.
Click the file, create a new file, and enter the following:
Install.packages ("languageserver")
Files saved as .R suffixes are automatically recognized by VS Code as R codes. Mouse over the statement and use the ctrl + enter shortcut to run the statement to perform the R package installation. Will be prompted to select a mirror source, we choose a domestic mirror source, OK.
Write R program
Domestic mirror source
3. Now you can write R code freely using VS Code. Of course, there are more R plug-ins waiting for you to try, such as radian, custom shortcuts, etc., installation methods can be explored, not one by one here.
The above is all the contents of the article "how to write r language in vscode". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.