Project Management in R

Share code, ideas and questions

by writing in this document we can have a collaborative document throughout the course.

I have setup a "skeleton" based on the various sections of today to help us be organised.

Introduction

Let's get a little aquianted!
Write in this list your name, your field of study, and your favourite ice-cream flavour.

  • Athanasia Mowinckel - Research Software Engineering - Lemon sorbet
  • Bjørn Høyland - Professor - skogsbærsorbet
  • Sahar Hassani - Data Scientist - Coffee flavour
  • Johanna Wagnerberger - PhD student - not an ice cream fan, but black forest cherry
  • Agata Bochynska - Researcher and Research Librarian - chocolate
  • Maja S. Jacobsen - Research assistant - vanilla cookie dough
  • mingyi yang, researcher - apple
  • Mariana Cardoso Melo - visiting researcher from Sao Paulo- lemon or mango
  • Ragnhild Sundsbak - Librarian - Vanilla
  • Johan veterinarian PhD from Norw vet inst Ås, all flavours of ice cream for sure
  • Luis - Stipendiat psychology - Vanilla
  • Erik Kusch - Senior Engineer at NHM, R package dev at night - Any icecream with cherries in
  • Hossein, I like ice cream better than my Postdoc!
  • Julien Mayor - prof in developmental psychology - mojito ice cream
# Run in R
install.packages(c(
  "remotes",      # installing packages from GitHub
  "rmarkdown",    # rendering reports
  "fs",           # file system operations
  "here",         # navigating paths
  "usethis",      # for course materials
  "tidyverse"     # data-wrangling
))

Exercise

Explore your R installation

install.packages("usethis")
library(usethis)
# saves project on desktop by default for most users
use_course("rstats-wtf/wtf-explore-libraries")
# use_course("rstats-wtf/wtf-explore-libraries", destdir = "my/new/location")
# can alternatively download from 
# https://github.com/rstats-wtf/wtf-explore-libraries

Project Oriented Workflow

Exercise

library(usethis)
# saves project on desktop by default for most users
use_course("rstats-wtf/wtf-fix-paths")
# use_course("rstats-wtf/wtf-fix-paths", destdir = "my/new/location")
# can alternatively download from 
# https://github.com/rstats-wtf/wtf-fix-paths

Naming files

Add notes from this section here

Project Structure

Add notes from this section here

Exercise

Create a report that adheres to project organization strategies.

library(usethis)
# saves project on desktop by default for most users
use_course("rstats-wtf/wtf-packages-report")
# use_course("rstats-wtf/wtf-packages-report", destdir = "my/new/location")
# can alternatively download from 
# https://github.com/rstats-wtf/wtf-packages-report

Package Management

Add notes from this section here

Exercise

Explore the changes {renv} makes to a project.

library(usethis)
# saves project on desktop by default for most users
use_course("capro-uio/wtf-explore-renv")
# use_course("capro-uio/wtf-explore-renv", destdir = "my/new/location")
# can alternatively download from 
# https://github.com/capro-uio/wtf-explore-renv

End of course

Please also fill out this survey about the Digital Scholarship Days after the course.
This way we can evaluate the courses given and the feedback from participants for the next time we arrange it!

https://nettskjema.no/a/384654#/page/1

Targets for Bjørn

https://carpentries.org/blog/2023/07/teaching-targets-with-penguinds/

some issues

Error in if (cond) return(expr) : the condition has length > 1
In addition: Warning message:
In system2(R(), args, stdout = TRUE, stderr = TRUE) :
  running command ''/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/bin/R' CMD config CC 2>&1' had status 1
> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Oslo
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.3.2 tools_4.3.2    renv_1.0.3    
Select a repo