done for now with nice headers

This commit is contained in:
AG Damsbo 2022-08-19 10:43:21 +02:00
parent 187e773f1c
commit 699a918e62
3 changed files with 33 additions and 4 deletions

View File

@ -24,8 +24,8 @@ setwd(old_wd)
## 18aug2022 Its alive!!
## https://cognitiveindex.shinyapps.io/index_app/
## 19aug2022
##
## 19aug2022 - 1
## Now live with a choice between single entry or file upload, and download option for results in both cases.
## Wishlist:
## - Still missing is a better labelling, however this works for now.
@ -35,3 +35,8 @@ setwd(old_wd)
## - And then download: https://shiny.rstudio.com/articles/download.html
##
## Now moved to my PhysicalActivityandStrokeOutcome-repository.
##
## 19aug2022 - 2
## Now table headers are updated. Done for now!
##
##

View File

@ -15,8 +15,10 @@ df<-redcap_api_export_short(id= c(40:45),
colnames(df)<-c("record_id","ab","age","imm","vis","ver","att","del")
## New index numbers
df$record_id<-1:nrow(df)
## Age is changed for obscurity
df$age<-sample(-2:2,nrow(df),TRUE)+df$age
write.csv(df, "sample.csv", row.names = FALSE)

View File

@ -43,11 +43,33 @@ server <- function(input, output, session) {
return(head(dat_u(),10))}
})
index_p <- reactive({ index_from_raw(ds=dat_f(),
index_p <- reactive({ df<-index_from_raw(ds=dat_f(),
indx=read.csv("https://raw.githubusercontent.com/agdamsbo/ENIGMAtrial_R/main/data/index.csv"),
version = dat_f()$ab,
age = dat_f()$age,
raw_columns=c("imm","vis","ver","att","del")) })
raw_columns=c("imm","vis","ver","att","del"))
colnames(df)<-c("id",
"immediate_is",
"visuospatial_is",
"verbal_is",
"attention_is",
"delayed_is",
"total_is",
"immediate_ci",
"visuospatial_ci",
"verbal_ci",
"attention_ci",
"delayed_ci",
"total_ci",
"immediate_per",
"visuospatial_per",
"verbal_per",
"attention_per",
"delayed_per",
"total_per")
return(df)
})
output$ndx.tbl <- renderTable({