diff --git a/day_1_exercise/D1.3e_reading_in_and_data_inspection/index.html b/day_1_exercise/D1.3e_reading_in_and_data_inspection/index.html index 9f42b22..69e1aa2 100644 --- a/day_1_exercise/D1.3e_reading_in_and_data_inspection/index.html +++ b/day_1_exercise/D1.3e_reading_in_and_data_inspection/index.html @@ -452,7 +452,10 @@

The basicsread.table function and specify the delimiter (sep = " ") as an argument in the function.

+

For example, if we have text file where the columns are separated by commas (comma-separated values or comma-delimited), you could use the function read.csv. However, if the data are separated by a different delimiter in a text file (e.g. ":", ";", " ", "\t"), you could use the generic read.table function and specify the delimiter (sep = " ") as an argument in the function.

+
+

Note: The "\t" delimiter is shorthand for tab.

+

In the above table we refer to base R functions as being contained in the "utils" package. In addition to base R functions, we have also listed functions from some other packages that can be used to import data, specifically the "readr" package that installs when you install the "tidyverse" suite of packages.

In addition to plain text files, you can also import data from other statistical analysis packages and Excel using functions from different packages.

@@ -692,7 +695,7 @@

List of functions for data inspec - 2024-08-09 + 2024-10-07 diff --git a/day_2_exercise/D2.4e_reordering-to-match-datasets/index.html b/day_2_exercise/D2.4e_reordering-to-match-datasets/index.html index 1a15d93..6af7516 100644 --- a/day_2_exercise/D2.4e_reordering-to-match-datasets/index.html +++ b/day_2_exercise/D2.4e_reordering-to-match-datasets/index.html @@ -370,10 +370,10 @@

Reordering data to matchIn the previous lesson, we learned how to determine whether the same data is present in two datasets, in addition to, whether it is in the same order. In this lesson, we will explore how to reorder the data such that the datasets are matching.

Manual reordering of data using indices

Indexing [ ] can be used to extract values from a dataset as we saw earlier, but we can also use it to rearrange our data values.

-

teaching_team <- c("Jihe", "Mary", "Meeta", "Radhika", "Will", "Emma")
+

teaching_team <- c("Jihe", "Mary", "Meeta", "Radhika", "Will", "Emma", "Heather", "Elizabeth", "Noor", "Upen")
 
-teaching_team +teaching_team

Remember that we can return values in a vector by specifying it's position or index:

# Extracting values from a vector
@@ -388,11 +388,11 @@ 

Manual reordering of data using

Similarly, we can extract all of the values and reorder them:

# Extracting all values and reordering them
-teaching_team[c(5, 4, 6, 2, 1, 3)]
+teaching_team[c(5, 4, 10, 6, 9, 2, 8, 1, 7, 3)]
 

If we want to save our results, we need to assign to a variable:

# Saving the results to a variable
-reorder_teach <- teaching_team[c(5, 4, 6, 2, 1, 3)] 
+reorder_teach <- teaching_team[c(5, 4, 10, 6, 9, 2, 8, 1, 7, 3)]
 

Exercise

@@ -529,7 +529,7 @@

Reordering genomic data us - 2024-08-09 + 2024-10-07 diff --git a/day_3_exercise/D3.2e_boxplot_exercise/index.html b/day_3_exercise/D3.2e_boxplot_exercise/index.html index 4bdda7c..882e371 100644 --- a/day_3_exercise/D3.2e_boxplot_exercise/index.html +++ b/day_3_exercise/D3.2e_boxplot_exercise/index.html @@ -443,7 +443,7 @@

3. Changing default colorsa separate lesson about using color palettes from the package RColorBrewer, if you are interested.

+

We have a separate lesson about using color palettes from the package RColorBrewer, if you are interested.

You are not restricted to using colors by writing them out as character vectors. You have the choice of a lot of colors in R, and you can do so by using their hexadecimal code. For example, "#FF0000" would be red and "#00FF00" would be green similarly, #FFFFFF would be white and #000000 would be black. click here for more information about color palettes in R.

OPTIONAL Exercise: