powered by
This function tries to replicate the behavior of the isfield function in Matlab
isfield
isfield(x, field)
A logical vector determining if field is within names(x)
field
names(x)
list
name of field
https://se.mathworks.com/help/matlab/ref/isfield.html
S <- list( x = rnorm(100), title = "x" ) isfield(S, "title") isfield(S, "z")
Run the code above in your browser using DataLab