# 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