Hi there!
I'm working on a final project for college. I'm using R inside a markdown in order to analyze and create beautiful reports. I would like to know how to change the language so that tables and figures titles appear in Spanish.
\begin{table}[!htbp] \centering
\caption{Estimación MCO}
\label{}
\begin{tabular}{@{\extracolsep{5pt}}lD{.}{.}{-3} }
\[-1.8ex]\hline
\hline \[-1.8ex]
& \multicolumn{1}{c}{\textit{Variable dependiente:}} \
\cline{2-2}
\[-1.8ex] & \multicolumn{1}{c}{Consumo eléctrico(kwh)} \
\hline \[-1.8ex]
Salario & 0.001^{} \
& (0.0001) \
Aire acondicionado & -74.837^{} \
& (5.655) \
Calentador & -118.426^{} \
& (9.799) \
Microondas & -20.442^{} \
& (4.555) \
Servicio doméstico & -76.980^{} \
& (7.656) \
Miembros del hogar & 7.351^{} \
& (0.817) \
Laptop & -16.829^{} \
& (5.182) \
Internet & -30.765^{} \
& (4.018) \
Planta & -1.367 \
& (12.816) \
Inversor & 5.475 \
& (4.356) \
Zona & -20.096^{} \
& (4.467) \
Constante & 376.453^{} \
& (16.821) \
\hline \[-1.8ex]
Observaciones & \multicolumn{1}{c}{5,568} \
R$^{2} & \multicolumn{1}{c}{0.256} \\
R^{2} ajustado & \multicolumn{1}{c}{0.255} \\
Error residual estándar & \multicolumn{1}{c}{127.783 (gl = 5556)} \\
F estadístico & \multicolumn{1}{c}{174.250^{} (gl = 11; 5556)} \\
\hline
\hline \\[-1.8ex]
\textit{Nota:} & \multicolumn{1}{r}{^{}p<0.1; ^{}p<0.05; ^{***}p<$0.01} \
\end{tabular}
\end{table}
After using stargazer in my case, the output file produced is actually beautiful but since I'm writing the investigation in Spanish I need the entire document to be in Spanish. When knit, it says ''Table 1: Estimation MCO' but I actually want it in Spanish "Tabla 1: Estimación MCO", how can I achieve this?