From 2812f55f77203a043904ad2efa5496d8023b70c8 Mon Sep 17 00:00:00 2001 From: Michael Lawrence Date: Wed, 21 Aug 2024 02:58:46 -0700 Subject: [PATCH] add prop_is_read_only() to check for a read-only property --- R/property.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/property.R b/R/property.R index f337f810..c5a42ee5 100644 --- a/R/property.R +++ b/R/property.R @@ -453,3 +453,7 @@ as_property <- function(x, name, i) { new_property(x, name = name) } } + +prop_is_read_only <- function(x) { + !is.null(x$getter) && is.null(x$setter) +}