bilex {ppRank} | R Documentation |
Bilex Function
Description
This function reads two CSV files containing matrices of values (T_file and R_file) and applies a transformation to matrix R according to certain rules.
Usage
bilex(R_file, T_file, has_header = FALSE)
Arguments
R_file |
The filename of the CSV file containing the matrix R (located in inst/extdata). |
T_file |
The filename of the CSV file containing the matrix T (located in inst/extdata). |
has_header |
Logical, indicating if the CSV files have a header row. Default is FALSE. |
Details
This function performs a transformation on matrix R based on the following rules: - If a value in R is 0, it is replaced by a classification value. - Classification values are determined based on comparisons between neighboring values in R and corresponding values in T. - The classification of each value in R depends on the values in the same row of R, considering both numerical values and the relationship with neighboring values.
Value
A modified matrix R according to the specified rules.
Examples
bilex_result <- bilex(system.file("extdata", "R.csv", package = "ppRank"),
system.file("extdata", "T.csv", package = "ppRank"), has_header = TRUE)
bilex_result <- bilex(system.file("extdata", "R.csv", package = "ppRank"),
system.file("extdata", "T.csv", package = "ppRank"))