Diff of /QuRiS_representation.Rmd [000000] .. [aa8877]

Switch to unified view

a b/QuRiS_representation.Rmd
1
---
2
title: "Prognostic Performance"
3
author: "Pranjal"
4
date: "2/21/2019"
5
output: html_document
6
---
7
8
```{r setup, include=FALSE}
9
knitr::opts_chunk$set(echo = TRUE)
10
```
11
## Initial Setup and Package Loads in R 
12
13
Packages used for the analysis.
14
```{r initial_setup, cache=FALSE, message = FALSE, warning = FALSE}
15
library(glmnet);library(survival);library(survminer);library(readxl);library(ggplot2); library(GGally)
16
library(knitr); library(rmdformats); library(magrittr)
17
library(skimr); library(Hmisc); library(Epi); library(vcd)
18
library(tidyverse) 
19
20
source("Love-boost.R")
21
22
## Global options
23
24
options(max.print="75")
25
opts_chunk$set(comment=NA,
26
               message=FALSE,
27
               warning=FALSE)
28
opts_knit$set(width=75)
29
30
31
skimr::skim_with(numeric = list(hist = NULL),
32
                 integer = list(hist = NULL))
33
```
34
35
## Loading the Raw Data into R 
36
37
Loading raw dataset into R.
38
39
Training Data from CCF with minimum and max. survival time.
40
```{r}
41
train <- read.csv("dataset_train.csv")
42
train$censor <- ifelse(train$status == 1,'Censor','Dead')
43
```
44
45
```{r}
46
ggbarplot(train, x = "Cases", y = "RRS",
47
          fill = "censor",               # change fill color by cyl
48
          color = FALSE,            # Set bar border colors to white
49
          palette = "jco",            # jco journal color palett.
50
          sort.val = "desc",          # Sort the value in dscending order
51
          sort.by.groups = FALSE,     # Don't sort inside each group
52
     #     x.text.angle = 90           # Rotate vertically x axis texts
53
          )
54
```
55
56
# TCGA DATASET
57
```{r train_set}
58
TCGA <- read.csv("dataset_nsclc.csv")
59
TCGA$censor <- ifelse(TCGA$status == 1,'Censor','Dead')
60
```
61
62
```{r}
63
ggbarplot(TCGA, x = "Cases", y = "RRS",
64
          fill = "censor",               # change fill color by cyl
65
          color = FALSE,            # Set bar border colors to white
66
          palette = "jco",            # jco journal color palett.
67
          sort.val = "desc",          # Sort the value in dscending order
68
          sort.by.groups = FALSE,     # Don't sort inside each group
69
     #     x.text.angle = 90           # Rotate vertically x axis texts
70
          )
71
```
72
73
74
# UPENN DATASET
75
```{r }
76
UPENN <- read.csv("dataset_upenn.csv")
77
UPENN$censor <- ifelse(UPENN$status == 1,'Censor','Dead')
78
```
79
80
81
```{r}
82
ggbarplot(UPENN, x = "Cases", y = "RRS",
83
          fill = "censor",               # change fill color by cyl
84
          color = FALSE,            # Set bar border colors to white
85
          palette = "jco",            # jco journal color palett.
86
          sort.val = "desc",          # Sort the value in dscending order
87
          sort.by.groups = FALSE,     # Don't sort inside each group
88
     #     x.text.angle = 90           # Rotate vertically x axis texts
89
          )
90
```