[{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"easy-data-set-to-data-base-workflow","dir":"Articles","previous_headings":"","what":"Easy data set to data base workflow","title":"ds2dd","text":"function can used simple tool creating data base metadata file REDCap (called DataDictionary) based given data set file.","code":""},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"step-1---load-your-data-set","dir":"Articles","previous_headings":"Easy data set to data base workflow","what":"Step 1 - Load your data set","title":"ds2dd","text":"’ll use sample TALOS dataset included package.","code":"data(\"talos\") ds <- talos # As the data set lacks an ID column, one is added ds$id <- seq_len(nrow(ds))"},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"step-2---create-the-datadictionary","dir":"Articles","previous_headings":"Easy data set to data base workflow","what":"Step 2 - Create the DataDictionary","title":"ds2dd","text":"Now additional specifications DataDictionary can made manually, can uploaded modified manually graphical user interface web page. function transform column names lower case substitute spaces underscores. output list DataDictionary vector new column names dataset fit meta data.","code":"datadictionary <- ds2dd(ds,record.id = \"id\",include.column.names = TRUE)"},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"step-3---meta-data-upload","dir":"Articles","previous_headings":"Easy data set to data base workflow","what":"Step 3 - Meta data upload","title":"ds2dd","text":"Now DataDictionary can exported spreadsheet uploaded can uploaded using REDCapR package (projects “Development” status). Use one two approaches :","code":""},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"manual-upload","dir":"Articles","previous_headings":"Easy data set to data base workflow > Step 3 - Meta data upload","what":"Manual upload","title":"ds2dd","text":"","code":"write.csv(datadictionary$DataDictionary,\"datadictionary.csv\")"},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"upload-with-redcapr","dir":"Articles","previous_headings":"Easy data set to data base workflow > Step 3 - Meta data upload","what":"Upload with REDCapR","title":"ds2dd","text":"“REDCap R Handbook” written interfacing REDCap R using library(keyring)store credentials chapter 1.1.","code":"REDCapR::redcap_metadata_write( datadictionary$DataDictionary, redcap_uri = keyring::key_get(\"DB_URI\"), token = keyring::key_get(\"DB_TOKEN\") )"},{"path":"https://agdamsbo.github.io/stRoke/articles/ds2dd.html","id":"step-4---data-upload","dir":"Articles","previous_headings":"Easy data set to data base workflow","what":"Step 4 - Data upload","title":"ds2dd","text":"two options available data upload meta data upload: manual REDCapR. latter shown .","code":"# new column names are applied colnames(ds) <- datadictionary$`Column names` REDCapR::redcap_write( ds, redcap_uri = keyring::key_get(\"DB_URI\"), token = keyring::key_get(\"DB_TOKEN\") )"},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"a-toolbox","dir":"Articles","previous_headings":"","what":"A toolbox","title":"Toolbox","text":"toolbox small workshop mix old, worn, well proven tools newcomers. package seen something like . tried collect tools functions packages use regularly addition functions written fill use cases, able find solutions elsewhere. documenting testing package, used OpenAI’s chatgpt gpttools. chatgpt interesting tool, way perfect, helps tedious tasks. gpttools gptstudio interesting implementations R RStudio.","code":""},{"path":"https://agdamsbo.github.io/stRoke/articles/toolbox.html","id":"cpr-intro","dir":"Articles","previous_headings":"A toolbox","what":"CPR manipulations","title":"Toolbox","text":"Note,handled,CPRnumbers(socialsecuritynumbers)handledcareconsideredhighlysensitivedata.CPRnumberstructuredDDMMYY-XXXX,1stXdesignatingdecadebirth,lastXdesignatebinarygender(biologicalsex)dependenteven