complete_matrix | R Documentation |
Makes a matrix symmetric by averaging the elements of the matrix and its
transpose. When This function fills in NA
elements of a matrix with the corresponding
value from the matrix transpose, if available
complete_matrix(m, na.rm = TRUE)
m |
Numeric matrix to complete. |
na.rm |
Logical. Should missing values be dropped? (default: |
A completed matrix.
predictors <- c('auto', 'skill_var', 'task_var', 'task_sig', 'task_id',
'fb_job', 'job_comp', 'interdep', 'fb_others', 'soc_support')
m <- jobchar$sevar_r[c('perform', predictors), c('perform', predictors)]
complete_matrix(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.