Today is the last session of #CodingClub for 2022! We'll be learning how to share your #rstats package in a github repository and host your pkgdown website via github pages.
Book Chapter: https://psyteachr.github.io/intro-r-pkgs/09-sharing.html
Demopkg: https://github.com/psyteachr/demopkg
When: 2022-12-07, 16:00 UTC
Zoom: https://uofglasgow.zoom.us/j/85042042718
Password: codingclub
Just under the wire! I had 3 more hours of meetings today than I expected, so have just posted the newest chapter of #CodingClub: Creating an R Package. We'll be covering package maintenance today, and I'll demonstrate how to produce, and more importantly, recover from, errors in CMD check.
https://psyteachr.github.io/intro-r-pkgs/08-maintenance.html
I just finished updating the pkgdown chapter for today's #CodingClub. I added sections on how to add a custom logo and badges to the home page, which use two cool #rstats packages by Guangchuang Yu: {hexSticker} and {badger}.
Creating an R Package by @debruine
Making an R package develops generic coding skills and gives you valuable insight to how R works. Covers setting up a package project, creating functions, documenting them with roxygen, creating vignettes, unit testing, package testing, version control with git, and distribution with github.
Each chapter has a recording of the associated #CodingClub session.
In #CodingClub today we added a vignette to our package and tested how to access the vignettes list with vignette(package="demopkg"). This works fine for a package loaded with devtools::load_all("."), but if you install the package, the vignettes are missing.
As I typed this request for help, I remembered how to fix it! (Why is there no rubberduck emoji?) Building the vignettes defaults to FALSE, so we need to run this instead to install:
devtools::install(build_vignettes = TRUE)
Excited to be learning about package vignettes in #Rstats during #codingclub with @debruine .
The journey towards package development continues!
I've just speed-written the chapter on building package vignettes for tomorrow's #PsyTeachR #CodingClub. As always, all are welcome (sign up on the EventBrite on the overview page to get the Zoom link) and it starts at 16:05 GMT+0. There are recordings for the previous week at the top of each chapter. The overview also has a link to the demopkg so far, which you can download to quickly catch up.
#rstats dev mystery:
On both my laptops, ifelse(NaN < 0, 0, 1) returns NA, and on my desktop it returns an error. I thought It was because I'd set strict checking in my .Renviron on the desktop (see below), but that doesn't seem to change things.
_R_CHECK_LENGTH_1_LOGIC2_=true
_R_CHECK_LENGTH_1_CONDITION_=true
Any ideas? It derailed #CodingClub yesterday because I expected a custom function to return NA when a t.test can't run, but it instead errored.
Today's #PsyTeachR #CodingClub will be covering unit tests! This is a systematic way to make sure your code is doing what you expect.
While this is the 5th session in a series building an #rstats package, you don't have to have been to the previous sessions to participate. Just get the code from last week's session at https://github.com/psyteachr/demopkg (download, don't install) and you'll be all set.
When: 16:05-17:00 UK time
Where: Zoom ID: 85042042718 (pw: codingclub)
Materials: https://psyteachr.github.io/intro-r-pkgs/05-unit-tests.html
#PsyTeachR #codingclub #rstats
Iβm a #psych professor at the University of Glasgow and part of the #TwitterMigration. I mostly post about #rstats, #OpenResearch, #MetaScience, #BigTeamScience, #ManyFaces, and #unions academically, and #crafts π§Ά, #weightlifting ποΈ, and #lgbtq π³οΈβπpersonally.
I run the #CodingClub (a joint venture of #PsyTeachR and #MethodsMetaSci), which is learning to make an R package: https://psyteachr.github.io/intro-r-pkgs/
Iβm working on a beginnersβ guide to #CodeReview with https://github.com/code-check-club
#introduction #psych #twittermigration #rstats #openresearch #MetaScience #bigteamscience #ManyFaces #unions #crafts #weightlifting #lgbtq #codingclub #PsyTeachR #MethodsMetaSci #codereview
#coding #codingclub #club #programming #programmingclub
Is anyone interested in, or has anyone been a part of a programming or coding club?
#coding #codingclub #club #programming #programmingclub