actel (version 1.1.0)

readDot: Read dot file or string

Description

Read dot file or string

Usage

readDot(input = NULL, string = NULL)

Arguments

input

The name of a file containing dot connections.

string

A string of dot connections.

Value

A data frame with the connections present in the input.

Examples

Run this code
# NOT RUN {
# create dummy dot string
x1 <- c("A--B--C--D--E--F")

# run readDot
readDot(string = x1)

# more complex strings are acceptable:
x2 <- c(
"A--B--C--D--E--F
A--G--H--I--E
H--C")

readDot(string = x2)

# Alternatively, connections can be read from a file

# let's create a dummy file in R's temporary directory:
write("A--B--C--D--E--F\nA--G--H--I--E\nH--C\n",
 file = paste0(tempdir(), "/dummy_dot.txt"))

# now we can read it using readDot
readDot(input = paste0(tempdir(), "/dummy_dot.txt"))

# }

Run the code above in your browser using DataCamp Workspace