워라밸 중독자

[R] 스크립트 시작 일반 구조 본문

카테고리 없음

[R] 스크립트 시작 일반 구조

Ufungi 2025. 5. 19. 16:43

# ----------------------
# 제목
# ----------------------

# Setting up environment ===================================================

# Clean environment
rm(list = ls(all.names = TRUE)) # will clear all objects including hidden objects
gc() # free up memory and report the memory usage
options(max.print = .Machine$integer.max, scipen = 999, stringsAsFactors = F, dplyr.summarise.inform = F) # avoid truncated output in R console and scientific notation

# Set seed
set.seed(123456)

# Set project library
.libPaths('C:/Users/laura/Documents/Biostatsquid/Scripts/R4.2.3')
# Loading relevant libraries 
library(tidyverse) 
library(RColorBrewer) # for a colourful plot

# Set relevant paths
list.files()
in_path <- "Datasets/"
out_path <- "Results/"