library(readr)
misdatos <- read_csv("heart_failure_clinical_records_dataset.csv")Rows: 299 Columns: 13
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
dbl (13): age, anaemia, creatinine_phosphokinase, diabetes, ejection_fractio...
ℹ 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.
View(misdatos)
misdatos=as.data.frame(misdatos)
str(misdatos)'data.frame': 299 obs. of 13 variables:
$ age : num 75 55 65 50 65 90 75 60 65 80 ...
$ anaemia : num 0 0 0 1 1 1 1 1 0 1 ...
$ creatinine_phosphokinase: num 582 7861 146 111 160 ...
$ diabetes : num 0 0 0 0 1 0 0 1 0 0 ...
$ ejection_fraction : num 20 38 20 20 20 40 15 60 65 35 ...
$ high_blood_pressure : num 1 0 0 0 0 1 0 0 0 1 ...
$ 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 : num 130 136 129 137 116 132 137 131 138 133 ...
$ sex : num 1 1 1 1 0 1 1 1 0 1 ...
$ smoking : num 0 0 1 0 0 1 0 1 0 1 ...
$ time : num 4 6 7 7 8 8 10 10 10 10 ...
$ DEATH_EVENT : num 1 1 1 1 1 1 1 1 1 1 ...
head(misdatos) age anaemia creatinine_phosphokinase diabetes ejection_fraction
1 75 0 582 0 20
2 55 0 7861 0 38
3 65 0 146 0 20
4 50 1 111 0 20
5 65 1 160 1 20
6 90 1 47 0 40
high_blood_pressure platelets serum_creatinine serum_sodium sex smoking time
1 1 265000 1.9 130 1 0 4
2 0 263358 1.1 136 1 0 6
3 0 162000 1.3 129 1 1 7
4 0 210000 1.9 137 1 0 7
5 0 327000 2.7 116 0 0 8
6 1 204000 2.1 132 1 1 8
DEATH_EVENT
1 1
2 1
3 1
4 1
5 1
6 1