Created
July 6, 2021 09:57
-
-
Save MichaelChirico/66fd80df4193dfcd7f8e7a998962c80e to your computer and use it in GitHub Desktop.
Make a barplot showing trend of R translatable messages over time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(data.table) | |
# Export the table on page 2 to .csv: | |
# https://docs.google.com/document/d/1XbfOf3CLVb2UFyUZGJoVLkBUDZ6Hs3APCDW8UzuOvZk | |
DT=fread('~/Desktop/r-translations.csv') | |
DT[ , { | |
par(cex = 2) | |
y = `# Messages` | |
xx = barplot(y, names.arg = `R Version`, space=0, col='#2268bc', yaxt='n', main='Translatable messages by R version', las=2L) | |
text(xx[1L], y[1L]/2, srt=90, prettyNum(y[1L], big.mark = ','), col='white') | |
text(xx[.N], y[.N]/2, srt=90, prettyNum(y[.N], big.mark = ','), col='white') | |
}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment