apply_flexfile() is used to apply a function over each element of a list of objects of type 'flexfile'. If the input is a single 'flexfile' is (i.e., not a list), then the function will be applied only to that item.

Therefore, use apply_flexfile when you wish to apply a function and are unsure if the input is a list of flexfiles or a single flexfile.

apply_flexfile(flexfile, fun, ...)

Arguments

flexfile

A single flexfile or a list of flexfiles imported through the read_flexfile function.

fun

The function to be applied.

...

Additional arguments passed to fun.

Value

The original structure with the function applied.