Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wpforms-lite domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/ragipunal.com/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the businext domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/ragipunal.com/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/ragipunal.com/wp-includes/functions.php on line 6114
R Language Linux Add R_HOME Path - RAGIP ÜNAL

Blog

R Language Linux Add R_HOME Path

R Language Linux Add R_HOME Path

Linux üzerinde R dilini çalıştırıyorsunuz ve R_HOME dizinini eklemeniz gerekiyor. Fakat R paketi nereye yüklendi ve R_HOME dizini nerede bilemiyorsunuz. Sırayla aşağıdaki işlemleri yapacağız.

[root@sunucu ~]# R

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

>

Gördüğünüz gibi R ımız çalışıyor. Şimdik path ve home bilgisini elde edelim. Aşağıdaki kodu yapıtırın.

rbind(home = R.home(),
      bin  = R.home("bin")) # often a sub directory of 'home'
list.files(R.home("bin"))

Çıkan sonuç aşağıdakine benzeyecektir.

> rbind(home = R.home(),
+       bin  = R.home("bin")) # often a sub directory of 'home'
     [,1]
home "/usr/lib64/R"
bin  "/usr/lib64/R/bin"
> list.files(R.home("bin"))
 [1] "BATCH"         "build"         "check"         "COMPILE"
 [5] "config"        "exec"          "INSTALL"       "javareconf"
 [9] "libtool"       "LINK"          "mkinstalldirs" "pager"
[13] "R"             "Rcmd"          "Rd2pdf"        "Rdconv"
[17] "Rdiff"         "REMOVE"        "Rprof"         "Rscript"
[21] "rtags"         "SHLIB"         "Stangle"       "Sweave"

bakın home ve bin karşılıklarında ne yazıyor.

home “/usr/lib64/R”
bin “/usr/lib64/R/bin”

şimdi q() yazıp enter diyoruz ve R ‘ın cmd consolundan çıkıyoruz.

Akabinde PATH i eklemek için aşağıdaki işlemleri yapmamız yeterli. nano ile dosyayı açıp R_HOME dizinini ekliyoruz. Sonra kaydediyoruz. bunu vi ile de yapabilirsiniz.

nano ~/.bash_profile
export R_HOME=/usr/lib64/R

Sonrasında ise konsol ekranında aşağıdaki komutları uyguladığınızda sonucu alacaksınız.

[root@sunucu ~]# source ~/.bash_profile

********************************************
 Welcome to CWP (CentOS WebPanel) server
********************************************

CWP Wiki: http://wiki.centos-webpanel.com
CWP Forum: http://forum.centos-webpanel.com
CWP Support: http://centos-webpanel.com/support-services

 12:11:20 up 11 days, 19:21,  1 user,  load average: 0.00, 0.02, 0.05
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/0    192.168.1.100    Sun13    0.00s  0.28s  0.28s -bash

[root@sunucu ~]# echo $R_HOME
/usr/lib64/R

Gördüğünüz gibi echo ile enviroment daki R_HOME u çağırdığımızda /usr/lib64/R yazdığını gördük

İşlem bu kadar, kolay gelsin.

Leave A Comment

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir