title: r - rounding in summarise()
body: <p>I want to see more digits in the aggregated output using <code>group_by()</code> and <code>summarise()</code> from package<code>{dplyr}</code>. My codes are below:</p>
  
  <pre><code>library(dplyr)
  # download 2 datasets
  download.file('https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FGDP.csv','GDP.csv',mode = 'wb')
  GDP&lt;-read.csv('GDP.csv',skip=4,stringsAsFactors = F,na.strings = '')
  GDP&lt;-GDP%&gt;%filter(!is.na(X),!is.na(X.1))%&gt;%mutate(X.1=as.numeric(X.1))
  download.file('https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FEDSTATS_Country.csv','EDSTATS.csv',mode = 'wb') 
  edu&lt;-read.csv('EDSTATS.csv',stringsAsFactors = F)
  
  # join these two datasets
  df&lt;-inner_join(GDP,edu,by=c('X'='CountryCode'))%&gt;%arrange(desc(X.1))
  
  # aggregation
  df%&gt;%group_by(Income.Group)%&gt;%summarise(avg_GDP=mean(X.1))
  </code></pre>
  
  <p>The result I get from console:</p>
  
  <pre><code># A tibble: 5 x 2
    Income.Group         avg_GDP
    &lt;chr&gt;                  &lt;dbl&gt;
  1 High income: nonOECD    91.9
  2 High income: OECD       33.0
  3 Low income             134. 
  4 Lower middle income    108. 
  5 Upper middle income     92.1
  </code></pre>
  
  <p>Clearly, the number were not shown in full. So how do I see more digits in <code>avg_GDP</code>?<br>
  If I assign the result to a new dataframe and view it in RStudio, I get to see more digits, but still, only 5 digits:</p>
  
  <pre><code>df2&lt;-df%&gt;%group_by(Income.Group)%&gt;%summarise(avg_GDP=mean(X.1))
  View(df2)
  </code></pre>
  
  <p>So how do I see more digits both in console print and dataframe View()?<br>
  I tried:    </p>
  
  <pre><code>df%&gt;%group_by(Income.Group)%&gt;%summarise(avg_GDP=mean(X.1,digits=10))
  </code></pre>
  
  <p>it didn't work.</p>
  
  <p>My question is different from the potential duplicate is that I want the code that could do the job within the %>% chain. From his post, I like the answer with:</p>
  
  <pre><code># this is my favorite, because it fits well with my original code with %&gt;%.
  print.data.frame(my_tbl, digits = 3) 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>options(digits = 3)
  print.data.frame(my_tbl)
  </code></pre>
  
  <p>From my post, I like <code>options(pillar.sigfig = 10)</code>.</p>