R/zzz.R

Defines functions .onAttach

.onAttach <- function(...) {
	withr::with_preserve_seed({
		# Show messages only in interactive sessions to prevent interference during non-interactive checks (e.g., R CMD check)
		if (!interactive() || stats::runif(1) > 0.1) {
			return()
		}
		
		tips <- c(
			"For microeco version 2, please cite: https://doi.org/10.1002/imt2.70132", 
			"Run ?microeco to find links to GitHub Issues and Tutorials"
		)
		
		tip <- sample(tips, 1)
		packageStartupMessage(paste(strwrap(tip), collapse = "\n"))
	})
}

Try the microeco package in your browser

Any scripts or data that you put into this service are public.

microeco documentation built on Oct. 20, 2026, 9:06 a.m.