Displaying a greater than or equal sign
An alternative to using expressions is Unicode characters, in this case Unicode Character 'GREATER-THAN OR EQUAL TO' (U+2265). Copying @mnel's example
.d <- data.frame(a = letters[1:6], y = 1:6)
ggplot(.d, aes(x=a,y=y)) + geom_point() +
scale_x_discrete(labels = c(letters[1:5], "\u2265 80"))
Unicode is a good alternative if you have trouble remembering the complicated expression syntax or if you need linebreaks, which expressions don't allow. As a downside, whether specific Unicode characters work at all depends on your graphics device and font of choice.
Displaying greater than sign in ggsurvplot (unicode errrors)
Per @JosefZ's suggestion, I utilized the right arrowhead unicode to generate and it worked great. Final code with solution incorporated is below:
kmcurve_pd <- ggsurvplot(km_fitp1_pd,
palette = c("#202960", "#8CC63E"),
xlab = "Time (Months)",
legend.labs = c(paste0("\u2264","1 Prior Progression"),
paste0("\u02C3","1 Prior Progression"))
What do and stand for?
<
stands for the less-than sign:<
>
stands for the greater-than sign:>
≤
stands for the less-than or equals sign:≤
≥
stands for the greater-than or equals sign:≥
Related Topics
Data.Frame Without Ruining Column Names
Solution. How to Install_Github When There Is a Proxy
Common Legend for Multiple Plots in R
What Is Integer Overflow in R and How Can It Happen
Removing the Border of Legend Symbol
Fill Missing Combinations in a Dataframe
Writing Multiple Data Frames into .CSV Files Using R
Is There a Vectorized Parallel Max() and Min()
From Data Table, Randomly Select One Row Per Group
Finding Out Which Functions Are Called Within a Given Function
Issue When Importing Dataset: 'Error in Scan(...): Line 1 Did Not Have 145 Elements'
Create Dataframe from a Matrix
Change the Default Colour Palette in Ggplot
Stacked Barplot with Colour Gradients for Each Bar