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.
library(readxl)
SMET <- read_excel("C:/Users/UNICA/Desktop/CLASE DE CIENCIAS BASICA 2021/SMET.xlsx")
head(SMET)
## # A tibble: 6 x 14
## EDAD GENERO HTA calcimc IMC_REAL GLUCOSA GLICEMIA COLESTEROL
## <dbl> <chr> <chr> <dbl> <chr> <dbl> <chr> <dbl>
## 1 60 Masculino Si 23.8 Normal 79.2 No 221.
## 2 56 Masculino No 26.9 Sobrepeso 72.3 No 181.
## 3 63 Femenino No 28.0 Sobrepeso 80.8 No 247.
## 4 66 Masculino No 22.3 Normal 81.4 No 236.
## 5 64 Masculino No 22.3 Normal 127. Si 201.
## 6 45 Femenino No 31.8 Obesidad I 89 No 151.
## # ... with 6 more variables: COLESTEROL_TOTAL <chr>, TRIGLICÉRIDOS <dbl>,
## # TRIGLICERIDOS_COD <chr>, ÁCIDO_ÚRICO <dbl>, AU <chr>, CREATININA <dbl>
library(tableone)
## Warning: package 'tableone' was built under R version 4.0.5
tab=CreateTableOne(data=SMET)
print(tab,showAllLevels=T)
##
## level Overall
## n 49
## EDAD (mean (SD)) 48.63 (12.77)
## GENERO (%) Femenino 19 (38.8)
## Masculino 30 (61.2)
## HTA (%) No 37 (75.5)
## Si 12 (24.5)
## calcimc (mean (SD)) 29.18 (4.30)
## IMC_REAL (%) Normal 9 (18.4)
## Obesidad I 14 (28.6)
## Obesidad II 2 ( 4.1)
## Obesidad Mórbida 2 ( 4.1)
## Sobrepeso 22 (44.9)
## GLUCOSA (mean (SD)) 92.26 (36.21)
## GLICEMIA (%) No 43 (87.8)
## Si 6 (12.2)
## COLESTEROL (mean (SD)) 146.13 (49.55)
## COLESTEROL_TOTAL (%) No 38 (77.6)
## Si 11 (22.4)
## TRIGLICÉRIDOS (mean (SD)) 174.81 (84.01)
## TRIGLICERIDOS_COD (%) No 22 (44.9)
## Si 27 (55.1)
## ÁCIDO_ÚRICO (mean (SD)) 4.61 (1.93)
## AU (%) No 29 (59.2)
## Si 20 (40.8)
## CREATININA (mean (SD)) 1.18 (0.12)