mitchelloharawild / icons

R package to easily insert web icons to RMarkdown
https://pkg.mitchelloharawild.com/icons
310 stars 43 forks source link

fontawesome blues #30

Closed fdepaolis closed 3 years ago

fdepaolis commented 3 years ago

Hello, Apologies in advance if this doesn't belong in here or has already been addressed (I couldn't find it on my onw)

I'm getting this error message: 'fontawesome' is not an exported object from 'namespace:icon'

Any comments or suggestions? Thank you,

mitchelloharawild commented 3 years ago

Are you looking for the updated icon package instead? icon::fontawesome() is used in github.com/mitchelloharawild/icon

fdepaolis commented 3 years ago

It 'might have worked' but have another error and can't tell if it's related.

Error in yaml::yaml.load(..., eval.expr = TRUE) : Parser error: while parsing a block mapping at line 1, column 1 did not find expected key at line 3, column 79 Calls: ... parse_yaml_front_matter -> yaml_load -> Execution halted

Thank you anyway!!! (this might be my fault all along)

mitchelloharawild commented 3 years ago

Could you provide a minimally reproducible example?

fdepaolis commented 3 years ago

Can I send you a chunk of code via email?

fdepaolis commented 3 years ago

**..or you can see it here

I've been inspired by https://github.com/njtierney/rstudioconf20 and his RStudio2020 presentation. I wanted to create my own presentation/slides and I'm running into some issues. Thank you**

title: "trail-slide-RMD"

author: .vlarge[Fernando DePaolis, Middlebury Institute] date: "

Spring 2020

r icon::fontawesome(name = 'link', 'solid') fdepaolis@middlebury.edu

"

output: xaringan::moon_reader: lib_dir: libs css:

layout: true

# options(htmltools.dir.version = FALSE, width = 120)
# NOTE TO SELF: The CSS styles were created in `create-njt-theme.R`
library(modelr)
library(tidyverse)
library(visdat)
library(naniar)
library(gganimate)
library(knitr)
library(ggrepel)
library(lme4)
library(broom)
library(brolgar)
heights <- brolgar::heights
opts_chunk$set(
  fig.path = "figures/",
  cache.path = "cache/",
  fig.align = "center",
  fig.width = 13,
  fig.height = 6,
  fig.retina = 3,
  out.width = "90%",
  fig.show = "hold",
  external = TRUE,
  # dev = "svglite",
  # dev.args = list(bg = "transparent"),
  message = FALSE,
  warning = FALSE,
  cache = TRUE,
  echo = FALSE,
  autodep = TRUE
)

as_table <- function(...) knitr::kable(..., format='html', digits = 3)

theme_set(
  theme_grey(base_size = 16) +
  theme(
    legend.position = "bottom",
    plot.background = element_rect(fill = "transparent"),
    legend.background = element_rect(fill = "transparent")
  )
)

heights <- heights %>% 
  add_n_obs() %>% 
  filter(n_obs > 1) %>% 
  select(- n_obs,
         - continent)

example <- heights %>%
  filter(country == "Australia",
         year >= 1910) %>% 
  mutate(height_cm = round(height_cm))
anim_height_appear <- function(){
  anim <- ggplot(heights,
                 aes(x = year,
                     y = height_cm,
                     group = country)) + 
    geom_line() + 
    transition_manual(country, cumulative = TRUE) + 
    ease_aes("exponential")
  animate(anim, fps = 24)
}
anim_height_reveal <- function(){
p <- ggplot(example, 
            aes(x = year, 
                y = height_cm)) + 
  geom_line() + 
  geom_point(colour = "red", size = 2) + 
  geom_point(aes(group = seq_along(year))) + 
  transition_reveal(year) + 
  ease_aes('cubic-in-out')
animate(p, fps = 24, duration = 5)
}
plot_heights <- function(data){  
  ggplot(data, 
         aes(x = year,
             y = height_cm,
             group = country)) + 
  geom_line()
}

gg_heights <- plot_heights(heights)

class: middle, center, inverse

.huge[ How to fly a rocket ship r emo::ji("rocket") ]


class: middle, center, inverse

.huge[ How to fly a rocket ship r emo::ji("rocket") ]

.huge[ How to land a rocket ]


class: inverse, middle,

Why do you want to fly a rocket?


mitchelloharawild commented 3 years ago

It looks like the date field doesn't expect an SVG object, and fails to render.

My suggestion (for you, and @njtierney's slides) is to use the date field to specify the date (so your document contains the appropriate metadata). If you'd like to have a custom title page for your slides, then you should do that using your first slide and remove the automatically generated one by setting seal: false:

---
output:
  xaringan::moon_reader:
    seal: false
---
fdepaolis commented 3 years ago

Thank you...I'll give it a try

fdepaolis commented 3 years ago

It seems to have worked. Thank you very much!!!!