Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IEAtoolsMOVEDTOGITHUB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Otto, Dr. Saskia
IEAtoolsMOVEDTOGITHUB
Commits
1ba8f691
Commit
1ba8f691
authored
4 years ago
by
Otto, Dr. Saskia
Browse files
Options
Downloads
Patches
Plain Diff
fixed issue of not exporting
parent
c871ff2e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
NAMESPACE
+2
-0
2 additions, 0 deletions
NAMESPACE
R/panel_funcs.R
+48
-0
48 additions, 0 deletions
R/panel_funcs.R
man/panel_funcs.Rd
+34
-0
34 additions, 0 deletions
man/panel_funcs.Rd
with
84 additions
and
0 deletions
NAMESPACE
+
2
−
0
View file @
1ba8f691
...
...
@@ -5,6 +5,8 @@ export(calc_vif)
export(explore_na)
export(impute)
export(panel_cor)
export(panel_hist)
export(panel_lines)
export(plot_statespace_ch)
export(plot_statespace_ed)
export(statespace_ch)
...
...
This diff is collapsed.
Click to expand it.
R/panel_
cor
.R
→
R/panel_
funcs
.R
+
48
−
0
View file @
1ba8f691
#' Show correlation coefficient in pairs plot
#' Show correlation coefficient
, histogram or regression lines
in pairs plot
#'
#'
This and the other functions
are utility functions
for the pairs plot.
#' \code{panel_cor} shows the Pearson product-moment correlation
coefficient in
#' the selected panels. \code{panel_lines} shows the regression line and
#'
\code{panel_cor}, \code{panel_lines} and \code{panel_hist}
are utility functions
#'
for the pairs plot.
\code{panel_cor} shows the Pearson product-moment correlation
#'
coefficient in
the selected panels. \code{panel_lines} shows the regression line and
#' \code{panel_hist} histograms.
#'
#' @param x numeric vector
#' @param y numeric vector
#' @name panel_funcs
#' @seealso \code{\link{pairs}}
#' @export
#' @examples
#' z <- matrix(rnorm(40), ncol = 4)
#' pairs(z, upper.panel = panel_cor,
#' lower.panel = panel_lines, diag.panel = panel_hist)
NULL
#' @rdname panel_funcs
#' @export
panel_cor
<-
function
(
x
,
y
)
{
par
(
usr
=
c
(
0
,
1
,
0
,
1
))
r
<-
stats
::
cor
(
x
,
y
,
use
=
"pairwise.complete.obs"
)
...
...
@@ -18,7 +25,8 @@ panel_cor <- function(x, y) {
text
(
0.5
,
0.5
,
txt
,
cex
=
0.9
/
strwidth
(
txt
)
*
abs
(
r
))
}
#' @rdname panel_cor
#' @rdname panel_funcs
#' @export
panel_lines
<-
function
(
x
,
y
)
{
points
(
x
,
y
,
bg
=
NA
,
cex
=
1
)
sel
<-
is.finite
(
x
)
&
is.finite
(
y
)
...
...
@@ -27,8 +35,8 @@ panel_lines <- function (x, y) {
abline
(
lml
,
col
=
"blue"
)}
}
#' @
rdname panel_c
or
#' @rdname panel_funcs
#' @
exp
or
t
panel_hist
<-
function
(
x
)
{
usr
<-
par
(
"usr"
)
par
(
usr
=
c
(
usr
[
1
:
2
],
0
,
1.5
)
)
...
...
This diff is collapsed.
Click to expand it.
man/panel_
cor
.Rd
→
man/panel_
funcs
.Rd
+
34
−
0
View file @
1ba8f691
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/panel_cor.R
\name{panel_cor}
% Please edit documentation in R/panel_funcs.R
\name{panel_funcs}
\alias{panel_funcs}
\alias{panel_cor}
\alias{panel_lines}
\alias{panel_hist}
\title{Show correlation coefficient in pairs plot}
\title{Show correlation coefficient
, histogram or regression lines
in pairs plot}
\usage{
panel_cor(x, y)
...
...
@@ -18,11 +19,16 @@ panel_hist(x)
\item{y}{numeric vector}
}
\description{
This and the other functions
are utility functions
for the pairs plot.
\code{panel_cor} shows the Pearson product-moment correlation
coefficient in
the selected panels. \code{panel_lines} shows the regression line and
\code{panel_cor}, \code{panel_lines} and \code{panel_hist}
are utility functions
for the pairs plot.
\code{panel_cor} shows the Pearson product-moment correlation
coefficient in
the selected panels. \code{panel_lines} shows the regression line and
\code{panel_hist} histograms.
}
\examples{
z <- matrix(rnorm(40), ncol = 4)
pairs(z, upper.panel = panel_cor,
lower.panel = panel_lines, diag.panel = panel_hist)
}
\seealso{
\code{\link{pairs}}
}
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