inst/examples/demo/src/shared/shared.R

# Pull in the file 'shared/palette.R' as 'cols.R'
orderly_shared_resource(cols.R = "palette.R")

# Then source it, as usual
source("cols.R")

# And use the function 'palette()' found within
png("volcano.png")
image(volcano, col = palette())
dev.off()

Try the orderly package in your browser

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

orderly documentation built on Jan. 24, 2026, 1:07 a.m.