Error in `file(con, "r")`: cannot open the connection

histon_path <- system.file("extdata", "histon_data.csv", package="gen3DNet")
phospho_path <- system.file("extdata", "phospho_data.csv", package="gen3DNet")
verify_folders_same <- function(folder_a, folder_b, parent_folder = ".") {
if (length(subfolders_a) != length(subfolders_b)) {
#If both are files, not folders, check whether the files are equal.
sub_result <- verify_files_same(file.path(folder_a, item_a), file.path(folder_b, item_b))
#If one is a file, but the other is a folder, they can't be the same.
sub_result <- verify_folders_same(file.path(folder_a, item_a[idx]), file.path(folder_b, item_b[idx]))
verify_files_same <- function(file_a, file_b) {
if (length(file_a_lines) == length(file_b_lines)) {
result <- all(file_a_lines == file_b_lines)
k_selection_functions = list(max_cophenetic, kneedle_silhouette_consensus, kneedle_cophenetic, max_silhouette_consensus, max_cophenetic, max_ward_kl)
for (k_selection_function in k_selection_functions) {