Skip to content

Commit

Permalink
mention what happens with non-existent elements
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87454 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Dec 23, 2024
1 parent d0f52ae commit 8dda82b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/library/base/man/Extract.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% File src/library/base/man/Extract.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2022 R Core Team
% Copyright 1995-2024 R Core Team
% Copyright 2002-2022 The R Foundation
% Distributed under GPL 2 or later

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

Attempts to extract a non-existent element return \code{NULL}.

Note that in all three kinds of replacement, a value of \code{NULL}
deletes the corresponding item of the list. To set entries to
\code{NULL}, you need \code{x[i] <- list(NULL)}.
Expand Down

0 comments on commit 8dda82b

Please sign in to comment.