Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
R - Mortality Tables
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
R
R - Mortality Tables
Commits
889d62ea
Commit
889d62ea
authored
Apr 23, 2018
by
Reinhold Kainhofer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plotMortalityTableComparison / plotMortalityTrend: Add legend.title argument
parent
6ba1d2d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
R/plotMortalityTableComparisons.R
R/plotMortalityTableComparisons.R
+2
-1
R/plotMortalityTables.R
R/plotMortalityTables.R
+1
-1
R/plotMortalityTrend.R
R/plotMortalityTrend.R
+3
-2
No files found.
R/plotMortalityTableComparisons.R
View file @
889d62ea
...
...
@@ -31,6 +31,7 @@ plotMortalityTableComparisons = function(
xlab
=
NULL
,
ylab
=
NULL
,
title
=
""
,
legend.position
=
c
(
0.9
,
0.1
),
legend.justification
=
c
(
1
,
0
),
legend.title
=
"Sterbetafel"
,
legend.key.width
=
unit
(
25
,
"mm"
),
reference
=
NULL
)
{
...
...
@@ -85,7 +86,7 @@ plotMortalityTableComparisons = function(
)
+
# annotation_logticks(sides="lr") +
xlab
(
"Alter"
)
+
labs
(
colour
=
"Sterbetafel"
);
xlab
(
"Alter"
)
+
labs
(
colour
=
legend.title
);
if
(
title
!=
""
)
{
pl
=
pl
+
ggtitle
(
title
);
}
...
...
R/plotMortalityTables.R
View file @
889d62ea
...
...
@@ -12,7 +12,7 @@
#' @param legend.position The position of the legend (default is \code{c(0.9,0.1)})
#' @param legend.justification The justification of the legend (default is \code{c(1,)})
#' @param legend.key.width The keywith of the lines in the legend (default is \code{unit(25,"mm")})
#' @param legend.title Title of the legend
#' @param legend.title Title of the legend
(\code{NULL} to hide)
#' @param ages Plot only the given ages
#'
#' @examples
...
...
R/plotMortalityTrend.R
View file @
889d62ea
...
...
@@ -13,6 +13,7 @@
#' @param title The plot title
#' @param legend.position The position of the legend (default is \code{c(0.9,0.1)})
#' @param legend.key.width The keywith of the lines in the legend (default is \code{unit(25,"mm")})
#' @param legend.title Title of the legend (\code{NULL} to hide)
#'
#' @examples
#' # Load the Austrian aunnity data
...
...
@@ -40,7 +41,7 @@ plotMortalityTrend = function(
xlim
=
NULL
,
ylim
=
NULL
,
xlab
=
NULL
,
ylab
=
NULL
,
title
=
""
,
legend.position
=
c
(
0.9
,
0.9
),
legend.justification
=
c
(
1
,
1
),
legend.position
=
c
(
0.9
,
0.9
),
legend.justification
=
c
(
1
,
1
),
legend.title
=
"Sterbetafel"
,
legend.key.width
=
unit
(
25
,
"mm"
)
)
{
...
...
@@ -81,7 +82,7 @@ plotMortalityTrend = function(
)
+
coord_cartesian
(
xlim
=
xlim
,
ylim
=
ylim
)
+
annotation_logticks
(
sides
=
"lr"
)
+
xlab
(
"Alter"
)
+
labs
(
colour
=
"Sterbetafel"
);
xlab
(
"Alter"
)
+
labs
(
colour
=
legend.title
);
if
(
title
!=
""
)
{
pl
=
pl
+
ggtitle
(
title
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment