From 324b9d87b30b874aa27f46bddaff921698012cf5 Mon Sep 17 00:00:00 2001 From: "xuanyi.wang" Date: Mon, 22 May 2023 20:44:17 +0200 Subject: [PATCH] Update page 'Solutions to the questions concerning R language' --- Solutions to the questions concerning R language.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Solutions to the questions concerning R language.md diff --git a/Solutions to the questions concerning R language.md b/Solutions to the questions concerning R language.md new file mode 100644 index 0000000..19bc7a3 --- /dev/null +++ b/Solutions to the questions concerning R language.md @@ -0,0 +1,10 @@ +***Applied Question*** + +**i.** +``` +library(ISLR) +set.seed(9004) +train = sample(dim(OJ)[1], 800) +OJ.train = OJ[train, ] +OJ.test = OJ[-train, ] +``` \ No newline at end of file