File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
% File src / library / base / man / Control.Rd
2
2
% Part of the R package , https : // www.R - project.org
3
- % Copyright 1995 - 2024 R Core Team
3
+ % Copyright 1995 - 2025 R Core Team
4
4
% Distributed under GPL 2 or later
5
5
6
6
\name {Control }
@@ -69,7 +69,11 @@ x \%||\% y
69
69
variable \code {var } is assigned in turn the value of each element of
70
70
\code {seq }. You can assign to \code {var } within the body of the loop ,
71
71
but this will not affect the next iteration. When the loop terminates ,
72
- \code {var } remains as a variable containing its latest value.
72
+ \code {var } remains as a variable containing its latest value. The
73
+ \code {seq } is implicitly unclassed. For classed objects , one can use
74
+ \code {\link {as.list }} to prepare a list to iterate over or
75
+ \code {\link {seq_along }} to get an index vector and then explicitly extract
76
+ individual elements (see also \code {\link {lapply }}).
73
77
74
78
The null coalescing operator \code {\%|| \%} is a simple 1 - line function :
75
79
\code {x \%|| \% y } is an idiomatic way to call
You can’t perform that action at this time.
0 commit comments