Lately (last few weeks, beginning of 2021: not sure when it first started) messages from dplyr operations are not being supressed by "message=FALSE" in the code block headers. Interestingly, a very simple reprex didn't replicate the problem so it's about something I'm doing regularly using Rstudio to knit Rmarkdown to html on my machine but not something I can replicate on the same set up with a clean Rmarkdown file, tidyverse and pander loaded. Clearly I can go on loading things until perhaps I recreate it in the reprex but I haven't time to do that now so I'll do two things:
Try to see in my own work any things that are associated with it happening. I have tried and can't so far.
Post this here to see if anyone else is seeing it and has more ideas.
Here is an example of the output.
Gender effect
This is a simple between participant effect in both occasion1 and occasion2.
Breakdown of scores by gender for both occasions.
summarise() has grouped output by ‘occasion’. You can override using the .groups argument.
occasion
gender
n
minScore
LCL
obsMean
UCL
SDScore
maxScore
t1
F
506
-4.6
0.56
0.71
0.86
1.7
6
t1
M
494
-5.4
-0.029
0.13
0.28
1.7
4.2
t2
F
506
-5.6
0.94
1.2
1.4
2.4
8.7
t2
M
494
-8.4
0.3
0.52
0.73
2.4
7
Adding missing grouping variables: occasion
occasion
meanDiff
LCLDiff
UCLDiff
obsG
LCLG
UCLG
t1
-0.58
-0.82
-0.36
-0.34
-0.46
-0.21
t2
-0.64
-0.94
-0.36
-0.27
-0.39
-0.15
That is from Rstudio 1.4.1103 on up to date Ubuntu 20.04 with R version information:
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10)
nickname Bunny-Wunnies Freak Out
Perfect. Many thanks Henrik. I can confirm that this works at least in one Rmd file of mine where I was seeing these messages coming through. Surely it's a bug somewhere in the markdown knitting or in the dplyr creation of its messages that these aren't be suppressed by messages=FALSE
in the code block headers?
Thanks. Yes, I did say: "it's about something I'm doing regularly using Rstudio to knit Rmarkdown to html on my machine but not something I can replicate on the same set up with a clean Rmarkdown file, tidyverse and pander loaded." I am also completely happy to assume that it's something local to my machine.
The only thing I can add currently is that all my packages are updated daily on this machine so I'm sure it's not out of date packages (just checked: rlang is at 0.4.10 which seems to be the latest version). It is clearly something that kicks in at some point in moderately long Rmarkdown files for me (> 300 lines of whatever sort, some >1k lines). I generally load all the packages I need at the start and only invoke the more occasional functions I might want later with package::function() calls rather than loading the full package so I had been thinking that perhaps it wasn't down to adding packages but I don't know enough about how maintains packages in the environment (nor, if it's pertinent, how knitr with cache=TRUE manages this). I've had some health issues so I am way behind with work and Henrik seems to have given me a fix that works for me so I can't see me managing to do more to debug: I'm sorry as I would love to (and do generally try to) but I have to face the todo list! Very best and thanks, Chris
We don't need to ! We'll see if someone else encounter similar issue!
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: