0

I am having trouble getting Knit results to show digits after the decimal point.

When I run this code as a chunk:

      cereclosure %>%  
      group_by(Outcome.of.2nd.Closure) %>%  
      summarise(  
          min = min(age.at.c2, na.rm = TRUE),  
          q1 = quantile(age.at.c2, 0.25, na.rm = TRUE),  
          median = median(age.at.c2, na.rm = TRUE),  
          q3 = quantile(age.at.c2, 0.75, na.rm = TRUE),  
          max = max(age.at.c2, na.rm = TRUE),  
          mean = mean(age.at.c2, na.rm = TRUE),  
          st.dev = sd(age.at.c2, na.rm = TRUE)  
      )

As an example, I get:

Outcome.of.2nd.Closure min
Failure 217.3772
Success 177.4907

Which is the outcome I want, that is I want to see the digits after the decimal. But when I knit the whole thing, my output looks like this:

Outcome.of.2nd.Closure st.dev
Failure 217.
Success 177.

So there are no digits after the decimal place.

I'm on R v 3.5.1 and tidyverse 1.2.1

Help is most appreciated.

Mayo
  • 1
  • Welcome to Stack Overflow. It usually helps to have a reproducible example. See [this question and answers](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) for ideas on how to do that. For your question additional details, such as what kind of file you are knitting to and exactly what the code chunk looks like, would also help. – aosmith Nov 07 '18 at 23:00
  • Likely the problem is that somewhere `options("digits")` is getting changed, but @aosmith is right: without a reproducible example, we can't tell. – user2554330 Nov 07 '18 at 23:51

0 Answers0