://rdrr.io/r/base/lapply.html'>sapply</a></span><span class='op'>(</span><span class='va'>tuneGrid</span><span class='op'>$</span><span class='va'>cov</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='kw'>if</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/nchar.html'>nchar</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span><span class='op'>==</span><span class='fl'