JLS_DataScience Profile Banner
James Laird-Smith Profile
James Laird-Smith

@JLS_DataScience

Followers
238
Following
30
Media
27
Statuses
138

Data Scientist at the @BankofEngland. Previously at the @FinancialTimes and University of Cape Town. 🩴🇿🇦

London, England
Joined February 2018
Don't wanna be here? Send us removal request.
@JLS_DataScience
James Laird-Smith
11 months
Can anyone explain why Kamala Harris hasn't download my R package from CRAN yet? I understand she's on the campaign trail, but all she needs is an internet connection. Technical difficulties? #rstats
Tweet media one
0
0
0
@JLS_DataScience
James Laird-Smith
1 year
#rstats friends, I have a question: given that I have some built R package on disk, what is the blessed/easiest way can I (programmatically) check if it's in source or binary format? Beyond just checking the file extension.
0
1
2
@JLS_DataScience
James Laird-Smith
2 years
Back in November I did a webinar for the @NHSrCommunity on "Customising your R experience". The video is now up: #rstats.
0
3
5
@JLS_DataScience
James Laird-Smith
2 years
New categorical colour scheme just dropped 🎤🤩 #rstats.
@mbostock
Mike Bostock
2 years
The new observable10 categorical color scheme by @pettiross features a more saturated vibe to help charts pop. And it looks great in dark mode. 😎
Tweet media one
Tweet media two
Tweet media three
0
1
1
@JLS_DataScience
James Laird-Smith
2 years
RT @NHSrCommunity: 📢 November Webinar 📢. We are very excited to announce that the incredible James Laird-Smith will be presenting a ‘Custom….
0
4
0
@JLS_DataScience
James Laird-Smith
2 years
This Wednesday (Nov 29th) I'm excited to be giving a webinar to the NHS-R Community on "Customising your R experience"! It's going to be at 1pm GMT. Registration link is here, but it will also be recorded. #rstats
0
0
0
@JLS_DataScience
James Laird-Smith
2 years
At 5pm (BST) on Thursday I'm going to be a guest on.@posit_pbc's Data Science Hangout speaking about the work I do for the @bankofengland and supporting its 1000 R users. #rstats There's no need to register, you can join the stream using this link:
0
4
7
@JLS_DataScience
James Laird-Smith
2 years
Is it wrong that, when the NYT crossword clue is "something to stub", my first thought is 'function' and not 'toe'? 😅 #rstats.
0
0
0
@JLS_DataScience
James Laird-Smith
2 years
There's a lot of be said for removing cognitive overhead for developers. By using withr I'm saved the decision of where to put temporary directories or remembering to reset compiler flags. A huge thank you to the authors for this very sleek and amazingly useful package!.
0
0
0
@JLS_DataScience
James Laird-Smith
2 years
Here's an example where I create a function to install a package in a temporary directory, with temporary libpaths and with temporary compiler flags. And it's just so straightforward! I don't need to worry about global state because I know withr will take care of it for me.
Tweet media one
1
0
0
@JLS_DataScience
James Laird-Smith
2 years
I've been doing a bunch of #rstats package 📦 install testing this week. And the withr package (as usual!) just makes the experience so much easier and cleaner. 🤩👇
Tweet media one
1
0
0
@JLS_DataScience
James Laird-Smith
2 years
After a hard day of wrangling data from APIs, I'm very seriously considering naming my first child `tidyr::unnest_wider()`. I mean, just look how easy it makes converting highly nested JSON into a tidy data frame?! 🤩 Friday #rstats fun!
Tweet media one
0
0
3
@JLS_DataScience
James Laird-Smith
2 years
Have you ever wanted to generate random but readable strings? Like for files or folders? Today's Friday #rstats fun is thanks to @rgfitzjohn for the ids package📦 and its wonderful `adjective_animal()` 😻function.
Tweet media one
0
4
7
@JLS_DataScience
James Laird-Smith
2 years
Today's Friday #rstats fun: I discovered the (experimental) `tree()` function in the lobstr package for the pretty-printing of lists. So much cleaner than `str()`! 😍🗒️ Thanks @NicholasStrayer!
Tweet media one
1
7
34
@JLS_DataScience
James Laird-Smith
3 years
R: What if everything was a vector? #rstats.
@nixcraft
nixCraft 🐧
3 years
my old shit posting made it to reddit, it get posted multiple times every year lmao
Tweet media one
0
4
5
@JLS_DataScience
James Laird-Smith
3 years
Friends who use #rstats: if somebody was interested in making Quarto available from within one's organisation (there's a whole process), what would be an appropriate version to start out with? @fly_upside_down @dragonstyle @scheidegger @chrisderv.
0
1
1
@JLS_DataScience
James Laird-Smith
3 years
So if you are looking to set some code to trigger in your .Rprofile, but only if you are in the R world's favourite IDE, you can do so most reliably with `commandArgs()[[1L]] == "RStudio"`.
0
2
2
@JLS_DataScience
James Laird-Smith
3 years
`Sys.getenv("RSTUDIO")` doesn't work either, because it gets set even when you open R from the terminal pane in RStudio.
1
0
0
@JLS_DataScience
James Laird-Smith
3 years
Having certain packages installed will do it (eg. rstudioapi), but you are then dependent on that package being installed to make the logic work.
1
0
0
@JLS_DataScience
James Laird-Smith
3 years
For example, `"tools:rstudio" %in% search()` doesn't work, because (I guess) that environment hasn't been attached yet at the point one's .Rprofile is being processed.
1
0
0