I am trying to make a Rare Earth Elements spider diagram that places concentration in log10 on the y-axis, and each respective element from the Rare Earth Elements on the x-axis. I then am trying to compare several units of rock with each other. An example of what I am looking for and what I am getting is added to the google doc link below.
So, with the code I have added I have two problems: 1. The elements are being listed on the x-axis in alphabetical order, not in the order that I have in my CSV 2. I don't know what I am missing in my code to correlate the points together in each sample to build a line. I couple this with not knowing if that is an issue with my code, or with the way my data is arranged in the CSV.
I have seen someone else tackle this issue by treating the respective elements as dates. I have played with lubridate a bit, but I feel like it wasn't as successful as the code that I've added below... which is saying something.
ggplot(data=dataMGSREE) +
geom_point(mapping = aes(x = Concentration, y = Element, color=Group), show.legend = FALSE) +
coord_flip() +
scale_x_log10()
Analysis Name Element Concentration
HM030218-2 Haycock Upper La 65.00
HM030218-2 Haycock Upper Ce 127.00
HM030218-2 Haycock Upper Pr 13.46
HM030218-2 Haycock Upper Nd 44.00
HM030218-2 Haycock Upper Sm 6.70
HM030218-2 Haycock Upper Eu 0.75
HM030218-2 Haycock Upper Gd 4.48
HM030218-2 Haycock Upper Tb 0.64
HM030218-2 Haycock Upper Dy 3.40
HM030218-2 Haycock Upper Ho 0.73
1-10 of 14 rows
Something similar to the expected result is listed above, while the actual result is here:https://docs.google.com/document/d/1p7QY8Ie_bmav1XApTSy1TCECvteUcxckZXpsy9Ib7Ew/edit?usp=sharing
Please forgive me also for not knowing how to upload the screenshots on here.