Search code examples
rlatexradar-chart

How to use radarchart {fmsb} Drawing radar chart (a.k.a. spider plot)


Im using radarchart of the library "fmsb". My problem is that I dont understand how the input has to be (see here "df" with type data frame: radarchart).

My code:

dat2 <- data.frame(c(0.6, 0.4, 0.5), c(0.5, 0.3, 0.4), c(0.4, 0.2, 0.3), c(0.7, 0.5, 0.6), c(0.9, 0.7, 0.8))
colnames(dat2) <- c("A", "B", "C", "D", "E")
radarchart(dat2, axistype=1, seg=5, plty=1, vlabels=c("A", "B", "C", "D", "E"), vlcex=1, title="(PAKR)")

My purpose is to get a line conncting the points A:0.5, B:0.4, C:0.3, D:0.6, and E:0.8. Something like specifing only a vector like in LaTeX using tkz-kiviat where you need only one vector for drawing a Spider Chart.

Thank you.


Solution

  • One solution is to use this data:

    dat2 <- data.frame(c(100, -10, 50), c(100, -10, 40), c(100, -10, 30), c(100, -10, 60), c(100, -10, 80))