Eu tentei rodar e não gerou a tabela. O que aconteceu?
> require(dplyr)
Carregando pacotes exigidos: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> require(knitr)
Carregando pacotes exigidos: knitr
Warning message:
package ‘knitr’ was built under R version 3.6.2
> require(kableExtra)
Carregando pacotes exigidos: kableExtra
Attaching package: ‘kableExtra’
The following object is masked from ‘package:dplyr’:
group_rows
Warning message:
package ‘kableExtra’ was built under R version 3.6.2
> require(rticles)
Carregando pacotes exigidos: rticles
>
> Mercury <- c(57900000, 4878, 1416, 88, 0.38, 100, 0)
> Venus <- c(108160000, 12104, 5832, 224, 0.9, 480, 0)
> Earth <- c(149600000, 12756, 24, 365, 1, 14, 1)
> Mars <- c(227936640, 6794, 24, 687, 0.38, -63, 2)
> Jupiter <- c(778369000, 142984, 10, 4380, 2.64, -130, 79)
> Saturn <- c(1427034000, 120536, 11, 10585, 1.16, -130, 62)
> Uranus <- c(2870658186, 51118, 17, 30660, 1.11, -200, 27)
> Neptune <- c(4496976000, 49532, 16, 60225, 1.21, -200, 14)
>
> df <- rbind(Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune)
>
> colnames(df) <- c("DFS", "Diameter","Day","Year","Gravity","Temperature","Moons")
>
> kable(df, caption = "Planetary Statistics.",
+ booktabs = T, linesep = "", align = "lcccccc", format = "latex") %>%
+ kable_styling(bootstrap_options = "condensed", latex_options = "striped",
+ stripe_color = "#D9D8D8") %>%
+ kable_styling(font_size = 10) %>%
+ kable_styling(latex_options = "HOLD_position") %>%
+ footnote(alphabet = "https://www.bobthealien.co.uk/solarsystem/table.htm",
+ alphabet_title = "Source:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "average temperature in oC",
+ alphabet_title = "Temperature:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "ratio to Earth's gravity",
+ alphabet_title = "Gravity:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "time to complete a full rotation around the sun in days",
+ alphabet_title = "Year:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "time to complete a full rotation over its axis in hours",
+ alphabet_title = "Day:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "in km",
+ alphabet_title = "Diameter:", footnote_as_chunk = T) %>%
+ footnote(alphabet = "distance from the sun in km",
+ alphabet_title = "DFS:", footnote_as_chunk = T)
\begin{table}[H]
\caption{\label{tab:}Planetary Statistics.}
\centering
\fontsize{10}{12}\selectfont
\begin{tabular}[t]{llcccccc}
\toprule
& DFS & Diameter & Day & Year & Gravity & Temperature & Moons\\
\midrule
\rowcolor[HTML]{D9D8D8} Mercury & 57900000 & 4878 & 1416 & 88 & 0.38 & 100 & 0\\
Venus & 108160000 & 12104 & 5832 & 224 & 0.90 & 480 & 0\\
\rowcolor[HTML]{D9D8D8} Earth & 149600000 & 12756 & 24 & 365 & 1.00 & 14 & 1\\
Mars & 227936640 & 6794 & 24 & 687 & 0.38 & -63 & 2\\
\rowcolor[HTML]{D9D8D8} Jupiter & 778369000 & 142984 & 10 & 4380 & 2.64 & -130 & 79\\
Saturn & 1427034000 & 120536 & 11 & 10585 & 1.16 & -130 & 62\\
\rowcolor[HTML]{D9D8D8} Uranus & 2870658186 & 51118 & 17 & 30660 & 1.11 & -200 & 27\\
Neptune & 4496976000 & 49532 & 16 & 60225 & 1.21 & -200 & 14\\
\bottomrule
\multicolumn{8}{l}{\textit{DFS:} \textsuperscript{a} distance from the sun in km}\\
\multicolumn{8}{l}{\textit{Diameter:} \textsuperscript{a} in km}\\
\multicolumn{8}{l}{\textit{Day:} \textsuperscript{a} time to complete a full rotation over its axis in hours}\\
\multicolumn{8}{l}{\textit{Year:} \textsuperscript{a} time to complete a full rotation around the sun in days}\\
\multicolumn{8}{l}{\textit{Gravity:} \textsuperscript{a} ratio to Earth's gravity}\\
\multicolumn{8}{l}{\textit{Temperature:} \textsuperscript{a} average temperature in oC}\\
\multicolumn{8}{l}{\textit{Source:} \textsuperscript{a} https://www.bobthealien.co.uk/solarsystem/table.htm}\\
\end{tabular}
\end{table}
>