Skip to contents

Merge Read and Write Permission Matrices

Usage

merge_read_and_write_matrices(matrix_read, matrix_write)

Arguments

matrix_read

matrix of 0 with 1 at positions with read-permissions

matrix_write

matrix of 0 with 2 at positions with write-permissions

Value

matrix of character with "" at positions without permissions, "-" at positions with read-permissions, "|" at positions with write-permissions and "+" at positions with read- and write-permissions

Examples


# Get example matrices
matrices <- get_example_read_and_write_matrices()

# Overlay example matrices
merge_read_and_write_matrices(matrices$read, matrices$write)
#>        user_1 user_2 user_3 user_4 user_5 user_5 user_6 user_6 user_7 user_8
#> path_1 ""     ""     ""     ""     "-"    ""     ""     ""     ""     "-"   
#> path_2 ""     ""     ""     ""     ""     ""     ""     ""     ""     "-"   
#> path_3 ""     ""     ""     ""     "-"    ""     ""     ""     "-"    "-"   
#> path_4 ""     "|"    ""     "|"    ""     ""     "-"    ""     ""     "-"   
#> path_4 ""     ""     ""     ""     ""     ""     ""     ""     ""     ""    
#> path_5 "|"    ""     ""     "|"    "-"    ""     "-"    ""     ""     ""    
#> path_5 ""     ""     ""     ""     ""     ""     ""     ""     ""     ""    
#> path_6 "|"    ""     ""     "|"    "|"    ""     "|"    ""     ""     ""    
#> path_7 ""     "|"    ""     "|"    "|"    ""     "|"    ""     ""     ""