Simultaneous Q-Mode and R-Mode Factor Analysis for Spatial Data
Overview
Performs Q-mode and R-mode factor analysis simultaneously on spatial and non-spatial data. A single function, qrfactor(), carries out principal component analysis, R-mode factor analysis, Q-mode factor analysis, simultaneous R- and Q-mode factor analysis, principal coordinate analysis and multidimensional scaling. Loadings and scores are returned from the fitted object, and the plot() method provides annotated biplots for combinations of eigenvectors, loadings and scores. Input may be supplied as an 'ESRI' shapefile, a delimited text file or a data frame.
New features
qrfactor()gains arotationargument (defaultFALSE). Setrotation = TRUE(or"varimax") to varimax-rotate the retained factors to simple structure; the default keeps the classical unrotated solution, so existing results are unchanged. When rotation is requested the same orthogonal rotation is applied to the R-mode and Q-mode loadings, so both modes remain on one common set of axes and the scores, combined loadings, appended index columns and all biplots/maps rotate consistently. The eigenvectors, eigenvalues and PCA loadings are left unrotated. The fitted object now also carriesrotation,unrotated.r.loadingandunrotated.q.loading.
CRAN policy compliance
Show all changes in 1.6Hide the rest of the changes in 1.6
- The
plot()method no longer leaves the user's graphics state changed:par()is captured on entry and restored withon.exit(). - The analysis views (
type = "cluster","anova","region","admin","diagnose") no longer write statistical tables to the console unconditionally. They are silent by default and print only when the newplot(..., verbose = TRUE)argument is set; theprint()/summary()methods are unaffected. - Quoted software and package names (
'qrfactor()','plot()','ESRI') in theDESCRIPTION, and rewrote the?qrfactorexamples so the fast data-frame workflow runs unwrapped and only the shapefile / map examples (which needsf/sp) are under\donttest{}. The stalereadOGR()example call was removed.
From NEWS.md in the release
Install
Health
ERRORexamplesr-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Running examples in ‘qrfactor-Ex.R’ failed
The error most likely occurred in:
> ### Name: qrfactor
> ### Title: Simultaneous Q-Mode and R-Mode Factor Analysis
> ### Aliases: qrfactor qrfactor.default print.qrfactor summary.qrfactor
> ### plot.qrfactor
> ### Keywords: Factor Analysis
>
> ### ** Examples
>
> # --- CSV / data-frame workflow (fast, always runs) ---
> csv <- system.file("external", "Africanfreshwater.csv", package = "qrfactor")
> var <- c("Domestic", "Industry", "Agricultur", "Resources",
+ "withdrawal", "perCapitaW")
>
> mod0 <- qrfactor(csv, var = var) # classical unrotated solution (default)
Error in `[.data.frame`(object, var) : undefined columns selected
Calls: qrfactor -> qrfactor.default -> rq -> [ -> [.data.frame
Execution halted- ERROR11 OK, 2 ERRORNow
- ERROR5 OK, 2 ERROR2026-09-16
Documentation
- Help pages
- 2
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 50%
Downloads
Repository
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/gowusu/qrfactor on 2026-10-21.
GitHub Pages site last deployed 2026-07-26
pkgdown site last built 2026-07-26, before release 1.6 (2026-09-15)
Dependencies
Installing qrfactor adds 6 packages (3 with compiled code, 7.1 MB of source tarballs). Heaviest: sp 4.3 MB, robustbase 2.2 MB, mvoutlier 466 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- unarchivedReturned to CRAN2026-09-15
- 1.6Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- archivedRemoved from CRAN2018-06-17check problems were not corrected despite reminders
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
Show 9 earlier eventsHide 9 earlier events
Package metadata
- First published
- 2011-10-26
- Total releases
- 6 / 15 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 2.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("qrfactor")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.