[R] denstrip package: densregion when density is not provided

Matteo Richiardi matteo.richiardi at gmail.com
Sat Oct 3 10:16:49 CEST 2015


I have several estimated time series, running from 2013 to 2050. 'y' values
are constrained between 0 and 1. I would like to plot them using shaded
colours of decreasing intensity, depending on an estimated density at each
point x in 2013-2050.

This is what I have done:

require(denstrip)
x <- 2013:2015
y <- seq(0, 1, length=100)
z <- read.delim("clipboard")
densregion(x, y, z)

where I imported 'z' from MS Excel. 'z' looks like (I copied only the first
2 columns, l but I have 100 of them):

        run1      run2
1  0.6932324 0.7732179
2  0.6773456 0.7971804
...
37 0.7260790 0.8724961
38 0.7290335 0.8755433

I get the following error message:
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing =
decreasing)) :
  undefined columns selected

Could anybody please help me with fixing this? Thanks in advance

	[[alternative HTML version deleted]]



More information about the R-help mailing list