The R Project SVN R

Rev

Rev 16763 | Rev 38586 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16763 Rev 23710
Line 2... Line 2...
2
\title{Binding and Environment Adjustments}
2
\title{Binding and Environment Adjustments}
3
\usage{
3
\usage{
4
lockEnvironment(env, bindings = FALSE)
4
lockEnvironment(env, bindings = FALSE)
5
environmentIsLocked(env)
5
environmentIsLocked(env)
6
lockBinding(sym, env)
6
lockBinding(sym, env)
-
 
7
unlockBinding(sym, env)
7
bindingIsLocked(sym, env)
8
bindingIsLocked(sym, env)
8
makeActiveBinding(sym, fun, env)
9
makeActiveBinding(sym, fun, env)
9
bindingIsActive(sym, env)
10
bindingIsActive(sym, env)
10
}
11
}
11
\alias{bindenv}
12
\alias{bindenv}
12
\alias{lockEnvironment}
13
\alias{lockEnvironment}
13
\alias{environmentIsLocked}
14
\alias{environmentIsLocked}
14
\alias{lockBinding}
15
\alias{lockBinding}
-
 
16
\alias{unlockBinding}
15
\alias{makeActiveBinding}
17
\alias{makeActiveBinding}
16
\alias{bindingIsLocked}
18
\alias{bindingIsLocked}
17
\alias{bindingIsActive}
19
\alias{bindingIsActive}
18
\arguments{
20
\arguments{
19
  \item{env}{an environment.}
21
  \item{env}{an environment.}
Line 61... Line 63...
61
e<-new.env()
63
e<-new.env()
62
assign("x",1, env=e)
64
assign("x",1, env=e)
63
get("x",env=e)
65
get("x",env=e)
64
lockBinding("x", e)
66
lockBinding("x", e)
65
try(assign("x",2, env=e)) # error
67
try(assign("x",2, env=e)) # error
-
 
68
unlockBinding("x", e)
-
 
69
assign("x",2, env=e)
-
 
70
get("x",env=e)
66
 
71
 
67
# active bindings
72
# active bindings
68
f<-local({
73
f<-local({
69
    x <- 1
74
    x <- 1
70
    function(v) {
75
    function(v) {