Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the methods of upgrading R language version based on Ubuntu

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the Ubuntu-based R language version upgrade methods". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the Ubuntu-based R language version upgrade methods?"

1. Concrete operation

Let's take Ubuntu 16.04 as an example. Directly in the command line interface, enter the following command to quickly upgrade to the latest version 4.0:

Sudo suecho "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial-cran40/" > > / etc/apt/sources.listapt-key adv-keyserver keyserver.ubuntu.com-recv-keys E084DAB9apt-get updateapt-get upgrade

Let's briefly explain the above code. Sudo su means to directly use the highest permissions; echo. > >. It means to write a line of statements to the last line in the following file referred to in > >; apt-get update means to reload the sources.list file, and apt-get upgrade means to update and upgrade the contents of sources.list (so we will naturally upgrade our newly added content).

So the question is, what should I do if my Ubuntu is not version 16.04, or if I want to upgrade the specified R version?

two。 Various versions of Ubuntu

First, we query the Code name corresponding to each version of Ubuntu. As shown in the following table, we pay attention to the first word in it.

When your Ubuntu is a different version, you only need to modify the corresponding Code Name in the following code (the second line of the previous code):

Echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial-cran40/" > > / etc/apt/sources.list

Here are a few examples:

Ubuntu 14.04echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu trusty-cran40/" > > / etc/apt/sources.listUbuntu 18.04echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu bionic-cran40/" > > / etc/apt/sources.listUbuntu 20.04echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu focal-cran40/" > > / etc/apt/sources.list

Of course, you can also directly enter the following command to query the corresponding Code Name:

Sudo lsb_release-a # to check the OS version3. Various versions of R

When we need to install different versions of R, we only need to modify the corresponding numbers after cran- (let's take Ubuntu 16.04 as an example):

R 3.6echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial-cran35/" > > / etc/apt/sources.listR 3.4echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu xenial/" > > / etc/apt/sources.list Thank you for your reading. This is the content of "what are the methods of upgrading R language version based on Ubuntu". After the study of this article I believe that you have a deeper understanding of what the R language version upgrade method based on Ubuntu has, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report