This is a helper function used by some seawater functions
(with names starting with
facilitate the specification of water properties either with
distinct arguments, or with data stored within an
object that is the first argument.
A list of elements, typically arguments that will be used in sw functions.
A list with elements of the same names but possibly filled in from the first element.
list is not an
oce object, then the
return value of
lookWithin is the same as the input
value, except that (a)
eos is completed to either
"unesco" and (b) if
latitude are within
list, then they
are possibly lengthened, to have the same length as the first
item in the
data slot of
The examples may clarify this somewhat.
## 1. If first item is not a CTD object, just return the input lookWithin(list(a=1, b=2)) # returns a list#> $a #>  1 #> #> $b #>  2 #>#> List of 1 #> $ salinity: num [1:181] 29.9 29.9 29.9 29.9 29.9 ...## 3. Extract salinity and temperature. Note that the ## value specified for temperature is ignored; all that matters ## is that temperature is named. str(lookWithin(list(salinity=ctd, temperature=NULL)))#> List of 2 #> $ salinity : num [1:181] 29.9 29.9 29.9 29.9 29.9 ... #> $ temperature: num [1:181] 14.2 14.2 14.2 14.2 14.2 ...