File: labels-set.Rd

package info (click to toggle)
r-cran-lava 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,816 kB
  • sloc: sh: 13; makefile: 2
file content (80 lines) | stat: -rw-r--r-- 1,966 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/labels.R
\name{labels<-}
\alias{labels<-}
\alias{labels}
\alias{labels<-.default}
\alias{labels.lvm}
\alias{labels.lvmfit}
\alias{labels.graphNEL}
\alias{edgelabels}
\alias{edgelabels<-}
\alias{edgelabels<-.lvm}
\alias{nodecolor}
\alias{nodecolor<-}
\alias{nodecolor<-.default}
\title{Define labels of graph}
\usage{
\method{labels}{default}(object, ...) <- value
\method{edgelabels}{lvm}(object, to, ...) <- value
\method{nodecolor}{default}(object, var=vars(object),
border, labcol, shape, lwd, ...) <- value
}
\arguments{
\item{object}{\code{lvm}-object.}

\item{\dots}{Additional arguments (\code{lwd}, \code{cex}, \code{col},
\code{labcol}), \code{border}.}

\item{value}{node label/edge label/color}

\item{to}{Formula specifying outcomes and predictors defining relevant
edges.}

\item{var}{Formula or character vector specifying the nodes/variables to
alter.}

\item{border}{Colors of borders}

\item{labcol}{Text label colors}

\item{shape}{Shape of node}

\item{lwd}{Line width of border}
}
\description{
Alters labels of nodes and edges in the graph of a latent variable model
}
\examples{
m <- lvm(c(y,v)~x+z)
regression(m) <- c(v,x)~z
labels(m) <- c(y=expression(psi), z=expression(zeta))
nodecolor(m,~y+z+x,border=c("white","white","black"),
          labcol="white", lwd=c(1,1,5),
          lty=c(1,2)) <-  c("orange","indianred","lightgreen")
edgelabels(m,y~z+x, cex=c(2,1.5), col=c("orange","black"),labcol="darkblue",
           arrowhead=c("tee","dot"),
           lwd=c(3,1)) <- expression(phi,rho)
edgelabels(m,c(v,x)~z, labcol="red", cex=0.8,arrowhead="none") <- 2
if (interactive()) {
    plot(m,addstyle=FALSE)
}

m <- lvm(y~x)
labels(m) <- list(x="multiple\nlines")
if (interactive()) {
op <- par(mfrow=c(1,2))
plot(m,plain=TRUE)
plot(m)
par(op)

d <- sim(m,100)
e <- estimate(m,d)
plot(e,type="sd")
}
}
\author{
Klaus K. Holst
}
\keyword{aplot}
\keyword{graphs}