Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ProcMod
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LECASofts
ProcMod
Commits
089fccf2
Commit
089fccf2
authored
Jun 22, 2018
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds a function to test if an object is a procrust model (`pm`)
parent
89dc07f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
mprocuste.R
R/mprocuste.R
+12
-0
No files found.
R/mprocuste.R
View file @
089fccf2
...
...
@@ -35,6 +35,15 @@ pm.fit = function(covmat,y,xs,
.ctrace
<-
function
(
MAT
)
sum
(
MAT
^
2
)
#' Tests that the object is as `pm` instance.
#'
#' @author Eric Coissac
#' @author Christelle Gonindard-Melodelima
#' @export
is.pm
=
function
(
obj
)
{
inherits
(
obj
,
"pm"
)
}
#' Performs a procruste model on a set of coordinate matrices
#'
#' @author Eric Coissac
...
...
@@ -94,6 +103,7 @@ pm = function (formula,data, subset, weights, na.action, method = "qr",
z
$
A
<-
NULL
}
else
{
vars
<-
vars.procmod
(
mt
,
mf
)
nvars
=
ncol
(
vars
)
irep
=
attr
(
vars
,
"response"
)
...
...
@@ -105,6 +115,8 @@ pm = function (formula,data, subset, weights, na.action, method = "qr",
vars.norm
=
as.procmod.frame
(
mapply
(
function
(
x
)
scale
(
x
,
scale
=
FALSE
),
vars
,
SIMPLIFY
=
FALSE
))
if
(
is.null
(
w
))
{
subset.w
=
rep
(
TRUE
,
nvars
)
...
...
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