Title: Non-Linear Dimensionality Reduction Visualization Tool
Version: 0.1.3
Description: A 'shiny' application for visualizing high-dimensional data using non-linear dimensionality reduction (NLDR) techniques such as t-SNE and UMAP. It provides an interactive platform to explore high-dimensional datasets, diagnose the quality of the embeddings using the 'quollr' package, and compare different NLDR methods.
License: MIT + file LICENSE
URL: https://github.com/Divendra2006/polarisR, https://divendra2006.github.io/polarisR/
BugReports: https://github.com/Divendra2006/polarisR/issues
Depends: R (≥ 4.1.0)
Imports: bslib, crosstalk, detourr, dplyr, DT, FNN, future, ggplot2, magrittr, plotly, quollr, Rtsne, scales, shiny, stats, tools, tourr, umap, utils
Suggests: knitr, rmarkdown, spelling, testthat (≥ 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
Encoding: UTF-8
Language: en-US
LazyData: true
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-09-10 14:21:50 UTC; yadav
Author: Divendra Yadav [aut, cre], Ursula Laa ORCID iD [aut], Jayani P. Gamage ORCID iD [aut], Eun-Kyung Lee [aut]
Maintainer: Divendra Yadav <divendrasinghyadaviit@gmail.com>
Repository: CRAN
Date/Publication: 2025-09-15 08:30:12 UTC

Four Clusters Simulated Dataset

Description

This dataset (four_clusters) contains simulated data with four distinct clusters, each generated using different shapes and scales. It is ideal for demonstrating clustering algorithms and visualization techniques.

Usage

four_clusters

Format

A data frame with 2000 rows and 4 variables:

x1

Numeric. First feature coordinate.

x2

Numeric. Second feature coordinate.

x3

Numeric. Third feature coordinate.

x4

Numeric. Fourth feature coordinate.

cluster

Factor. The cluster label (1, 2, 3, or 4).

Details

Four Clusters Simulated Dataset

Source

Simulated using cardinalR package.

References

Gamage J, Cook D, Harrison P, Lydeamore M, Talagala T (2025).cardinalR: Collection of Data Structures. R package version 0.1.10, https://github.com/JayaniLakshika/cardinalR.

Examples

data(four_clusters)
head(four_clusters)
dim(four_clusters)

Load Built-in Datasets for NLDR Visualization

Description

Loads and returns a named list of built-in example datasets that are included with the polarisR package. These datasets are specifically chosen to demonstrate different characteristics and challenges in non-linear dimensionality reduction analysis and visualization.

Usage

load_custom_datasets()

Value

A named list containing the successfully loaded datasets. Each element is a data.frame with the following structure:

If any dataset fails to load, a warning is issued but the function continues, returning only the successfully loaded datasets. An empty list is returned if no datasets can be loaded.

Error Handling

The function includes robust error handling:

Usage in Application

This function is typically called during application initialization to populate the example dataset dropdown in the UI. The returned list is stored in a reactive value and can be dynamically extended with user-uploaded datasets.

Note

The function uses data to load datasets from the package namespace. If the polarisR package is not properly installed or the data files are missing, warnings will be generated for the affected datasets.

Author(s)

GSoC Contributor

See Also

Examples

if(interactive()){
# Load all available datasets
datasets <- load_custom_datasets()
names(datasets)  # Shows available dataset names

# Check what was successfully loaded
if ("four_clusters" %in% names(datasets)) {
  dim(datasets$four_clusters)
  head(datasets$four_clusters)
}

# Use in shiny application initialization
custom_datasets <- shiny::reactiveVal(load_custom_datasets())
available_datasets <- shiny::reactiveVal(
  c("None", names(load_custom_datasets()))
)
}


NLDR Visualization Tool Server Logic

Description

Implements the comprehensive server-side logic for the NLDR visualization tool. This function handles all reactive computations, data processing, visualization generation, and user interactions for the multi-tab NLDR analysis application.

Usage

nldr_viz_server(input, output, session)

Arguments

input

The shiny input object containing all user interface inputs. This includes form controls, button clicks, plot selections, and file uploads.

output

The shiny output object for sending rendered content to the UI. Used for plots, tables, text outputs, and dynamic UI elements.

session

The shiny session object for managing client-server communication. Provides access to session state, input updates, and client information.

Details

The server function manages several key areas of functionality:

Data Management:

NLDR Computations:

Interactive Visualizations:

Dynamic Tours:

Quality Assessment (Quollr Integration):

Method Comparison:

State Management:

Parallel Processing: The server automatically configures parallel processing:

Value

Invisible NULL. The function sets up reactive expressions and observers that handle all server-side logic. The actual outputs are managed through the shiny reactive system and sent to the client via the output object.

Reactive Values

The server maintains several key reactive values:

Error Handling

Comprehensive error handling includes:

Performance Considerations

Note

This function requires several packages to be available:

Author(s)

GSoC Contributor

See Also


NLDR Visualization Tool User Interface

Description

Creates the comprehensive user interface for the NLDR visualization tool using modern Bootstrap 5 styling with bslib. The UI provides an intuitive tabbed interface for data exploration, dimensionality reduction, quality assessment, and method comparison.

Usage

nldr_viz_ui()

Details

The user interface is organized into five main navigation panels:

1. Dataset Preview Tab:

2. Dataset Visualization Tab:

3. Dynamic Tour Tab:

4. Diagnosing Tab:

5. Method Comparison Tab:

The interface uses modern design principles:

Value

A tagList object representing the complete UI structure suitable for use in shinyApp or as a module UI function. The returned object contains all necessary HTML, CSS, and JavaScript dependencies.

Custom CSS

The interface includes custom CSS for:

Accessibility

The UI follows accessibility best practices:

Note

The UI function automatically imports all required dependencies:

Author(s)

GSoC Contributor

See Also


PDFSense Dataset

Description

A dataset representing the space of parton distribution function fit, each point in the variables labelled X1-X56 indicate moving +- 1 standard devation from the 'best' (maximum likelihood estimate) fit of the function. Each observation has all predictions of the corresponding measurement from an experiment.

Usage

pdfsense

Format

An object of class data.frame with 2808 rows and 62 columns.

Details

(see table 3 in that paper for more explicit details).

The remaining columns are:

Source

http://www.physics.smu.edu/botingw/PDFsense_web_histlogy/

References

Wang, B.-T., Hobbs, T. J., Doyle, S., Gao, J., Hou, T.-J., Nadolsky, P. M., & Olness, F. I. (2018). PDFSense: Mapping the sensitivity of hadronic experiments to nucleon structure. Retrieved from https://arxiv.org/abs/1808.07470

Cook, D., Laa, U., & Valencia, G. (2018). Dynamical projections for the visualization of PDFSense data. The European Physical Journal C, 78(9), 742. doi:10.1140/epjc/s10052-018-6205-2


Run NLDR Visualization Tool

Description

Launches the interactive NLDR (Non-Linear Dimensionality Reduction) Visualization Tool as a shiny application for exploring high-dimensional datasets using t-SNE and UMAP.

Usage

run_nldr_viz(...)

Arguments

...

Additional arguments passed to shinyApp

Details

The application includes five main tabs:

Value

A shiny application object that launches the NLDR visualization interface.

See Also

nldr_viz_ui, nldr_viz_server