What did you try? Have you at all tried to modify my code based on this line from the link you shared earlier?
\usepackage[table]{xcolor}
The following works on my device with no problem. It generates try.pdf (51.8 KB).
---
title: "Untitled"
output: pdf_document
header-includes:
- \usepackage[table]{xcolor}
- \usepackage{multirow}
---
some text
\rowcolors{3}{green!80!yellow!50}{green!70!yellow!40}
\begin{tabular}{ |p{3cm}|p{3cm}|p{3cm}| }
\hline
\multicolumn{3}{|c|}{Country List} \\
\hline
Country Name or Area Name& ISO ALPHA 2 Code &ISO ALPHA 3 \\
\hline
Afghanistan & AF &AFG \\
Aland Islands & AX & ALA \\
Albania &AL & ALB \\
Algeria &DZ & DZA \\
American Samoa & AS & ASM \\
Andorra & AD & AND \\
Angola & AO & AGO \\
\hline
\end{tabular}
some text
I read here that in my MikTEX installation I am missing Latex xcolor and should install it.
I went to Latex installation and I don't see xcolor as well.
Did I install a package that is missing it ? Please advise !
Yarnabrina,
Thanks for showing me how to install packages manually and automatically in MikTex console.
I uninstalled MikTex and installed tinytex and your example works.
The reason I am using MikTex is because I want to see if it works using it as well.
Just in case I needed to use MikTex and not tinytex for certain machine.
@andresrcs
Thanks, how do we have "Always Install packages on the fly option enabled" ?
How about Tex Live, do you think that is good and does it work ?