tolenv determines tolerance envelopes for the log ratio of spatial densities of cases and controls. Specifically, the function identifies where the observed log ratio of spatial densities exceeds what is expected under the random labeling hypothesis. Results can be easily plotted using the contour or image functions.tolenv(object, level = 0.9, alternative = "two.sided")im object from the logrr function.tolenv object. This is just a list with components x, y, and z the can be used with the image or contour functions quite easily.alternative ="two.sided" identifies locations where the observed log ratio of spatial densities is below and above, respectively, the (1-level)/2 and 1 - (1-level)/2 quantiles of log ratios of spatial densities simulated under the random labeling hypothesis. "greater" finds where the observed ratio exceeds the "level" quantile. "lower" finds where the observed ratio exceeds the 1 - level quantile.The z argument of the list returned has a -1 for locations where the observed log ratio of spatial densities is below the tolerance envelope, a 0 for locations within the tolerance envelope, and a 1 for locations where the log ratio of spatial densities exceeds the tolerance envelope.