Description Usage Arguments Details Examples
View source: R/import_medpc_to_formal_event_record.R
import_medpc_to_UOA
is a function for importing data from MED-PC backup files into a list UOA_analysis_object
s and an associated list of meta data.
1 2 | mpc_backup_reader(datatable, file_match, variable_arrays, event_arrays,
general_arrays, rounding, row)
|
variable_arrays |
A nested list. At the first level, a named list specifying the name of the array that is recorded in MED-PC. At the second level, the array indices that are associated with the elements of the array. Defaults to |
event_arrays |
A nested list. At the first level, a named list specifying the name of the array that is recorded in MED-PC. At the second level, the event codes that are associated with the elements of the array. Defaults to |
general_arrays |
A one-level list. The names of each element should correspond to the arrays that are recorded in MED-PC. Each element should be a name describing what that array is recording. Defaults to |
partial_file_name |
A string that specifies a partial file name. The |
file_path |
A string specifying the file path for |
precision |
The number of decimal places to round the data. Defaults to |
In the event array, it is assumed that each event is recorded as a number. The leading values of the event should correspond to some event. The trailing values should correspond to the time at which an event occurred. For example, let 9000000 indicate a response and let 1320 be the number of seconds at which a response occurred. The event would then be recorded as 9001320.
The import_medpc_to_UOA
function processes the event numbers from the MED-PC backup files and splits them into an event-time data frame. This is done by figuring out the multiple of 10 on which the events are recorded with floor( log( event_array[1], 10 )
. Hence, problems will arise if the first value in the MED-PC event vector is 0. The time associated with each event is obtained by the remainder of the quotient of the event number and the event code multipled by the appropriate power of 10.
1 2 3 4 5 6 | variable_arrays = list( C = c("resp","rft") )
event_arrays = list( X = c("resp_time" = 1, "rft_time" = 2, "start" = 9 ) )
general_arrays = list( J = "arranged_vi" )
file_path = "F:/Dropbox/Don/model_data"
data = import_medpc_to_formal_event_record( "Backup", variable_arrays, event_arrays, general_arrays, file_path = "F:\\Dropbox\\Don\\model_data", rounding = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.