# R语言：数据集分割

## 安装补充包

- conda activate ggsurvplot
- conda install -c conda-forge r-catools -y

## 划分训练集和验证集

    1
    2
    3
    4
    5
    6

    library("caTools")
    dat <- readRDS('../data/dat.rds')
    set.seed(123)
    split = sample.split(substr(rownames(dat),1,2),SplitRatio = .8)
    train_data = subset(dat, split == TRUE)
    test_data  = subset(dat, split == FALSE)

数据清洗
R语言：数据集分割
https://occdn.limour.top/2267.html
Author
Limour
Posted on
August 19, 2022
Licensed under
蛋白互作网络PPI分析后进行hub基因提取 Previous
COX-Ridge：外部数据集验证 Next

#### Search

Keyword