library(readr)
HeartFailure_excerpt <- read.csv("C:/Users/Olateru-Olagbegi9176/Downloads/HeartFailure_excerpt.csv", header=FALSE)
View(HeartFailure_excerpt)
features_name<-c('age','creatine','EFC','platelets','serum_creatinine','serum_sodium','time','death_event')
colnames(HeartFailure_excerpt)<-features_name
str(HeartFailure_excerpt)
## 'data.frame': 299 obs. of 8 variables:
## $ age : num 75 55 65 50 65 90 75 60 65 80 ...
## $ creatine : int 582 7861 146 111 160 47 246 315 157 123 ...
## $ EFC : int 20 38 20 20 20 40 15 60 65 35 ...
## $ platelets : num 265000 263358 162000 210000 327000 ...
## $ serum_creatinine: num 1.9 1.1 1.3 1.9 2.7 2.1 1.2 1.1 1.5 9.4 ...
## $ serum_sodium : int 130 136 129 137 116 132 137 131 138 133 ...
## $ time : int 4 6 7 7 8 8 10 10 10 10 ...
## $ death_event : int 1 1 1 1 1 1 1 1 1 1 ...
summary(HeartFailure_excerpt)
## age creatine EFC platelets
## Min. :40.00 Min. : 23.0 Min. :14.00 Min. : 25100
## 1st Qu.:51.00 1st Qu.: 116.5 1st Qu.:30.00 1st Qu.:212500
## Median :60.00 Median : 250.0 Median :38.00 Median :262000
## Mean :60.83 Mean : 581.8 Mean :38.08 Mean :263358
## 3rd Qu.:70.00 3rd Qu.: 582.0 3rd Qu.:45.00 3rd Qu.:303500
## Max. :95.00 Max. :7861.0 Max. :80.00 Max. :850000
## serum_creatinine serum_sodium time death_event
## Min. :0.500 Min. :113.0 Min. : 4.0 Min. :0.0000
## 1st Qu.:0.900 1st Qu.:134.0 1st Qu.: 73.0 1st Qu.:0.0000
## Median :1.100 Median :137.0 Median :115.0 Median :0.0000
## Mean :1.394 Mean :136.6 Mean :130.3 Mean :0.3211
## 3rd Qu.:1.400 3rd Qu.:140.0 3rd Qu.:203.0 3rd Qu.:1.0000
## Max. :9.400 Max. :148.0 Max. :285.0 Max. :1.0000
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.