Closed jstaf closed 9 years ago
This sounds like a great idea, I would be very interested in this!
Don't be afraid to split it into a couple of sessions if need be - it sounds awesome, I am totes in if I am in town!
That's an awesome idea Jeff! I don't think it would be possible to cover everything within a single session though; 2-3 sessions sounds more reasonable. I could help you out with the S4 system if needed but probably not before June. People interested in writing their own packages might also be interested into formal automated testing. Hadley Wickham has written the very neat package testthat for that specific purpose.
I would be very interested in this too.
Great idea Jeff! In addition to running it over a couple of instructional sessions, we can also schedule some "work alongs” too if it helps.
On Apr 27, 2015, at 1:53 PM, Bill Mills notifications@github.com wrote:
Don't be afraid to split it into a couple of sessions if need be - it sounds awesome, I am totes in if I am in town!
— Reply to this email directly or view it on GitHub.
Hah, yeah help with teaching the S4 system could be good. It looks like we're mostly scheduled until June anyways, so waiting until then should work I think.
Okay I was thinking about doing this on Thursday July 2nd @ 3pm (leaving for a conference soon... that's probably the soonest I'll have time). I also wanted to avoid Canada Day, because I'm betting a lot of people may take the day off.
Here's what I think I will cover:
devtools
library and RStudio's built in tools:
::
operator@
operatorAlthough this seems like a lot of stuff, it's actually quite quick to demo and explain. This tutorial should make it much easier to understand the source code for other people's packages you may be using (unless they include C/C++/Java components... need to learn those languages to understand those bits).
hooray! Sounds awesome, looking forward to it!
Okay, so the lesson is at 3pm tomorrow in Biodiv 224. We are all going to try writing a basic package together! After this lesson you will be able to share/reuse/document your code more easily, and understand how R works a little bit more.
Make sure you have the devtools
, roxygen2
, knitr
, and testthat
package (obtainable via install.packages(c("devtools","roxygen2", "testthat", "knitr"))
).
Additionally, Mac and Windows users need to follow the instructions listed here in order to be able to build packages from source.
@BillMills any plans to shift these sessions a bit later during the day ? this is interesting but its hard to commute during working hours :(
@kazi11 any testing suite in R like in python (I don't know any) if yes it could be great to integrate these before wrapping a package no ?
I'll add testing in using the testthat
package. I've updated my above comment to reflect some packages I forgot.
Here is the link to a demo package that we will re-create tomorrow.
Hi @radaniba: @BillMills and I have been talking about starting another round of #R lessons and building up the #R Utility Belt (see Issues #29). This session will hopefully start after the software carpentry workshop for the LSI folks. What would be a good time for you? The other option is to start something for BCCA. Do you want to shoot me an email at amy.lee@ubc.ca and we can chat more about this?
Link to Hadley Wickham's R package book: http://r-pkgs.had.co.nz/
:+1: This is also useful if Continuous Integration will be discussed http://docs.travis-ci.com/user/languages/r/
@minisciencegirl teams at BCCA are independant of each others, we need an approach that brings people together and I see VanBug as the best way to start things here. I can help by spreading the word, gathering people through internal messaging, but there is a protocol I guess for organizing events here, we can work on this together if you want
We did not end up making it to the S4 system given time constraints, but perhaps we can cover that later (it mostly comes in useful when you need a new data type for a special function or something). Anyhow, thanks all for coming, and remember to check out the demo package here if you didn't understand something or would like to cover this at your own pace.
Also, we determined at the tutorial that the RStudio Release Preview is definitely the way to go for doing stuff in R. The code checking/extra hotkeys/roxygen2 support, make life much, much easier for pretty much any project.
Anyhow, thanks for coming out and I'll close this thread.
I figured it might be helpful to go over R's control statements/functions, how to create/build/distribute a package, and creating/using custom object types with R's S4 system (better type safety than S3, harder to misuse...).
Some of this is rather advanced stuff, but I've found that writing packages is often a better approach to some projects than writing scripts. Not sure if we can get through this all in one tutorial, but we'll see I guess...