title: How to use log() transformation in a dataframe list and perform aov()?
body: <p>I hope someone can help me. I am trying to transform my <code>Weight</code> and <code>Height</code> data to follow a normal distribution and perform anova with it in each data frame. However, I cannot append a new column to the original dataframe with the transformed values. The <code>Person</code> and <code>Age</code> factors are important in the analysis.</p>
  <p>I have this data</p>
  <pre><code>df_list &lt;- list(
    `1.3.A` = 
      tibble::tribble(
        ~Person, ~Height, ~Weight,  ~Age, 
        &quot;Alex&quot;,    175L,     75L,    15,
        &quot;Gerard&quot;,    180L,     85L,  17,
        &quot;Clyde&quot;,    179L,     79L,   19,
        &quot;Alex&quot;,    175L,     75L,    22,
        &quot;Gerard&quot;,    180L,     85L,  21,
        &quot;Clyde&quot;,    179L,     79L,    20
  
      ),
    `2.2.A` = 
      tibble::tribble(
        ~Person, ~Height, ~Weight,   ~Age,
        &quot;Alex&quot;,    175L,     75L,     18,
        &quot;Gerard&quot;,    180L,     85L,   18,
        &quot;Clyde&quot;,    179L,     79L,    19,
         &quot;Alex&quot;,    175L,     75L,    25,
        &quot;Gerard&quot;,    180L,     85L,   27,
        &quot;Clyde&quot;,    179L,     79L,    26
      ), 
    `1.1.B` = 
      tibble::tribble(
        ~Person, ~Height, ~Weight,    ~Age,
        &quot;Alex&quot;,    175L,     75L,       22,
        &quot;Gerard&quot;,    180L,     85L,     23,
        &quot;Clyde&quot;,    179L,     79L,      25, 
        &quot;Alex&quot;,    175L,     75L,       27,
        &quot;Gerard&quot;,    180L,     85L,     18,
        &quot;Clyde&quot;,    179L,     79L,      19   
      )
  )
  </code></pre>
  <p>Failed attempts are:</p>
  <pre><code>russia &lt;- lapply(df_list, (function(x) log10(Age)))
  </code></pre>
  <pre><code>greece &lt;- function(df){ 
    mutate(df, transformed_Age = log10(df$Age)) 
  }
  
  spain &lt;- lapply(df_list, greece)
  View(spain)
  </code></pre>
  <pre><code>arkansas &lt;- df_list
  canada &lt;- function(df){ 
      log10(as.numeric(df$Age))
  }
  
  arkansas &lt;- lapply(df_list, canada)
  View(arkansas)
  </code></pre>
  <p>I would also like to try other transformations so I hope someone can enlighten me how I can do that. I tried boxcox transformation but failed.</p>