PnetPathname: Returns the path associated with a network.

PnetPathnameR Documentation

Returns the path associated with a network.

Description

A Pnet is associated with a filename where it is stored. This value should get set when the network is read or written. Note that this will usually be the name of the network with a implementation file type.

Usage

PnetPathname(net)
PnetPathname(net) <- value

Arguments

net

A Pnet Bayesian network.

value

A character scalar giving the pathname for the network.

Value

The getter form returns a character vector of length 1. The setter form return the Pnet argument.

Author(s)

Russell Almond

See Also

Pnet

Examples

## Not run: 
library(PNetica) # Requires PNetica
sess <- NeticaSession()
startSession(sess)
curd <- setwd(system.file("testnets", package="PNetica"))

PM <- ReadNetworks("miniPP-CM.dne", session=sess)
stopifnot(PnetPathname(PM)=="miniPP-CM.dne")
PnetPathname(PM) <- "StudentModel1.dne"
stopifnot(PnetPathname(PM)=="StudentModel1.dne")

DeleteNetwork(PM)

stopSession(sess)
setwd(curd)

## End(Not run)

ralmond/Peanut documentation built on Sept. 19, 2023, 8:27 a.m.