isfield {matlab2r} | R Documentation |
Checks if a list contains a field
Description
This function tries to replicate the behavior of the isfield
function in Matlab
Usage
isfield(x, field)
Arguments
x |
list |
field |
name of field |
Value
A logical vector determining if field
is within
names(x)
References
https://se.mathworks.com/help/matlab/ref/isfield.html
Examples
S <- list(
x = rnorm(100),
title = "x"
)
isfield(S, "title")
isfield(S, "z")
[Package matlab2r version 1.5.0 Index]