Skip to content

Commit 8dda82b

Browse files
author
ripley
committed
mention what happens with non-existent elements
git-svn-id: https://svn.r-project.org/R/trunk@87454 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent d0f52ae commit 8dda82b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/library/base/man/Extract.Rd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/base/man/Extract.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2022 R Core Team
3+
% Copyright 1995-2024 R Core Team
44
% Copyright 2002-2022 The R Foundation
55
% Distributed under GPL 2 or later
66

@@ -204,6 +204,8 @@ x$name <- value
204204
equivalent to \code{alist[[i1]]\dots[[ip]]} providing all but the
205205
final indexing results in a list.
206206

207+
Attempts to extract a non-existent element return \code{NULL}.
208+
207209
Note that in all three kinds of replacement, a value of \code{NULL}
208210
deletes the corresponding item of the list. To set entries to
209211
\code{NULL}, you need \code{x[i] <- list(NULL)}.

0 commit comments

Comments
 (0)