I have been experimenting with the MonteCarlo package in R for a project. After using the maketable function, I was given the following code to generate a LaTex table with the Monte Carlo simulation's results.
\begin{table}[h]
\centering
\resizebox{ 1 \textwidth}{!}{%
\begin{tabular}{ rrrrrrrrr }
\hline\hline\\\\
scale & n/loc & & 0 & 0.2 & 0.4 & 0.6 & 0.8 & 1 \\
& & & & & & & & \\
\multirow{ 4 }{*}{ 1 } & 50 & & 0.06 & 0.31 & 0.80 & 0.99 & 1.00 & 1.00 \\
& 100 & & 0.06 & 0.54 & 0.98 & 1.00 & 1.00 & 1.00 \\
& 250 & & 0.05 & 0.89 & 1.00 & 1.00 & 1.00 & 1.00 \\
& 500 & & 0.04 & 0.99 & 1.00 & 1.00 & 1.00 & 1.00 \\
& & & & & & & & \\
\multirow{ 4 }{*}{ 2 } & 50 & & 0.05 & 0.11 & 0.33 & 0.59 & 0.81 & 0.93 \\
& 100 & & 0.05 & 0.14 & 0.52 & 0.83 & 0.97 & 1.00 \\
& 250 & & 0.05 & 0.36 & 0.89 & 1.00 & 1.00 & 1.00 \\
& 500 & & 0.06 & 0.66 & 0.99 & 1.00 & 1.00 & 1.00 \\
\\
\\
\hline\hline
\end{tabular}%
}
\caption{ decision }
\end{table}
This code had numerous error messages when I try to compile it in Texstudio. Browsing around the forum, I found that by adding a \documentclass{article} and \begin{document}. command at the beginning with the appropriate \end commands at the end, a majority of the errors resolved themselves. However, I still have five errors that are popping up in the editor that are preventing compilation. Those errors are:
line 5 - Undefined control sequence. \resizebox
line 5 - Missing number, treated as zero. \resizebox { 1 \ textwidth}
line 5 - Illegal unit of measure (pt inserted). \resizebox { 1 \ textwidth}
line 10 - Undefined control sequence. \multirow
line 15 - Undefined control sequence. \multirow
Any ideas about how I can resolve these errors would be highly appreciated.