The following reproducible example creates a conditional density plot depicting change by aspect. I’ve included NoData in the example because my original dataset also has NoData.
aspect = c("N", "N", "E", "S", "SW", "SW", "E", "W", "N", "N")
change = c(-1, NA, 1, NA, 1, 1, -1, 1, -1, NA)
mydata = data.frame(aspect,change)
x = factor(mydata$change)
cdplot(x~mydata$aspect)

Related Questions:
- How do I replace the numerical values on the X-axis with the
associated text values (e.g. N, SW, etc)? - Is it possible to have control over the order of text values on the
X-axis? I believe, by default, the values on the X-axis correspond
to the alphabetically ordered text values in “aspect”. - How do I replace “NA” on the X-axis with “No Change”?
just to show what @Roland said in the comments, you use the function in a wrong manner.
and now h contains the conditional density functions over the levels of aspect.
e.g