MTBee R Language
banner
mtbee-r-language.bsky.social
MTBee R Language
@mtbee-r-language.bsky.social
Cataloging my tips, tricks, traps discovered in my learning the R language
There's a drop down list on the "source" button in RStudio I choose the "source with echo" option!
October 30, 2025 at 2:55 AM
glimpse displays data vertically vs horizontally
October 27, 2025 at 12:06 AM
The datanovia.com webr console is pretty slick!
Like rdrr.io - this will run your code directly in it's console - or you can upload / run an R script.
October 25, 2025 at 6:51 AM
rdrr.io is pretty clever!
October 25, 2025 at 5:56 AM
I think I needed a tutorial on the R tutorial! I had a very difficult time getting 'filter' function working...here's what it looks like for me.
October 23, 2025 at 4:38 PM
Example use of R package commands - and how to check 'library loaded' in 'package' tab in R Studio...
October 23, 2025 at 1:47 AM
Making a 'mylib' path.
1) Open terminal
2) Went to /home/michaeltbee/R
2) Did a mkdir 'mylib' - then...
3) Executed in console...

.libPaths(c("/home/michaeltbee/R/mylib"),.libPaths())

...now when I install.packages it should go there. :)
October 23, 2025 at 1:23 AM
In the last script I'd used 'labs(caption...' as a plot identifier.
of the form 'rpt:nnn ~ rpttitle'
September 26, 2025 at 4:47 AM
Solution on left using geom_line(linetype...linewidth...) - get's rid of the warning on the right for geom_line(size...)
September 23, 2025 at 1:54 AM
Example vimrc and Session.vim
-
Incorporate the contents of example_vimrc in your own ~/.vimrc file
If you wish to edit / review all scripts from chapter 9 in vim
try 'vim -S Session.vim'
-
example_vimrc
drive.proton.me/urls/R2DT12T...

Session.vim
drive.proton.me/urls/DG1VHXN...
September 22, 2025 at 3:54 AM
From 'R for Data Analysis' - last script of ch9...

My 1st attempt at the script (needs to be compared against book)

Share 09.06.Themes.R
drive.proton.me/urls/E277PW8...

Share DataSet-ProfSalaries.csv
drive.proton.me/urls/Z37VJ6A...

Share 09.06.Themes.R.1.Rplot.png
drive.proton.me/urls/3PW80MG...
September 20, 2025 at 3:30 AM
Refactor of 09.04.Facets.R uses scales package
and a custom function* = xfrms 1000 -> 1k
09.04.02.Facets.R
drive.proton.me/urls/E8FWPS9...
...Facets.R.1.Rplot.png
drive.proton.me/urls/WSJR63C...
DataSet-ProfSalaries.csv
drive.proton.me/urls/Z37VJ6A...
* kudos
www.r-bloggers.com/2019/01/usin...
September 19, 2025 at 10:41 PM
Example plots from 09.03.Statistics.R
September 18, 2025 at 10:57 PM
Detach(When cleaning up an environment), copilot offered it automagically when I typed '#Cleanup...'!
September 18, 2025 at 7:19 PM
Starting 'R for Data Analysis' ... 'Chapter 9 Storytelling with data'

First script (09.01.Aesthetics.R) + results

drive.proton.me/urls/9HJCJ7C...
September 15, 2025 at 6:56 PM
I see a place for AI now. Things like this are a phenomenal help / aid. I think both for learning (and I think even refactoring existing code).
...
Here's a sample of the full / final code rewrite (with the suggested improvements).
September 10, 2025 at 4:36 AM
The actual code (with my formatting)
September 10, 2025 at 3:58 AM
...it even made / offered improvements:
September 10, 2025 at 3:19 AM
The results from the ggplot compare with the qplot...
September 10, 2025 at 3:01 AM
For these Proton drive zips - I'm excluding the .git and renv folders...
September 3, 2025 at 5:52 AM
Screen capture of RStudio showing how console, history, code editor can work together in development.
September 3, 2025 at 1:31 AM
Interesting behavior in the Code Editor! When I started typed '# Cleanup...' - the editor completed the comment and automatically added a appropriate 'rm' command! Likewise, when after this I started to write '#End...' it put out an appropriate end comment for the script!
September 2, 2025 at 1:50 AM
Some additions to my .gitignore:
.Rprofile
.Rproj.user
.Rhistory
.Rdata
.Ruserdata
.sw*
renv
renv.lock
September 1, 2025 at 2:46 PM
For AddressData.R - to correctly reference a 'whole column' - drop the 'level(obj)'. Simply reference the frame-column directly.
September 1, 2025 at 6:06 AM
AddressData.R - the 'camel-back' references from the book are in error. This script 07.04.AddressData.R corrects for these. Likewise, 'levels(object)' in the script outputs NULL. Drop the 'level' it runs correctly.
September 1, 2025 at 5:55 AM