/dports/graphics/R-cran-DiagrammeR/DiagrammeR/R/ |
H A D | get_edges.R | 114 edges_df <- graph$edges_df functionVar 117 edges_df <- 118 edges_df %>% 133 edges_df <- dplyr::filter(.data = edges_df, !!conditions) 160 edges_df <- 161 edges_df %>% 164 edges_df <- 165 edges_df %>% 169 return(edges_df) 176 paste0(edges_df$from, "->", edges_df$to) [all …]
|
H A D | colorize_edge_attrs.R | 94 edges_df <- graph$edges_df functionVar 99 which(colnames(edges_df) %in% edge_attr_from) 104 nrow(unique(edges_df[col_to_recode_no])) 152 to_edge_attr_colnum <- ncol(edges_df) + 1 155 edges_df <- cbind(edges_df, new_edge_attr_col) 173 which(edges_df[, col_to_recode_no] %in% 201 edges_df[recode_rows, to_edge_attr_colnum] <- 207 edges_df[, to_edge_attr_colnum] <- 210 edges_df[, to_edge_attr_colnum] <- 217 edges_attr_vector_colorized <- edges_df[, ncol(edges_df)] [all …]
|
H A D | generate_dot.R | 26 edges_df <- graph$edges_df functionVar 91 edges_df[which(is.na(edges_df[, col_num])), col_num] <- 117 if (!is.null(edges_df)) { 119 if (ncol(edges_df) >= 5) { 121 edges_df <- 122 edges_df %>% 175 edges_df <- 176 edges_df %>% 187 edges_df[ 188 i, which(colnames(edges_df) == edges_df[i, display_col])] [all …]
|
H A D | create_graph.R | 273 edges_df = edf, nameattr 300 edges = nrow(graph$edges_df), 302 d_e = nrow(graph$edges_df) 336 edges = nrow(graph$edges_df), 338 d_e = nrow(graph$edges_df) 353 edges_df <- edges_df %>% as.data.frame(stringsAsFactors = FALSE) 372 if (ncol(edges_df) > 2) { 375 edges_df$rel <- as.character(edges_df$rel) 380 graph$edges_df <- 381 dplyr::bind_rows(graph$edges_df, edges_df) [all …]
|
H A D | is_edge_present.R | 175 any(graph$edges_df$from == from & 176 graph$edges_df$to == to), 183 any(graph$edges_df$from == from & 184 graph$edges_df$to == to) | 185 any(graph$edges_df$from == to & 186 graph$edges_df$to == from), 215 any(graph$edges_df$from == from & 216 graph$edges_df$to == to), 223 any(graph$edges_df$from == from & 224 graph$edges_df$to == to) | [all …]
|
H A D | select_edges.R | 136 edges_df <- graph$edges_df functionVar 150 edges_df <- dplyr::filter(.data = edges_df, !!conditions) 157 if (any(!(from %in% edges_df$from))) { 166 edges_df <- 167 edges_df %>% 175 if (any(!(to %in% edges_df$to))) { 184 edges_df <- 185 edges_df %>% 191 edges_df %>% 223 graph$edges_df %>% [all …]
|
H A D | add_reverse_edges_ws.R | 180 graph$edges_df <- 182 graph$edges_df[1:(nrow(graph$edges_df) - edges_added), ], 184 graph$edges_df[(nrow(graph$edges_df) - edges_added + 1):nrow(graph$edges_df), ], 191 graph$edges_df <- 193 graph$edges_df[1:(nrow(graph$edges_df) - edges_added), ], 195 graph$edges_df[(nrow(graph$edges_df) - edges_added + 1):nrow(graph$edges_df), ], 208 edges = nrow(graph$edges_df),
|
H A D | set_edge_attrs_ws.R | 94 if (edge_attr %in% colnames(graph$edges_df)) { 96 graph$edges_df[ 97 which(graph$edges_df[, 1] %in% edge_ids), 98 which(colnames(graph$edges_df) %in% edge_attr)] <- value 101 graph$edges_df <- 102 graph$edges_df %>% 106 colnames(graph$edges_df)[length(colnames(graph$edges_df))] <- 119 edges = nrow(graph$edges_df))
|
H A D | get_edge_ids.R | 73 if (nrow(graph$edges_df) == 0) { 78 edges_df <- graph$edges_df functionVar 87 edges_df <- dplyr::filter(.data = edges_df, !!conditions) 91 if (nrow(edges_df) == 0) { 95 edges_df %>% dplyr::pull(id)
|
H A D | from_igraph.R | 110 edges_df <- 119 edges_df <- 121 edges_df, 126 edges_df <- 128 edges_df, 130 rel = rep(as.character(NA), nrow(edges_df)), 149 edges_df <- cbind(edges_df, df_col) 160 edges_df = edges_df,
|
H A D | add_gnm_graph.R | 122 sample_gnm_graph$edges_df$rel <- as.character(rel[1]) 134 n_edges <- nrow(sample_gnm_graph$edges_df) 183 if (nrow(edge_aes_tbl) < nrow(sample_gnm_graph$edges_df)) { 185 edge_aes$index__ <- 1:nrow(sample_gnm_graph$edges_df) 204 if (nrow(edge_data_tbl) < nrow(sample_gnm_graph$edges_df)) { 206 edge_data$index__ <- 1:nrow(sample_gnm_graph$edges_df) 239 sample_gnm_graph$edges_df <- 240 sample_gnm_graph$edges_df %>% 247 sample_gnm_graph$edges_df <- 248 sample_gnm_graph$edges_df %>% [all …]
|
H A D | add_growing_graph.R | 119 sample_growing_graph$edges_df$rel <- as.character(rel[1]) 131 n_edges <- nrow(sample_growing_graph$edges_df) 180 if (nrow(edge_aes_tbl) < nrow(sample_growing_graph$edges_df)) { 182 edge_aes$index__ <- 1:nrow(sample_growing_graph$edges_df) 201 if (nrow(edge_data_tbl) < nrow(sample_growing_graph$edges_df)) { 203 edge_data$index__ <- 1:nrow(sample_growing_graph$edges_df) 236 sample_growing_graph$edges_df <- 237 sample_growing_graph$edges_df %>% 244 sample_growing_graph$edges_df <- 245 sample_growing_graph$edges_df %>% [all …]
|
H A D | add_islands_graph.R | 106 sample_islands_graph$edges_df$rel <- as.character(rel[1]) 118 n_edges <- nrow(sample_islands_graph$edges_df) 167 if (nrow(edge_aes_tbl) < nrow(sample_islands_graph$edges_df)) { 169 edge_aes$index__ <- 1:nrow(sample_islands_graph$edges_df) 188 if (nrow(edge_data_tbl) < nrow(sample_islands_graph$edges_df)) { 190 edge_data$index__ <- 1:nrow(sample_islands_graph$edges_df) 223 sample_islands_graph$edges_df <- 224 sample_islands_graph$edges_df %>% 231 sample_islands_graph$edges_df <- 232 sample_islands_graph$edges_df %>% [all …]
|
H A D | add_gnp_graph.R | 119 sample_gnp_graph$edges_df$rel <- as.character(rel[1]) 131 n_edges <- nrow(sample_gnp_graph$edges_df) 180 if (nrow(edge_aes_tbl) < nrow(sample_gnp_graph$edges_df)) { 182 edge_aes$index__ <- 1:nrow(sample_gnp_graph$edges_df) 201 if (nrow(edge_data_tbl) < nrow(sample_gnp_graph$edges_df)) { 203 edge_data$index__ <- 1:nrow(sample_gnp_graph$edges_df) 236 sample_gnp_graph$edges_df <- 237 sample_gnp_graph$edges_df %>% 244 sample_gnp_graph$edges_df <- 245 sample_gnp_graph$edges_df %>% [all …]
|
H A D | add_pa_graph.R | 158 sample_pa_graph$edges_df$rel <- as.character(rel[1]) 170 n_edges <- nrow(sample_pa_graph$edges_df) 219 if (nrow(edge_aes_tbl) < nrow(sample_pa_graph$edges_df)) { 221 edge_aes$index__ <- 1:nrow(sample_pa_graph$edges_df) 240 if (nrow(edge_data_tbl) < nrow(sample_pa_graph$edges_df)) { 242 edge_data$index__ <- 1:nrow(sample_pa_graph$edges_df) 275 sample_pa_graph$edges_df <- 276 sample_pa_graph$edges_df %>% 283 sample_pa_graph$edges_df <- 284 sample_pa_graph$edges_df %>% [all …]
|
H A D | add_smallworld_graph.R | 121 sample_smallworld_graph$edges_df$rel <- as.character(rel[1]) 182 if (nrow(edge_aes_tbl) < nrow(sample_smallworld_graph$edges_df)) { 184 edge_aes$index__ <- 1:nrow(sample_smallworld_graph$edges_df) 203 if (nrow(edge_data_tbl) < nrow(sample_smallworld_graph$edges_df)) { 205 edge_data$index__ <- 1:nrow(sample_smallworld_graph$edges_df) 238 sample_smallworld_graph$edges_df <- 239 sample_smallworld_graph$edges_df %>% 246 sample_smallworld_graph$edges_df <- 247 sample_smallworld_graph$edges_df %>% 274 edges = nrow(graph$edges_df),
|
H A D | get_node_info.R | 43 edge_from <- graph$edges_df$from 44 edge_to <- graph$edges_df$to 54 if (nrow(graph$edges_df) == 0) { 79 } else if (!is.null(graph$edges_df)) { 120 sum(c(graph$edges_df$from, 121 graph$edges_df$to) %in% 168 sum(graph$edges_df$from == graph$edges_df$to & 169 graph$edges_df$to == ordered_nodes[i])
|
H A D | delete_edge.R | 136 if (!(id %in% graph$edges_df$id)) { 144 from_id <- graph$edges_df[which(graph$edges_df$id == id)[1], 2] 145 to_id <- graph$edges_df[which(graph$edges_df$id == id)[1], 3] 243 edf <- graph$edges_df 268 graph$edges_df <- edf 295 graph$edges_df <- edf 312 edges = nrow(graph$edges_df),
|
H A D | add_grid_2d.R | 160 edges_df = grid_edges) 209 if (nrow(edge_aes_tbl) < nrow(grid_graph$edges_df)) { 211 edge_aes$index__ <- 1:nrow(grid_graph$edges_df) 230 if (nrow(edge_data_tbl) < nrow(grid_graph$edges_df)) { 232 edge_data$index__ <- 1:nrow(grid_graph$edges_df) 265 grid_graph$edges_df <- 266 grid_graph$edges_df %>% 273 grid_graph$edges_df <- 274 grid_graph$edges_df %>% 301 edges = nrow(graph$edges_df),
|
/dports/graphics/R-cran-DiagrammeR/DiagrammeR/tests/testthat/ |
H A D | test-traversals_copying_attr_vals.R | 23 expect_equal(ncol(graph$edges_df), 5) 27 expect_equal(colnames(graph$edges_df)[length(colnames(graph$edges_df))], "data") 55 expect_equal(ncol(graph$edges_df), 6) 60 expect_equal(colnames(graph$edges_df)[length(colnames(graph$edges_df))], "edge_value") 89 expect_equal(ncol(graph$edges_df), 6) 93 expect_equal(colnames(graph$edges_df)[length(colnames(graph$edges_df))], "data") 123 expect_equal(ncol(graph$edges_df), 7) 128 expect_equal(colnames(graph$edges_df)[length(colnames(graph$edges_df))], "edge_value") 155 expect_equal(ncol(graph$edges_df), 5) 159 expect_equal(colnames(graph$edges_df)[length(colnames(graph$edges_df))], "data") [all …]
|
H A D | test-add_graphs.R | 1423 graph_1$edges_df, 1424 graph_2$edges_df) 1513 graph_1$edges_df, 1514 graph_2$edges_df) 1604 graph_1$edges_df, 1605 graph_2$edges_df) 1697 graph_1$edges_df, 1698 graph_2$edges_df) 1780 graph_1$edges_df, 1781 graph_2$edges_df) [all …]
|
H A D | test-node_edge_data_aes.R | 452 expect_true("color" %in% (graph_w_attrs_1$edges_df %>% names())) 453 expect_true("color" %in% (graph_w_attrs_2$edges_df %>% names())) 454 expect_true("color" %in% (graph_w_attrs_3$edges_df %>% names())) 455 expect_true("color" %in% (graph_w_attrs_4$edges_df %>% names())) 456 expect_true("color" %in% (graph_w_attrs_5$edges_df %>% names())) 457 expect_true("color" %in% (graph_w_attrs_6$edges_df %>% names())) 458 expect_true("color" %in% (graph_w_attrs_7$edges_df %>% names())) 459 expect_true("color" %in% (graph_w_attrs_8$edges_df %>% names())) 460 expect_true("color" %in% (graph_w_attrs_9$edges_df %>% names())) 461 expect_true("color" %in% (graph_w_attrs_10$edges_df %>% names())) [all …]
|
H A D | test-colorize_nodes_edges.R | 221 "color" %in% colnames(graph$edges_df)) 224 "fontcolor" %in% colnames(graph$edges_df)) 230 length(unique(graph$edges_df$rel)), 231 length(unique(graph$edges_df$color))) 234 length(unique(graph$edges_df$rel)), 235 length(unique(graph$edges_df$fontcolor))) 241 graph$edges_df$color, 248 graph$edges_df$fontcolor, 276 graph$edges_df$labelfontcolor, 315 graph$edges_df$labelfontcolor, [all …]
|
H A D | test-copy_drop_mutate_recode_attrs.R | 90 graph$edges_df$value, 91 graph$edges_df$value_2) 456 graph$edges_df$value, 471 graph$edges_df$value_2, 496 graph$edges_df$value_2, 553 graph$edges_df$value, 787 graph$edges_df$value, 805 graph$edges_df$value_2, 848 graph$edges_df$value, 890 graph$edges_df$color, [all …]
|
H A D | test-set_get_node_edge_attrs.R | 106 graph_set_a_1$edges_df[ 107 which(graph_set_a_1$edges_df$from == 1 & 108 graph_set_a_1$edges_df$to == 2), 5], 5) 121 graph_set_a_1$edges_df[ 122 which(graph_set_a_1$edges_df$from == 1 & 123 graph_set_a_1$edges_df$to == 2), 5], 8) 141 graph_select_a_1$edges_df[ 142 which(graph_select_a_1$edges_df$from == 1 & 155 graph_set_all$edges_df$value == 5)) 170 graph_edge_selection$edges_df[ [all …]
|