Learn R Programming

rosario

The rosario package provides tools to quantify and visualize temporal niche overlap using Pianka and Czekanowski indices, and to simulate null models with the ROSARIO algorithm (Castro-Arellano et al. 2010).

Installation

You can install the development version of rosario from GitHub with:

# Install devtools if you don't have it
install.packages("devtools")

# Install commecometrics from GitHub
devtools::install_github("mariahm1995/rosario")

You can also get the official release version from CRAN

install.packages("rosario")

Example

This is a basic example which shows you how to solve a common problem:

library(rosario)

# Example data
ex1

# Assemblage-wide overlap
temp_overlap(ex1, method = "pianka")

# Null model test
nm <- get_null_model(ex1, method = "pianka", nsim = 200, parallel = FALSE)
nm$p_value

# Visualize ROSARIO patterns
plot_rosario(ex1[1, ], cols = 5)

Copy Link

Version

Install

install.packages('rosario')

Monthly Downloads

125

Version

0.1.0

License

GPL (>= 3)

Maintainer

Iván Castro-Arellano

Last Published

October 20th, 2025

Functions in rosario (0.1.0)

get_null_model

Null-model test via ROSARIO algorithm randomization
temp_overlap

Mean concurrent temporal niche overlap
rosario

Generate cyclic and mirrored permutations of a time series
plot_rosario

Diagram of ROSARIO null-model randomizations
pianka_index

Pianka's niche-overlap index
rosario_sample

ROSARIO randomization of an assemblage matrix
czekanowski_index

Czekanowski overlap index
ex1

Example temporal activity dataset
rescale_matrix

Row-wise rescaling of a matrix to relative frequencies
temp_overlap_plot

Plot null-model results for temporal niche overlap
vec_permutation

Cyclic permutation (rotate) a numeric vector
temp_overlap_df

Convert a square overlap matrix to a tidy pairwise data frame
temp_overlap_matrix

Pairwise temporal niche-overlap matrix
%>%

Pipe operator