emitanaka / anicon Goto Github PK
View Code? Open in Web Editor NEWAnimated icons for R markdown and Shiny apps
Home Page: https://emitanaka.github.io/anicon/
Animated icons for R markdown and Shiny apps
Home Page: https://emitanaka.github.io/anicon/
Hi Emi!
Here is my reprex:
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
class: middle center
# Introduction to R
## Session 1
### July 14 th, 2020
### `r anicon::faa('twitter', animate='float')`
### `r anicon::faa('envelope', animate='pulse', speed='slow', colour='black', rtext=' beep beep')`
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_1.5.0 reprex_0.3.0
loaded via a namespace (and not attached):
[1] xfun_0.21 bslib_0.2.4 remotes_2.1.1 testthat_3.0.1 vctrs_0.3.6
[6] usethis_1.6.1 miniUI_0.1.1.1 htmltools_0.5.1.1 yaml_2.2.1 rlang_0.4.10
[11] pkgbuild_1.0.8 jquerylib_0.1.3 pillar_1.4.4 later_1.1.0.1 glue_1.4.2
[16] withr_2.4.1 sessioninfo_1.1.1 lifecycle_0.2.0 stringr_1.4.0 devtools_2.3.0
[21] evaluate_0.14 memoise_2.0.0 knitr_1.31 callr_3.5.1 fastmap_1.0.1
[26] httpuv_1.5.4 ps_1.5.0 fansi_0.4.1 Rcpp_1.0.4.6 xtable_1.8-4
[31] clipr_0.7.0 readr_1.4.0 xaringanExtra_0.2.6 backports_1.1.7 promises_1.1.1
[36] cachem_1.0.1 desc_1.2.0 pkgload_1.1.0 jsonlite_1.7.2 mime_0.10
[41] fs_1.4.1 servr_0.21 hms_0.5.3 packrat_0.5.0 digest_0.6.25
[46] stringi_1.4.6 xaringan_0.19 processx_3.4.5 rprojroot_1.3-2 anicon_0.1.0
[51] cli_2.2.0 tools_4.0.2 magrittr_2.0.1 sass_0.3.1 tibble_3.0.5
[56] crayon_1.3.4 whisker_0.4 pkgconfig_2.0.3 ellipsis_0.3.1 rsconnect_0.8.16
[61] prettyunits_1.1.1 assertthat_0.2.1 rmarkdown_2.7 rstudioapi_0.11 R6_2.5.0
[66] icon_0.1.0 compiler_4.0.2
Newer version of the icon package does not have icon:::fa_iconList
object, so you may want to update the anicon::faa()
function body to update the guard clause accordingly.
Hi!
FontAwesome icons are built into shinydashboard directly as part of menus, etc. for example:
menuItem("Reflect", tabName = "reflect", icon = anicon::faa("leaf", animate="bounce")),
however, trying to embed an animated icon into this throws the following error:
Error in tagAssert(icon, type = "i") :
Expected an object with class 'shiny.tag'.
Any thoughts on getting anicons to integrate with the icon system used by shinydashboard?
Hi,
I've noticed that when you use even just one animated icon, the whole xaringan slide gets blurry (text, other images, etc.). The most evident example can be seen with the hovering example. Do you know why this happens and if it's possible to not have this effect?
P.S.: Nice idea/package!
yihui/xaringan/pull/165#issuecomment-428616732
Unfortunately, I couldn't install your package in R 3.4.4 as the package icon is also not available.
> devtools::install_github('emitanaka/anicon')
Downloading GitHub repo emitanaka/anicon@master
from URL https://api.github.com/repos/emitanaka/anicon/zipball/master
Installing anicon
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL \
'/tmp/Rtmp3ythqL/devtools92415dfbc3b/emitanaka-anicon-377aece' \
--library='/home/manolo/R/x86_64-pc-linux-gnu-library/3.4' --install-tests
ERROR: dependency ‘icon’ is not available for package ‘anicon’
* removing ‘/home/manolo/R/x86_64-pc-linux-gnu-library/3.4/anicon’
Installation failed: Command failed (1)
Hi,
Congratulation!!! The "anicon" package is super cool.
However, I just tried to reproduce the shiny's example from the vignette and didn't work for me. Sadly, all that I'm having is the HTML code
<i class="fas fa-child faa-flash animated "></i> Old Faithful Geyser Data
Looking the HTML code page I get this
<span><i class="fas fa-child faa-flash animated "></i></span>
My sessionInfo() is:
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=es_CL.UTF-8 LC_NUMERIC=C LC_TIME=es_CL.UTF-8 LC_COLLATE=es_CL.UTF-8 LC_MONETARY=es_CL.UTF-8 LC_MESSAGES=es_CL.UTF-8
[7] LC_PAPER=es_CL.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_CL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rsconnect_0.8.8 bindrcpp_0.2.2 mapview_2.6.0 leaflet.extras_1.0.0 sweetalertR_0.2.0 shinycssloaders_0.2.0 xts_0.11-2 zoo_1.8-4
[9] forcats_0.3.0 stringr_1.3.1 dplyr_0.7.8 purrr_0.2.5 readr_1.1.1 tidyr_0.8.2 tibble_1.4.2 ggplot2_3.1.0
[17] tidyverse_1.2.1 DT_0.5 highcharter_0.5.0 shinyWidgets_0.4.4 shinythemes_1.1.2 shinyjs_1.0 shinyBS_0.61 ini_0.3.1
[25] raster_2.8-4 rgdal_1.3-6 sp_1.3-1 aws.s3_0.3.12 anicon_0.1.0 leaflet_2.0.2 shiny_1.2.0
loaded via a namespace (and not attached):
[1] colorspace_1.3-2 class_7.3-14 rprojroot_1.3-2 satellite_1.0.1 base64enc_0.1-3 rstudioapi_0.8 xaringan_0.8 lubridate_1.7.4 xml2_1.2.0
[10] codetools_0.2-15 knitr_1.20 rlist_0.4.6.1 jsonlite_1.5 packrat_0.4.9-3 broom_0.5.0 png_0.1-7 compiler_3.5.1 httr_1.3.1
[19] backports_1.1.2 assertthat_0.2.0 lazyeval_0.2.1 cli_1.0.1 later_0.7.5 htmltools_0.3.6 tools_3.5.1 igraph_1.2.2 gtable_0.2.0
[28] glue_1.3.0 icon_0.1.0 Rcpp_1.0.0 cellranger_1.1.0 RJSONIO_1.3-0 nlme_3.1-137 crosstalk_1.0.0 xfun_0.4 rvest_0.3.2
[37] mime_0.6 scales_1.0.0 hms_0.4.2 promises_1.0.1 RColorBrewer_1.1-2 yaml_2.2.0 quantmod_0.4-13 curl_3.2 aws.signature_0.4.4
[46] stringi_1.2.4 e1071_1.7-0 TTR_0.23-4 spData_0.2.9.4 rlang_0.3.0.1 pkgconfig_2.0.2 bitops_1.0-6 evaluate_0.12 lattice_0.20-38
[55] bindr_0.1.1 sf_0.7-1 htmlwidgets_1.3 labeling_0.3 tidyselect_0.2.5 plyr_1.8.4 magrittr_1.5 R6_2.3.0 DBI_1.0.0
[64] pillar_1.3.0 haven_1.1.2 withr_2.1.2 units_0.6-1 RCurl_1.95-4.11 modelr_0.1.2 crayon_1.3.4 rmarkdown_1.10 grid_3.5.1
[73] readxl_1.1.0 data.table_1.11.8 digest_0.6.18 classInt_0.2-3 webshot_0.5.1 xtable_1.8-3 httpuv_1.4.5 stats4_3.5.1 munsell_0.5.0
[82] viridisLite_0.3.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.