https://github.com/oobianom/r2social
R package that provides social links and share buttons for markdown and shiny applications
https://github.com/oobianom/r2social
base64 html javascript r
Last synced: 13 days ago
JSON representation
R package that provides social links and share buttons for markdown and shiny applications
- Host: GitHub
- URL: https://github.com/oobianom/r2social
- Owner: oobianom
- License: other
- Created: 2022-08-21T07:16:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T19:39:49.000Z (9 months ago)
- Last Synced: 2024-11-02T16:08:32.821Z (5 months ago)
- Topics: base64, html, javascript, r
- Language: R
- Homepage: https://r2social.obi.obianom.com
- Size: 840 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - oobianom/r2social - R package that provides social links and share buttons for markdown and shiny applications (R)
README
# r2social v1.2.1 is already here!
Let's make r2 social great again!
## r2social R package: include social links and connect buttons in Rmarkdown and shiny applications
### Official site: https://r2social.obi.obianom.com
### NEW FEATURES ADDED!!!
- 2 Elegant profile cards features
- profileDisplay1()
- profileDisplay2()##### View a live demo: [r2social demo](https://rstudio-pubs-static.s3.amazonaws.com/979733_c818519050184128a6a74a27b8c84156.html)
##### The goal of this new R package is to provide functions that allow the inclusion of share and connect buttons on any page. This has been tested in Rmarkdown documents as well as on simply Shiny applications. See the examples folder of this package.
[](https://rpkg.net/package/r2social) [](https://cran.r-project.org/package=r2social) [](https://cran.r-project.org/package=r2social)
[](https://cran.r-project.org/package=r2social)
[](https://cran.r-project.org/package=r2social)# Features
## Social links v1

## Profile card v1

## Profile card v2

## Installation and Library Attachment
The r2social package is available on CRAN and can be installed as shown below
`install.packages(r2social)`
Attach library
```{r}
library(shiny)
library(r2social)```
## Feature 2: Profile card with social links
### Shiny application
```{r}
ui <- fluidPage(profileDisplay1(list(
a = list(
name = "Obi Obianom",
title = "Senior Scientist",
image = "https://r2social.obi.obianom.com/misc/team3.jpg",
social = list(
list(name = "x",
link = "https://x.com/R2Rpkg"),
list(name = "linkedin",
link = "https://linkedin.com/oobianom"),
list(name = "website",
link = "https://obianom.com"),
list(name = "youtube",
link = "https://youtube.com/R2Rpkg")
)
),
b = list(
name = "William Hane",
title = "Core Developer",
image = "https://r2social.obi.obianom.com/misc/team1.jpg",
social = list(list(name = "youtube",
link = "https://youtube.com/R2Rpkg"))
)
)))
```
### Rmarkdown application
```{r}
profileDisplay1(list(
a = list(
name = "Obi Obianom",
title = "Senior Scientist",
image = "https://r2social.obi.obianom.com/misc/team2.jpg",
social = list(
list(name = "x",
link = "https://x.com/R2Rpkg"),
list(name = "linkedin",
link = "https://linkedin.com/oobianom"),
list(name = "website",
link = "https://obianom.com"),
list(name = "youtube",
link = "https://youtube.com/R2Rpkg")
)
),
b = list(
name = "William Hane",
title = "Core Developer",
image = "https://r2social.obi.obianom.com/misc/team4.jpg",
social = list(list(name = "youtube",
link = "https://youtube.com/R2Rpkg"))
)
))```
## Feature 1: Add social links on the sides
### Shiny application
```{r}
#ex 1 - to share various links
ui <- fluidPage(
r2social.scripts(),
shareButton(link = "https://rpkg.net", position = "left"),
shareButton(link = "https://shinyappstore.com", position = "inline"),
shareButton(link = "https://shinyappstore.com", plain = T, position = "inline"), #plain style
shareButton(link = "https://obianom.com", position = "right")
)#ex 2 - to link your page to specific domain online
ui <- fluidPage(
r2social.scripts(),
# to my personal website
connectButton(link = "https://obianom.com", position = "inline",link.out = FALSE, visit.us = TRUE),# to my Twitter/X page
connectButton(link = "https://x.com/R2Rpkg", position = "inline",link.out = FALSE, x = TRUE)
)```
### Rmarkdown document
```{r}
library(r2social)
r2social.scripts()
shareButton(link = "https://rpkg.net", position = "left")
shareButton(link = "https://shinyappstore.com", position = "inline")
shareButton(link = "https://obianom.com", position = "right")```