title: How to apply inverse hyperbolic sine using the repices package in R?
body: <p>I am exploring the <code>recipes</code> package to prepare my data for linear regression. But even a simple transformation of two variables using inverse hyperbolic sine does not yield the results I am expecting. What am I getting wrong here?</p>
  <pre class="lang-r prettyprint-override"><code>library(tidyverse)
  library(recipes)
  
  set.seed(1)
  
  df &lt;- tibble(
    x = runif(4) * 10,
    y = runif(4) * 10
  )
  
  # manual transformation
  df %&gt;% 
    mutate(x = asinh(x),
           y = asinh(y))
  #&gt; # A tibble: 4 × 2
  #&gt;       x     y
  #&gt;   &lt;dbl&gt; &lt;dbl&gt;
  #&gt; 1  1.70  1.45
  #&gt; 2  2.02  2.89
  #&gt; 3  2.45  2.94
  #&gt; 4  2.90  2.59
  
  # transformation using recipes
  rec_obj &lt;- recipe(y ~ x, data = df)
  
  rec_obj %&gt;% 
    step_hyperbolic(x, y, func = &quot;sin&quot;, inverse = TRUE) %&gt;% 
    prep() %&gt;%
    bake(new_data = NULL)
  #&gt; Warning in func(getElement(new_data, col_names[i])): NaNs produced
  
  #&gt; Warning in func(getElement(new_data, col_names[i])): NaNs produced
  #&gt; # A tibble: 4 × 2
  #&gt;       x     y
  #&gt;   &lt;dbl&gt; &lt;dbl&gt;
  #&gt; 1   NaN   NaN
  #&gt; 2   NaN   NaN
  #&gt; 3   NaN   NaN
  #&gt; 4   NaN   NaN
  </code></pre>
  <p><sup>Created on 2022-03-01 by the <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex package</a> (v2.0.1)</sup></p>