Description Usage Arguments Examples
Function to put the results of check_directed_edges function into two lists: One list with all the nodes found on the left side, one with nodes on the right side. The functions thus splits up the list found in check_directed_edges.
1 | list_dir_edges(dir_list)
|
dir_list |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (dir_list)
{
left_list <- list()
right_list <- list()
l <- 1
r <- 1
for (i in seq(1, length(dir_list), 2)) {
left_list[l] <- dir_list[[i]]
l <- l + 1
}
for (i in seq(2, length(dir_list), 2)) {
right_list[r] <- dir_list[[i]]
r <- r + 1
}
leftright_list <- list(left = left_list, right = right_list)
return(leftright_list)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.