> For the complete documentation index, see [llms.txt](https://docs-ksc.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-ksc.gitbook.io/blog/install/nurion/r-3.6.2-install.md).

# 누리온 R-3.6.2 버전 설치 소개

R은 통계 분석, 데이터 처리 및 시각화에 특화된 오픈소스 프로그래밍 언어입니다. 다양한 통계 기법, 그래픽 기능, 그리고 수 많은 패키지 지원을 통해 데이터 과학자, 통계학자가 복잡한 데이터를 효율적으로 분석하고 시각화할 수 있습니다.

이 문서에서는 R 3.6.2 버전을 컴파일 하여 설치 하는 방법에 대해 예시로 소개합니다.

## **가. 설치 환경**

| 구분                      | 내용                     |
| ----------------------- | ---------------------- |
| 대상 시스템                  | 누리온                    |
| OS Version              | 리눅스 / CentOS 7.9       |
| CPU                     | <p>Intel Xeon Phi 7250 |
| <br>Intel Xeon 6148</p> |                        |
| 컴파일러                    | gcc 4.8.5 Version      |
| 기타                      | CURL                   |

## **나. 설치 전 환경 설정**

여러 프로세스를  활용한 설치를 위하여 debug 큐 노드에서 interactive 하게 접속하여 설치를 진행하며,\
누리온 시스템의 기본 컴파일러인 gcc-4.8.5 를 사용하고 의존성 라이브러리인 CURL 을 환경설정하여 설치를 진행합니다.

\[ 디버그 노드 접속 ]

```shell-session
$ cds
$ qsub -I -V -l select=1:ncpus=32:ompthreads=1 -l walltime=04:00:00 -q debug -A etc
```

\[ 환경 설정 ]

```shell-session
$ export PATH=/apps/common/curl/7.59.0/bin:$PATH
$ export LD_LIBRARY_PATH=/apps/common/curl/7.59.0/lib:$LD_LIBRARY_PATH
```

## **다. 설치 과정**

설치 과정 소개는 tar 를 이용한 압축 해제 방법과 설정 방법등 진행 절차를 위주로 설명하고, 소스 파일 다운로드 등은 생략합니다.

\[설치과정]

```shell-session
$ tar -xzvf R-3.6.2.tar.gz
$ cd R-3.6.2
$ ./configure --prefix=/scratch/{USER_ID}/R --with-x=no </p>
LDFLAGS="-L/apps/common/readline/7.0/lib -L/apps/common/ncurses/6.1/lib -L/apps/common/bzip2/1.0.8/lib" </p>
CPPFLAGS="-I/apps/common/readline/7.0/include -I/apps/common/ncurses/6.1/include -I/apps/common/bzip2/1.0.8/include"
$ make -j 32
$ make install
```

※ 파란 색으로 표시된 <mark style="color:blue;">**{USER\_ID}**</mark> 위치에는 사용자의 ID로 작성

※ 설치 과정 중 prefix 경로는 설치 안내를 위한 경로이므로 사용자는 설치 희망하는 경로를 지정하여 설치

※ debug 큐노드에서 interactive 작업을 수행하는 경우에는 -j 옵션을 이용하여 여러 core 의 사용이 가능하나 ,로그인 노드에서 작업을 수행하는 경우 make 로 설치 진행하시기 바랍니다.

## **라. 설치 확인 및 실행 예시**

\[ 설치 확인 ]

```shell-session
$ ls /scratch/{USER_ID}/R/bin/R
$ /scratch/{USER_ID}/R/bin/R --version
```

\[ 실행 예시 ]

```shell-session
$ /scratch/{USER_ID}/R/bin/R
> dir.create('~/R/x86_64-pc-linux-gnu-library/3.6.2', showWarnings = FALSE, recursive = TRUE)
> .libPaths(new='~/R/x86_64-pc-linux-gnu-library/3.6.2')
> .libPaths()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-ksc.gitbook.io/blog/install/nurion/r-3.6.2-install.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
