Skip to content
Prev 244488 / 398506 Next

Condional Density Plot from different data

On Thu, Dec 9, 2010 at 10:11 AM, Doran, Harold <HDoran at air.org> wrote:
Or, slightly shorter

dat <- make.groups(datA, datB)
densityplot(~scores|condition, groups = which, dat)
The problem here is that datA$scores and datB$scores don't have the
same length. This requirement is implicit in the description of the
extended formula interface:

          'y1 + y2 ~ x | a * b' [...] would be taken to mean that the
user wants to plot
          both 'y1 ~ x | a * b' and 'y2 ~ x | a * b' [...] superposed
in each panel.

and the latter formulae would make sense only if x, a, b, and y1 (and
y2) have the same length.

-Deepayan