File: dot-data.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/env-and-data.R
\docType{data}
\name{dot-data}
\alias{dot-data}
\alias{.data}
\alias{dot-env}
\alias{.env}
\title{\code{.data} and \code{.env} pronouns}
\description{
The \code{.data} and \code{.env} pronouns make it explicit where to look up attribute
names when indexing \code{V(g)} or \code{E(g)}, i.e. the vertex or edge sequence of a
graph. These pronouns are inspired by \code{.data} and \code{.env} in \code{rlang} - thanks
to MichaƂ Bojanowski for bringing these to our attention.

The rules are simple:
\itemize{
\item \code{.data} retrieves attributes from the graph whose vertex or edge sequence
is being evaluated.
\item \code{.env} retrieves variables from the calling environment.
}

Note that \code{.data} and \code{.env} are injected dynamically into the environment
where the indexing expressions are evaluated; you cannot get access to these
objects outside the context of an indexing expression. To avoid warnings
printed by \verb{R CMD check} when code containing \code{.data} and \code{.env} is checked,
you can import \code{.data} and \code{.env} from \code{igraph} if needed. Alternatively,
you can declare them explicitly with \code{utils::globalVariables()} to silence
the warnings.
}
\concept{env-and-data}
\keyword{datasets}