Skip to content

Commit

Permalink
Merge pull request #28 from 3mmaRand/feature/babs1-w6
Browse files Browse the repository at this point in the history
Feature/babs1 w6
  • Loading branch information
3mmaRand authored Oct 24, 2024
2 parents 2686dee + d46394e commit 2f3aff2
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 30 deletions.
95 changes: 76 additions & 19 deletions r4babs1/r4babs1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,103 @@ toc-location: right

# Introduction

This is the first of the four BABS modules. Over four weeks you will learn some core concepts about scientific computing, types of variable, the role of variables in analysis and how to use RStudio to organise analysis and import, summarise and plot data.
This is the first of the four BABS modules. Over four weeks you will learn
some core concepts about scientific computing, types of variable, the role
of variables in analysis and how to use RStudio to organise analysis and
import, summarise and plot data. You may want to read the
[overview of Data Analysis in R in your degree](../index.html).

## Module Learning Objectives

The BABS1 Module Learning outcomes that relate to the Data Analysis in R content are:
The BABS1 Module Learning outcomes that relate to the Data Analysis in R
content are:

- Methodically record scientific investigations with lab books, organise data and use R to import, summarise and plot simple data sets.
- Methodically record scientific investigations with lab books, organise
data and use R to import, summarise and plot simple data sets.

- Explain the key features of effective written media for dissemination of scientific information and be able to communicate experimental results through a scientific poster.
- Explain the key features of effective written media for dissemination
of scientific information and be able to communicate experimental results
through a scientific poster.

# How R4BABS 1 is organised

A key feature of R4BABS 1 is that you really do learn as you go along and you should not need to revise very much. To support this learning, every week is structured in the same way with contact time and well-guided independent study to prepare you for the contact time and consolidate what you have learned.
A key feature of R4BABS 1 is that you really do learn as you go along
and you should not need to revise very much. To support this learning,
every week is structured in the same way with contact time and well-guided
independent study to prepare you for the contact time and consolidate
what you have learned.

Each week has:

- An overview on the "About" page which gives the Learning Objectives, a topic summary and the instructions for the week. You should read this first.

- Some independent study on the "Prepare!" page to prepare you for the workshop. This will be reading from the course book ([Computational Analysis for Bioscientists](https://3mmarand.github.io/comp4biosci/)), watching a video, or doing some coding or set up. It is designed to take about 30-45 mins on average. You will most likely learn best if you can find people to study with.

- A two-hour workshop using R. This will usually start with me doing a short demonstration of one or more of the examples that were in "Prepare!" but you will spend most of the session going through some exercises. Anything you have not done before is explained and guided but you will also have to use the skills gained in previous workshops. I often remind you to take care of future you by making notes so you can look up your previous work but you can also search the [R4BABS](https://3mmarand.github.io/R4BABS/) site (search is top right). Talking to other people in the workshop about the exercises and working together will really help you understand more. There will be plenty of help from me and my demonstrators.

- Some independent study on the "Consolidate!" page to give you more practice. The exercises are usually similar to those in the workshop but with less guidance. Occasionally, there will be reading to do. It is designed to take about 30-45 mins on average but may be quicker if you understood the workshop very well or slower if you need to revisit the workshop.

Learning Data Analysis in R is like learning to speak a new language or play an instrument or a technical sport - you can't really rush it or cram for it. You need regular practice.
- An overview on the "About" page which gives the Learning Objectives,
a topic summary and the instructions for the week. You should read
this first.

- Some independent study on the "Prepare!" page to prepare
you for the workshop. This will be reading from the course book
([Computational Analysis for Bioscientists](https://3mmarand.github.io/comp4biosci/)),
watching a video, or doing some coding or set up. It is designed to
take about 30-45 mins on average. You will most likely learn best
if you can find people to study with.

- A two-hour workshop using R. This will usually start with me doing a
short demonstration of one or more of the examples that were in "Prepare!"
but you will spend most of the session going through some exercises.
Anything you have not done before is explained and guided but you will
also have to use the skills gained in previous workshops. I often remind
you to take care of future you by making notes so you can look up your
previous work but you can also search
the [R4BABS](https://3mmarand.github.io/R4BABS/) site (search is top
right). Talking to other people in the workshop about the exercises
and working together will really help you understand more. There will
be plenty of help from me and my demonstrators.

- Some independent study on the "Consolidate!" page to give you more
practice. The exercises are usually similar to those in the workshop
but with less guidance. Occasionally, there will be reading to do.
It is designed to take about 30-45 mins on average but may be quicker
if you understood the workshop very well or slower if you need to
revisit the workshop.

Learning Data Analysis in R is like learning to speak a new language
or play an instrument or a technical sport - you can't really rush it
or cram for it. You need regular practice.

- a little bit of engagement and practice is always better than none

- if you get behind, just pick up where you left off rather than jumping in. It is fine to work on a previous week's workshop
- if you get behind, just pick up where you left off rather than
jumping in. It is fine to work on a previous week's workshop

# Content

## Understanding file systems
You will learn about operating systems, files and file systems, working directories, absolute and relative paths, what R and RStudio are

You will learn about operating systems, files and file systems,
working directories, absolute and relative paths, what R and
RStudio are

## Introduction to R and project organisation
You will start writing R code in RStudio and will create your first graph! You will learn about data types such as “numerics” and “characters” and some of the different types of objects in R such as “vectors” and “dataframes”. These are the building blocks for the rest of your R journey. You will also learn a workflow and about the layout of RStudio and using RStudio Projects.

You will start writing R code in RStudio and will create your first graph!
You will learn about data types such as “numerics” and “characters”
and some of the different types of objects in R such as “vectors”
and “dataframes”. These are the building blocks for the rest of your
R journey. You will also learn a workflow and about the layout of
RStudio and using RStudio Projects.

## Types of variable, summarising and plotting data
The type of values our data can take is important in how we analyse and visualise it. This week you will learn the difference between continuous and discrete values and how we summarise and visualise them. The focus will be on plotting and summarising single variables. You will also learn how to read in data in to RStudio from plain text files and Excel files.

The type of values our data can take is important in how we
analyse and visualise it. This week you will learn the difference
between continuous and discrete values and how we summarise
and visualise them. The focus will be on plotting and summarising
single variables. You will also learn how to read in data in to
RStudio from plain text files and Excel files.

## Summarising data with several variables
This week you will start plotting data sets with more than one variable. This means you need to be able determine which variable is the response and which is the explanatory. You will find out what is meant by “tidy” data and how to perform a simple data tidying task. Finally you will discover how to save your figures and place them in documents.

This week you will start plotting data sets with more than one variable.
This means you need to be able determine which variable is the response
and which is the explanatory. You will find out what is meant by “tidy”
data and how to perform a simple data tidying task. Finally you will
discover how to save your figures and place them in documents.
18 changes: 14 additions & 4 deletions r4babs1/week-6/overview.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,47 @@ toc: true
toc-location: right
---

This week you will carry out some independent study to ensure you have some understanding of computer file systems. We will introduce you to the concepts of paths and working directories.
This week you will carry out some independent study to ensure you
have some understanding of computer file systems. We will introduce y
ou to the concepts of paths and working directories.

![Artwork by @allison_horst: "code gets the blame"](images/code_gets_the_blame.jpg){fig-alt="A charactered has slipped on a banana skin and is blaming the code character but the real culprits, holding bananas, are mismanaged files, navigating your computing and typos"}

### Learning objectives

The parentheses after each learning objective indicate where the content covers that objective.
The parentheses after each learning objective indicate where the content
covers that objective.

The successful student will be able to:

- explain what an operating system is
- explain the organisation of files and directories in a file systems
- explain what a file is and give some common files types
- explain what is meant by a plain text file
- explain the relationship between the file extensions, the file format and associations with programs
- explain the relationship between the file extensions, the file
format and associations with programs
- use a file manager
- explain root, home and working directories
- explain absolute and relative file paths
- know what R and RStudio are
- know how to organise their work
- use the Virtual Desktop Service


### Instructions

1. [Prepare](study_before_workshop.qmd)

i. Join the video conference Intro: Data Handling - BIO00027C-A (Lecture) on your timetable
i. If you have not done so already, read "An overview of Data Analysis
in R for BABS" in your degree and "An overview of Data Analysis in
R for BABS 1"

ii. Read What they forgot to teach you about computers

iii. Read What are R and Rstudio?

iv. Join the video conference Intro: Data Handling - BIO00027C-A (Lecture)
on your timetable

2. [Workshop](workshop.qmd)

Expand Down
3 changes: 2 additions & 1 deletion r4babs1/week-6/study_after_workshop.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ toc-location: right
---


There is no additional study this week but you may want to look ahead to next week.
There is no additional study this week but you may want to look
ahead to next week.
15 changes: 12 additions & 3 deletions r4babs1/week-6/study_before_workshop.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ toc: true
toc-location: right
---

1. Join the video conference Intro: Data Handling - BIO00027C-A (Lecture) on your timetable
1. 📖 If you have not done so already, read
[An overview of Data Analysis in R for BABS in your degree](../../index.qmd)
and [An overview of Data Analysis in R for BABS 1](../r4babs1.qmd). Both are also
linked on the VLE.

2. Read [What they forgot to teach you about computers](https://3mmarand.github.io/comp4biosci/what_they_forgot.html) in [Computational Analysis for Bioscientists](https://3mmarand.github.io/comp4biosci/)
2. 📖 Read [What they forgot to teach you about computers](https://3mmarand.github.io/comp4biosci/what_they_forgot.html) in [Computational Analysis for Bioscientists](https://3mmarand.github.io/comp4biosci/)

3. Read [What are R and Rstudio?](https://3mmarand.github.io/comp4biosci/first_steps_rstudio.html#what-are-r-and-rstudio). You only need to read *this* section, you do not need to the read the rest of the chapter (yet!)
3. 📖 Read [What are R and Rstudio?](https://3mmarand.github.io/comp4biosci/first_steps_rstudio.html#what-are-r-and-rstudio).
You only need to read *this* section, you do not need to the read the
rest of the chapter (yet!)

4. 🖥️ Join the video conference Intro: Data Handling - BIO00027C-A (Lecture)
on your timetable. The main purpose of this session is to highlight how
Data Analysis in R for BABS 1 is organised and give you an opportunity to
ask questions.
43 changes: 40 additions & 3 deletions r4babs1/week-6/workshop.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,45 @@ toc: true
toc-location: right
---

There is no formal workshop this week but you might want to install R and RStudio on your own machine. This is optional because University computers already have R and RStudio installed.
There is no formal workshop this week but I recommend setting yourself up to
work from home

[Install R and RStudio](https://3mmarand.github.io/comp4biosci/first_steps_rstudio.html#installing-r-and-rstudio).
1. 💻 Set up the Virtual Desktop. I recommend working on
the University computers for this work. Installing R and RStudio
is almost always straightforward but many people are still developing
their computing skills. If you sometimes have difficulty updating
and or installing software on your own machine, wouldn't know what
what versions of R and RStudio you are using or don't realise there
is a difference between R and RStudio you will likely avoid trouble
by using the university machines. The uni machines always have
up-to-date R and R packages and all the packages that appear in
teaching materials. You can still work from home by using the
[Virtual Desktop Service](https://www.york.ac.uk/it-services/tools/vds/).
The VDS allows you to log on to a university computer from your
own computer. It means you can access all software and filestores.
When using the VDS for R and RStudio, it usually makes sense to use
other software - such as a browser or file explorer - also through the VDS.

However, If you are confident in your ability to set up your own machine, you
need:

- to know there is a
[difference between R and RStudio](https://3mmarand.github.io/comp4biosci/first_steps_rstudio.html#what-are-r-and-rstudio)
- [Install R and Rstudio](https://3mmarand.github.io/comp4biosci/first_steps_rstudio.html#installing-r-and-rstudio)
- to using R 4.4 and RStudio 2024.09.0 Build 375 ("Cranberry Hibiscus")
- be certain you are actually using R 4.4 - it is written in the top edge
of the console window. By default RStudio uses the latest version on
R on your machine.

It is possible to access all your files on your university account without
using the VDS. For example, if you want to work on uni machines at uni
and your machine at home. You can best do this by mapping a drive:
https://support.york.ac.uk/s/topic/0TO4K000000lA5ZWAU/filestores.
If you store everything on google drive you can also read/write to that
like any other drive using google drive app.


Even if you plan to use your own machine I really recommend you take
the time to set the VDS up now while you're not time pressured so you
always have that option ready.

Note you need a computer - not a tablet.

0 comments on commit 2f3aff2

Please sign in to comment.