forked from Appsilon/semantic.dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
171 lines (128 loc) · 5.56 KB
/
Copy pathREADME.Rmd
File metadata and controls
171 lines (128 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
output: html_document
params:
website_url: http://appsilon.com
logo_url: https://cdn.rawgit.com/Appsilon/website-cdn/gh-pages/logo-white.png
repo_name: semantic.dashboard
repo_url: https://github.com/Appsilon/semantic.dashboard
chagelog_url: https://github.com/Appsilon/semantic.dashboard/blob/master/CHANGELOG.md
---
<link href="http://fonts.googleapis.com/css?family=Maven+Pro:400,700|Inconsolata" rel="stylesheet" type="text/css">
<link href='docs/style.css' rel='stylesheet' type='text/css'>
`r params$repo_name`
===========
<div class="subheader">Dashboard with Semantic UI Support for Shiny</div>
<div class="section level2">
Are you fed up with ordinary `shinydashboard` look?
Give your app a new life with Semantic UI support. It cannot be any easier! Just install `semantic.dashboard` and load it instead to your app. Thanks to the compatibility with classical dashboard you don't have to start from scratch.
```{r eval=FALSE, include=TRUE}
#########################
library(shinydashboard) # <-- You only need to change this line to: library(semantic.dashboard)
#########################
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(sidebarMenu(
menuItem(tabName = "home", text = "Home", icon = icon("home")),
menuItem(tabName = "another", text = "Another Tab", icon = icon("heart"))
)),
dashboardBody(
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)
```

`semantic.dashboard` offers basic functions for creating dashboard with Semantic UI but not only. You can select from number of [Semantic UI Themes](http://semantic-ui-forest.com/themes/) and easily adjust the look of your dashboard.

<!-- Live demo link below -->
<!--<p style="text-align: center; font-size: x-large;">
<a href="`r params$demo_url`">Live demo</a>
</p> -->
</div>
Source code {.darkslide}
-----------
This library source code can be found on [Appsilon Data Science's](`r params$website_url`) Github:
<br>
[`r params$repo_url`](`r params$repo_url`)
```{r, echo = F, results='asis'}
if (params$type == "web") {
cat(paste0('<script>
document.write(\'<div class="logo"><a href="', params$website_url, '"><img alt="Appsilon Data Science" src="', params$logo_url, '"/></a></div>\')
</script>
'))
}
```
How to install?
---------------
Install `shiny.semantic` library first. [Here](https://github.com/Appsilon/shiny.semantic) you can find how.
You can install a stable version `semantic.dashboard` from CRAN repository:
```
install.packages("`r params$repo_name`")
```
The development version can be installed from GitHub using [devtools](https://github.com/hadley/devtools).
```
devtools::install_github("Appsilon/`r params$repo_name`")
```
To install [previous version](`r params$changelog_url`) you can run:
```
devtools::install_github("Appsilon/`r params$repo_name`", ref = "0.1.0")
```
Example {.darkorange}
-------
You can find examples in the `examples/` folder of the [GitHub repository](https://github.com/Appsilon/semantic.dashboard).
You can also read [this tutorial](https://appsilon.com/blog/rstats/2018/06/11/dashboard-tutorial.html) to learn how to build your first semantic.dashboard app.
How to contribute?
-----------------
If you want to contribute to this project please submit a regular PR, once you're done with new feature or bug fix.<br>
## Changes in documentation
Both repository **README.md** file and an official documentation page are generated with Rmarkdown, so if there is a need to update them, please modify accordingly a **README.Rmd** file and use [readmebuilder](https://github.com/Appsilon/readmebuilder) package to render the new README.
In most cases a simple call of:
```r
readmebuilder::build_readme()
```
Troubleshooting {.darkslide}
-----------------
We used the latest versions of dependencies for this library, so please update your R environment before installation.
However, if you encounter any problems, try the following:
1. Up-to-date R language environment
2. Installing specific dependent libraries versions
* shiny.semantic
```
devtools::install_github("Appsilon/shiny.semantic")
```
Future enhacements
------------------
* Release of a stable 1.0 version
Appsilon Data Science {.footer}
------------------
```{r, echo = F, results='asis'}
if (params$type == "web") {
cat(paste0('<script>
document.write(\'<div class="logo"><a href="', params$website_url, '"><img alt="Appsilon Data Science" src="', params$logo_url, '" /></a></div><div class="subheader"> We Provide End-to-End Data Science Solutions </div> \');
</script>
'))
}
```
Get in touch [dev@appsilon.com](dev@appsilon.com)
```{r, echo = F, results='asis'}
if (params$type == "web") {
cat(paste0('<script>
document.write(\'<a href="', params$repo_url, '"><img style="position: absolute; margin: 0; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>\');
</script>
'))
}
```