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:
library(readr)
HeartFailure_excerpt <- read_csv("C:/Users/ijiol/Downloads/HeartFailure_excerpt.csv")
## Rows: 298 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (8): 75, 582, 20, 265000, 1.9, 130, 4, 1
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
hf<- HeartFailure_excerpt
View(hf)
feature_name <-c('Age','CPLotCeidb','EFC','Platelets','serum Creatinine','Serum_sodium','Time','Death_event')
colnames(hf) <- feature_name
str(hf)
## spc_tbl_ [298 × 8] (S3: spec_tbl_df/tbl_df/tbl/data.frame)
## $ Age : num [1:298] 55 65 50 65 90 75 60 65 80 75 ...
## $ CPLotCeidb : num [1:298] 7861 146 111 160 47 ...
## $ EFC : num [1:298] 38 20 20 20 40 15 60 65 35 38 ...
## $ Platelets : num [1:298] 263358 162000 210000 327000 204000 ...
## $ serum Creatinine: num [1:298] 1.1 1.3 1.9 2.7 2.1 1.2 1.1 1.5 9.4 4 ...
## $ Serum_sodium : num [1:298] 136 129 137 116 132 137 131 138 133 131 ...
## $ Time : num [1:298] 6 7 7 8 8 10 10 10 10 10 ...
## $ Death_event : num [1:298] 1 1 1 1 1 1 1 1 1 1 ...
## - attr(*, "spec")=
## .. cols(
## .. `75` = col_double(),
## .. `582` = col_double(),
## .. `20` = col_double(),
## .. `265000` = col_double(),
## .. `1.9` = col_double(),
## .. `130` = col_double(),
## .. `4` = col_double(),
## .. `1` = col_double()
## .. )
## - attr(*, "problems")=<externalptr>
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.