Skip to content

suntools

1.1.0

Calculate Sun Position, Sunrise, Sunset, Solar Noon and Twilight

8packages depend
98.3Kdownloads / year
83.1%test coverage
13/13checks pass

Overview

About
Maintained by Adriaan M. DokterFirst published 2023-07-063 releasesCRAN page ↗GitHub ↗

Provides a set of convenient functions for calculating sun-related information, including the sun's position (elevation and azimuth), and the times of sunrise, sunset, solar noon, and twilight for any given geographical location on Earth. These calculations are based on equations provided by the National Oceanic & Atmospheric Administration (NOAA) https://gml.noaa.gov/grad/solcalc/calcdetails.html as described in "Astronomical Algorithms" by Jean Meeus (1991, ISBN: 978-0-943396-35-4).

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-devel-linux-x86_64-fedora-gcc
Code health
Yes
Tests · ratio 0.16
83.1%
Coverage · measured lines
100%
Documentation · exports
None
Vignettes
Yes
README
3
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • WARNING2026-06-08
    12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Downloads

98.3K
CRAN downloads in the past year
Rank #1,063 · ~269/day · ~8.2K/mo
Daily download trend is not available in this view yet.
12K30 days
41.8K90 days
98.3K1 year
Compare downloads with other packages →
Also on281 r2u6 autocran36 c2d4u

Repository

Repository
13Stars
2Forks
1Open issues
0Open PRs
3Releases
License GPL-3.0 · 144 commits · 0% stars, 30d

Stars over time

2024-12-11 · 102026-07-07 · 13

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)
Depends (1)
R >= 2.10
Imports (3)
methodssfstats
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none

Code & Tests

Code Composition
R 1,067 (65%)Rd 568 (35%)
Code characteristics
Object systems
S4 generic4S4 method12
Cyclomatic complexity
1.0 median / 7 max
Test cases
7 / 0.16 per code line
Documented parameters
100%

Test coverage

Line coverage

83%

Expression

84.9%

Tests / Examples

83.1% / 84% ex

Functions

30 0 exported

Complexity

1.2 avg / 7 max

Call network

30 nodes / 60 edges

Loading call graph…

Lowest coverage

30 functions
FunctionCycloCoverage
.sunRadVec10%
.sunRtAscension10%
.sunTrueAnom10%
.balanceCrdsTimes755%
.crepuscule178%
.sunriset178%

People & History

People (6)
Maintainer (1)
Contributor, Maintainer
Authors (2)
Contributors (4)
Contributor, Maintainer
Contributor
Contributor
Contributor
Release timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.1.0Latest
    2025-11-07 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.1
    2024-11-20 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.0
    2023-07-06
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-07-06
Total releases
3 / 3 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 2.10
Download size
16 KB
Installed size
not tracked yet
With dependencies
not tracked yet