R/to_subdir_matrix.R
to_subdir_matrix.Rd
Convert a Vector of Paths to a Matrix of Subfolders
to_subdir_matrix(paths, fill.value = "", result_type = "matrix", dbg = FALSE, method = NA_integer_)
paths | vector of path strings |
---|---|
fill.value | value used to fill empty cells of the result matrix |
result_type | one of |
dbg | if |
method | integer specifying the implementation method. Currently not used. |
matrix or data frame, depending on result_type
#> [,1] [,2] [,3] #> [1,] "a1" "b1" "c1" #> [2,] "a1" "b2" "" #> [3,] "a2" "" ""dim(folder_matrix)#> [1] 3 3folder_matrix[folder_matrix[, 1] == "a1", ]#> [,1] [,2] [,3] #> [1,] "a1" "b1" "c1" #> [2,] "a1" "b2" ""