title: R change number of significant figures in a gt table by replacing values from another column
body: <p>I am trying to create a series of gt tables with values shown to a 3rd sig fig. Because I want to show non numeric characters, the column I want to display is a factor. What's the best way to do this? I thought I could replace the values of a factor column with those from a numeric column, but I am not sure how to go about it. The code below is an example of a larger data set, where I would want to replace all numeric like values in Area1 with corresponding shorter values in Area2</p>
  <pre><code>Area1 &lt;- as.factor(c(0,0, 0.50659782, &quot;NS&quot;))
  Area2 &lt;- c(NA, NA, 0.507, NA)
  d &lt;-data.frame(Area1, Area2) %&gt;% gt() 
  </code></pre>
  <p>Essentially, I want to Area1 column to look like</p>
  <pre><code>Area1
  0
  0
  0.507
  NS
  </code></pre>