https://github.com/aphalo/photobiology

Package ‘photobiology’ defines a system of classes for storing spectral data and accompanying methods and operators. This is the core of a suite of R packages for photobiological calculations.

https://github.com/aphalo/photobiology

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

light photobiology quantification r4photobiology-suite radiation spectra sun-position
Last synced: 5 months ago · JSON representation

Repository

Package ‘photobiology’ defines a system of classes for storing spectral data and accompanying methods and operators. This is the core of a suite of R packages for photobiological calculations.

Basic Info
  • Host: GitHub
  • Owner: aphalo
  • Language: HTML
  • Default Branch: master
  • Homepage:
  • Size: 72 MB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • Open Issues: 8
  • Releases: 0
Topics
light photobiology quantification r4photobiology-suite radiation spectra sun-position
Created about 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog

README.Rmd

---
output:
  github_document:
    html_preview: TRUE
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
  fig.asp = 2/3,
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)
```

# photobiology 


 [![CRAN version](https://www.r-pkg.org/badges/version-last-release/photobiology)](https://cran.r-project.org/package=photobiology) [![cran checks](https://badges.cranchecks.info/worst/photobiology.svg)](https://cran.r-project.org/web/checks/check_results_photobiology.html)
[![photobiology status badge](https://aphalo.r-universe.dev/badges/photobiology)](https://aphalo.r-universe.dev/photobiology)
[![R-CMD-check](https://github.com/aphalo/photobiology/workflows/R-CMD-check/badge.svg)](https://github.com/aphalo/photobiology/actions)
[![Documentation](https://img.shields.io/badge/documentation-photobiology-informational.svg)](https://docs.r4photobiology.info/photobiology/)
[![doi](https://img.shields.io/badge/doi-10.32614/CRAN.package.photobiology-blue.svg)](https://doi.org/10.32614/CRAN.package.photobiology)

  
Package '**photobiology**' defines a system of classes for storing spectral data and accompanying metadata. For each of these classes specialised summary methods, maths operators and functions are provided. In addition, classes for storing collections of objects of the classes for individual spectra are defined as well as 'apply' functions. Extraction and replacement operators are implemented.

Functions for calculation of the position of the sun, times of sunrise and sunset, day length and night length are also available. Starting from 'photobiology' 0.12.0 they are imported from package 'SunCalcMeeus', which is a spin-off of 'photobiology. _If you only use these functions, you can attach or load 'SunCalcMeeus' instead of 'photobiology', otherwise, the only visible change is that the on-line help is at [a separate site](https://docs.r4photobiology.info/SunCalcMeeus/)._

Functions for the estimation of evapotranspiration and the energy balance of vegetation have been migrated to package ['photobiologyPlants'](https://docs.r4photobiology.info/photobiologyPlants/) as they are related to vegetation. To use them with this version of package 'photobiology', please, add `library(photobiologyPlants)` to your code.

The package supports storage and manipulation of data for radiation quantities and for optical properties of objects and solutes, as well as response and action spectra for photobiological, photochemical and photoelectrical responses.

This package is the core of a suite of R packages for photobiological calculations described at the [r4photobiology](https://www.r4photobiology.info) web site and in the vignette [The R for Photobiology Suite](https://docs.r4photobiology.info/photobiology/articles/userguide-0-r4p-introduction.html).

## Examples

The first example shows you how to estimate solar irradiance in W/m2 under a filter. We use a measured solar spectrum and a measured filter transmission spectrum.

```{r example1, message=FALSE}
library(photobiology)
e_irrad(sun.spct * yellow_gel.spct)
```

The second example shows some simple astronomical calculations for the sun.

```{r example2}
geocode <- data.frame(lon = 0, lat = 55)
date <- lubridate::now(tzone = "UTC")
sunrise_time(date, tz = "UTC", geocode = geocode)
day_length(date, tz = "UTC", geocode = geocode)
```

## Installation

Installation of the most recent stable version from CRAN:

```{r, eval=FALSE}
install.packages("photobiology")
```

Installation of the current unstable version from R-Universe CRAN-like repository:

```{r, eval=FALSE}
install.packages('photobiology', 
                 repos = c('https://aphalo.r-universe.dev', 
                           'https://cloud.r-project.org'))
```

The two approaches above, automatically install dependencies.

Installation of the current unstable version from GitHub:

```{r, eval=FALSE}
# install.packages("devtools")
devtools::install_github("aphalo/photobiology")
```

Installation from GitHub sources does not automatically install dependencies. Once package 'photobiology' is installed, installation of the remaining or missing packages in the suite from CRAN (or by adding the repository information as above, also from R-Universe):

```{r, eval=FALSE}
intalled_pkgs <- installed.packages()[ , 1]
missing_pkgs <- setdiff(photobiology::r4p_pkgs, intalled_pkgs)
if (length(missing_pkgs) > 0) {
 install.packages(missing_pkgs)
}
```

## Documentation

HTML documentation is available at (), including two *User Guides*.

News on updates to the different packages of the 'r4photobiology' suite are regularly posted at ().

Two articles introduce the basic ideas behind the design of the suite and describe its use: Aphalo P. J. (2015) () and Aphalo P. J. (2016) ().

A book is under preparation, and the draft is currently available at ().

A handbook written before the suite was developed contains useful information on the quantification and manipulation of ultraviolet and visible radiation: Aphalo, P. J., Albert, A., Björn, L. O., McLeod, A. R., Robson, T. M., & Rosenqvist, E. (Eds.) (2012) Beyond the Visible: A handbook of best practice in plant UV photobiology (1st ed., p. xxx + 174). Helsinki: University of Helsinki, Department of Biosciences, Division of Plant Biology. ISBN 978-952-10-8363-1 (PDF), 978-952-10-8362-4 (paperback). PDF file available from ().

## Contributing

Pull requests, bug reports, and feature requests are welcome at ().

## Citation

If you use this package to produce scientific or commercial publications, please cite according to:

```{r}
citation("photobiology")
```

## License

© 2012-2025 Pedro J. Aphalo ([pedro.aphalo\@helsinki.fi](mailto:pedro.aphalo@helsinki.fi){.email}). Released under the GPL, version 2 or greater. This software carries no warranty of any kind.

Owner

  • Name: Pedro Aphalo
  • Login: aphalo
  • Kind: user
  • Location: Helsinki, Finland
  • Company: University of Helsinki, Organismal and Evolutionary Biology (OEB)

Senior University Lecturer, Principal Investigator (Sensory Ecology of Plants, Photobiology, Crops, Forest trees, Data Analysis, Data Visualization)

GitHub Events

Total
  • Issues event: 22
  • Watch event: 2
  • Delete event: 2
  • Issue comment event: 31
  • Push event: 86
  • Create event: 3
Last Year
  • Issues event: 22
  • Watch event: 2
  • Delete event: 2
  • Issue comment event: 31
  • Push event: 86
  • Create event: 3

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 1,068
  • Total Committers: 2
  • Avg Commits per committer: 534.0
  • Development Distribution Score (DDS): 0.01
Past Year
  • Commits: 45
  • Committers: 1
  • Avg Commits per committer: 45.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Pedro J. Aphalo p****o@h****i 1,057
aphalo a****o 11
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 44
  • Total pull requests: 0
  • Average time to close issues: 6 months
  • Average time to close pull requests: N/A
  • Total issue authors: 5
  • Total pull request authors: 0
  • Average comments per issue: 2.45
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 0
  • Average time to close issues: 13 days
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • aphalo (35)
  • CdeMills (3)
  • putmanlab (1)
  • RaulSpain (1)
  • romainfrancois (1)
Pull Request Authors
Top Labels
Issue Labels
enhancement (26) bug (15) unit tests (4) documentation (3) on hold (3) invalid (1) blog/website (1) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 1,049 last-month
  • Total docker downloads: 174
  • Total dependent packages: 10
  • Total dependent repositories: 10
  • Total versions: 53
  • Total maintainers: 1
cran.r-project.org: photobiology

Photobiological Calculations

  • Versions: 53
  • Dependent Packages: 10
  • Dependent Repositories: 10
  • Downloads: 1,049 Last month
  • Docker Downloads: 174
Rankings
Dependent packages count: 5.3%
Dependent repos count: 9.2%
Average: 15.3%
Docker downloads count: 17.2%
Forks count: 21.0%
Stargazers count: 23.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.6.0 depends
  • dplyr >= 1.0.9 imports
  • grDevices * imports
  • lubridate >= 1.7.8 imports
  • plyr >= 1.8.7 imports
  • polynom >= 1.4 imports
  • rlang >= 0.4.8 imports
  • splus2R >= 1.3 imports
  • stats * imports
  • stringr >= 1.4.0 imports
  • tibble >= 3.1.0 imports
  • tidyr >= 1.2.0 imports
  • zoo >= 1.8 imports
  • knitr >= 1.30 suggests
  • lutz >= 0.3.1 suggests
  • rmarkdown >= 2.4 suggests
  • roxygen2 >= 7.1.1 suggests
  • testthat >= 2.3.2 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/update-citation-cff.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
  • r-lib/actions/setup-r-dependencies v1 composite