Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
i2dash
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
loosolab
software
i2dash
Commits
bfbf631c
Commit
bfbf631c
authored
5 years ago
by
arsenij.ustjanzew
Browse files
Options
Downloads
Patches
Plain Diff
small fix to overwrite the .Object@file slot only if the file parameter was not provided.
parent
8958a7d6
No related branches found
No related tags found
2 merge requests
!8
Vignette: i2dash introduction
,
!4
Filename fix
Pipeline
#113394
passed
5 years ago
Stage: build
Stage: check
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
R/i2dashboard.R
+4
-2
4 additions, 2 deletions
R/i2dashboard.R
man/idashboard-class.Rd
+4
-1
4 additions, 1 deletion
man/idashboard-class.Rd
with
8 additions
and
3 deletions
R/i2dashboard.R
+
4
−
2
View file @
bfbf631c
...
...
@@ -5,11 +5,13 @@
#' @slot interactive If a shiny-based report should be created
#' @slot theme The theme of the dashboard
#' @slot datadir Path to the directory, where report data is stored.
#' @slot file
Filename of the resulting report Rmd file
.
#' @slot file
The output filename (recommend that the suffix should be '.Rmd')
.
#' @slot pages A list of dashboard pages
#' @slot sidebar Content of the global sidebar
#' @slot colormaps A named list with color mappings.
#'
#' @return An i2dashboard object.
#'
#' @name idashboard-class
#' @rdname idashboard-class
#' @exportClass i2dashboard
...
...
@@ -43,7 +45,7 @@ setMethod("initialize", "i2dashboard", function(.Object, ...) {
.Object
<-
callNextMethod
()
# Create nice filename from title
if
(
!
is.null
(
.Object
@
title
))
{
if
(
is.null
(
.Object
@
file
)
&
!
is.null
(
.Object
@
title
))
{
.Object
@
title
%>%
tolower
%>%
gsub
(
pattern
=
" "
,
replacement
=
"-"
)
%>%
gsub
(
pattern
=
'[^a-zA-Z0-9-]'
,
replacement
=
''
)
%>%
paste0
(
".Rmd"
)
->
.Object
@
file
}
...
...
This diff is collapsed.
Click to expand it.
man/idashboard-class.Rd
+
4
−
1
View file @
bfbf631c
...
...
@@ -12,6 +12,9 @@
i2dashboard(...)
}
\value{
An i2dashboard object.
}
\description{
The idashboard S4 class.
...
...
@@ -34,7 +37,7 @@ Create a new i2dashboard object.
\item{\code{datadir}}{Path to the directory, where report data is stored.}
\item{\code{file}}{
Filename of the resulting report Rmd file
.}
\item{\code{file}}{
The output filename (recommend that the suffix should be '.Rmd')
.}
\item{\code{pages}}{A list of dashboard pages}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment