Rmarkdown report generate in unordered way after upgrading R version from 3.5 to 4.2 in Domino data Lab

When I was using R3.5 then the pdf report comes in proper format. Like Heading on top then Chart in middle and then table.

\pagebreak

\section{******************}

\vspace{0.5em}

\subsection{ Comparisons}

\vspace{0.5em}

\large __ difference__

\vspace{0.5em}

\vspace{0.5em}

grid.arrange(RM_plot(df.rm.d.p)+y,RM_plot(df.rm.previous.d.p)+y.previous, RM_plot(df.rm.five.years.d.p) + y.overall + theme(plot.title = element_text(size = 25, face = "bold")) ,ncol=3)
RM_table_year(df.rm.d.p,2023,df.d.p)
RM_table_year(df.rm.previous.d.p,2022,df.previous.d.p)
RM_table_year(df.rm.five.years.d.p, "2019-2023", df.five.years.d.p)

And after using R4.2 , the report generates in wrong format. I have not changed the code only Environment to R4.2 in Domino Data Lab.
Below is the starting of the code of Rmarkdown file

---
title:  __abc__
subtitle: <h1>xxxx</h1>
date: "`r format(Sys.time(), '%B, %d %Y')`"
header-includes: 
- \usepackage{makecell}   
- \usepackage{trimspaces}  
- \usepackage{environ} 
- \usepackage{threeparttablex}
- \usepackage{threeparttable}
- \usepackage{varwidth}
- \usepackage{tabu}
- \usepackage{pdflscape}
- \usepackage{colortbl}
- \usepackage{wrapfig}
- \usepackage{multirow}
- \usepackage{float}
- \usepackage{xcolor}
- \usepackage{titling}
- \usepackage{array}
- \pretitle{\begin{center}\Large\includegraphics[width=4cm]{logo.png}\\[\bigskipamount]}
- \posttitle{\end{center}}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyhf{}
- \rhead{\includegraphics[width = .05\textwidth]{bayer_logo.png}}
- \fancyhead[CO,CE]{\textcolor{red}{Confidential}}
- "\\setlength{\\headheight}{29.98897pt}"
- "\\addtolength{\\topmargin}{-17.98897pt}"


output: pdf_document
always_allow_html: yes
mainfont: Arial
fontsize: 12pt 
toc: false
indent: true 
geometry: margin=0.7in

---
\definecolor{table1}{HTML}{D9DFE1}
\definecolor{table2}{HTML}{C5DDEC}
\definecolor{table3}{HTML}{81CFEB}
\definecolor{table4}{HTML}{3E6AE1}
\definecolor{table5}{HTML}{3100F5}
\definecolor{myblue3}{HTML}{DAE5F9}
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
knitr::opts_chunk$set(message = FALSE)
knitr::opts_chunk$set(warning = FALSE)
knitr::opts_chunk$set(comment = '')
#install.packages("fontspec")
#install.packages("data.table")
#install.packages("bit64")
#install.packages("ggplot2")
#install.packages("xtable")
#install.packages("kableExtra")
#install.packages("readxl")
#install.packages("gridExtra")
#install.packages("dplyr")
#devtools::install_url("https://github.com/wilkelab/cowplot/archive/0.6.3.zip")
#install.packages("ggpubr")
#install.packages("aws.s3")
library(tinytex)
tinytex::install_tinytex(force = TRUE)
tinytex::tlmgr_update()
library(readxl)
library(tidyverse)
library(data.table) 

library(bit64)
library(ggplot2)
library(xtable)
library(gridExtra)
library(kableExtra)
library(ggpubr)
library(grid)
library(aws.s3)
options(scipen=999) 

I have used version R4.2
and in docker instruction file I have added

RUN echo "ubuntu ALL=NOPASSWD: ALL" >> /etc/sudoers
RUN sudo apt-get update
RUN sudo apt-get install build-essential -y
RUN R --no-save -e "install.packages(c('ggpubr'))"
RUN R --no-save -e "install.packages(c('kableExtra'))"
RUN R --no-save -e "install.packages('tinytex')"
RUN R --no-save -e "remotes::install_github('cvarrichio/rowr')"

Which wrong format ?

Can you reproduce with a simple document you can share ?

Overall we are missing information to help you unfortunately...

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.