dimanche 31 mai 2020

Ifelse labeling

Working with chemical dataset and plotting the sample sites on map, colored by the chemical concentrations. I want to label the highest concentration points with their site name and am trying to use the geom_text(label = ifelse())) but am unsure about the NO aspect of the function.

    Jul_Data <- ggplot() +
    geom_sf(data) +
    geom_point(data = Jul_Data, aes(x = Easting, y = Northing, color = Concentration)) +
    geom_text(label = ifelse(Jul_Data$Concentration > 2000))

I understand that there is more needed for the ifelse but am really unsure about what it is supposed to be. I know there is a test, Yes, and NO aspect. All examples have been too specific for me to understand. Apologies if this is a novice question.

Aucun commentaire:

Enregistrer un commentaire