Skip to content

Commit

Permalink
fix: report dashboard author information as valuebox
Browse files Browse the repository at this point in the history
Close #83
  • Loading branch information
jhk0530 committed Dec 7, 2023
1 parent 3d5c725 commit c2a3758
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 14 deletions.
27 changes: 20 additions & 7 deletions inst/rmarkdown/report-dashboard.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,34 @@ library(GGally)
library(naniar)
library(dplyr)
library(knitr)
library(flexdashboard)
missplot <- naniar::gg_miss_var(inputData) %>% plotly::ggplotly()
```

## Row

-----------------------------------
### Author information

Department: "`r params$department`"

Affiliation: "`r params$affiliation`"

Location: "`r params$location`"
### Author information

E-mail: "`r params$email`"
<!-- Department: "`r params$department`" -->
<!-- Affiliation: "`r params$affiliation`" -->
<!-- Location: "`r params$location`" -->
<!-- E-mail: "`r params$email`" -->

```{r}
nam <- ifelse(params$authorName=='','.', params$authorName)
dep <- ifelse(params$department=='','.', params$department)
aff <- ifelse(params$affiliation=='','.', params$affiliation)
loc <- ifelse(params$location=='','.', params$location)
ema <- ifelse(params$email=='','.', params$email)
flexdashboard::valueBox(
value = paste(nam, dep, aff, loc, ema),
caption = 'Author',
icon = 'fa-user'
)
```

### Dataset Information

Expand Down
27 changes: 20 additions & 7 deletions inst/rmarkdown/report-dashboard.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,34 @@ library(GGally)
library(naniar)
library(dplyr)
library(knitr)
library(flexdashboard)
missplot <- naniar::gg_miss_var(inputData) %>% plotly::ggplotly()
```

## Row

-----------------------------------
### Author information

Department: "`r params$department`"

Affiliation: "`r params$affiliation`"

Location: "`r params$location`"
### Author information

E-mail: "`r params$email`"
<!-- Department: "`r params$department`" -->
<!-- Affiliation: "`r params$affiliation`" -->
<!-- Location: "`r params$location`" -->
<!-- E-mail: "`r params$email`" -->

```{r}
nam <- ifelse(params$authorName=='','.', params$authorName)
dep <- ifelse(params$department=='','.', params$department)
aff <- ifelse(params$affiliation=='','.', params$affiliation)
loc <- ifelse(params$location=='','.', params$location)
ema <- ifelse(params$email=='','.', params$email)
flexdashboard::valueBox(
value = paste(nam, dep, aff, loc, ema),
caption = 'Author',
icon = 'fa-user'
)
```

### Dataset Information

Expand Down

0 comments on commit c2a3758

Please sign in to comment.