Last chance! 50% off unlimited learning
Sale ends in
These functions import from and export to UCINET network files.
read_ucinet(header_file, as = c("igraph", "network", "matrix"))write_ucinet(
object,
filename = deparse(substitute(object)),
name = deparse(substitute(object))
)
A character string giving the path to the header (.##h) file. If the function is called without a header_file specified, an OS-specific file picker is opened to help users select it.
An output class. One of "igraph", "network", or "matrix". By default "igraph".
A migraph-consistent object to be exported.
UCINET filename (without ## extension). By default the files will have the same name as the object and be saved to the working directory.
name of matrix to be known in UCINET. By default the name will be the same as the object.
By default, read_ucinet()
will import into a matrix format,
but can be easily coerced from there into other formats.
A pair of UCINET files in V6404 file format (.##h, .##h)
These functions only work with relatively recent UCINET file formats, e.g. type 6406 files. To import earlier UCINET file types, you will need to update them first.
To import multiple matrices packed into a single UCINET file, you will need to unpack them and convert them one by one.
# NOT RUN {
# import Roethlisberger & Dickson's horseplay game data set:
horseplay <- read_ucinet("WIRING-RDGAM.##h")
# }
# NOT RUN {
# export it again to UCINET under a different name:
write.ucinet(horseplay,"R&D-horseplay")
# }
Run the code above in your browser using DataLab