From 85a75a09739d1f9c79e00b9235e2aea10a727cdb Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 27 Aug 2024 00:22:49 +0000 Subject: [PATCH] site deploy Auto-generated via {sandpaper} Source : 7ef203cb3e1086f7410c57c23de3a6cb7131ea7f Branch : md-outputs Author : GitHub Actions Time : 2024-07-09 00:20:57 +0000 Message : markdown source builds Auto-generated via {sandpaper} Source : b22497cb97fa18a9f56b9b5c57dcd41879efc3e2 Branch : main Author : Naupaka Zimmerman Time : 2024-05-14 19:58:23 +0000 Message : Merge pull request #275 from datacarpentry/update/packages Update 13 packages --- 00-introduction.html | 81 ++--- 01-r-basics.html | 100 +++---- 02-data-prelude.html | 28 +- 03-basics-factors-dataframes.html | 89 +++--- 04-bioconductor-vcfr.html | 45 ++- 05-dplyr.html | 39 +-- 06-data-visualization.html | 64 ++-- 07-r-help.html | 28 +- 404.html | 15 +- CODE_OF_CONDUCT.html | 10 +- LICENSE.html | 19 +- aio.html | 292 ++++++------------- assets/styles.css | 2 +- assets/styles.css.map | 2 +- discuss.html | 10 +- images.html | 12 +- index.html | 24 +- instructor-notes.html | 12 +- instructor/00-introduction.html | 81 ++--- instructor/01-r-basics.html | 100 +++---- instructor/02-data-prelude.html | 28 +- instructor/03-basics-factors-dataframes.html | 89 +++--- instructor/04-bioconductor-vcfr.html | 45 ++- instructor/05-dplyr.html | 39 +-- instructor/06-data-visualization.html | 64 ++-- instructor/07-r-help.html | 28 +- instructor/404.html | 15 +- instructor/CODE_OF_CONDUCT.html | 10 +- instructor/LICENSE.html | 19 +- instructor/aio.html | 292 ++++++------------- instructor/discuss.html | 10 +- instructor/images.html | 12 +- instructor/index.html | 24 +- instructor/instructor-notes.html | 12 +- instructor/key-points.html | 12 +- instructor/profiles.html | 12 +- instructor/reference.html | 13 +- key-points.html | 12 +- pkgdown.yml | 2 +- profiles.html | 12 +- reference.html | 13 +- 41 files changed, 655 insertions(+), 1161 deletions(-) diff --git a/00-introduction.html b/00-introduction.html index 5a068a08..b8b03dd0 100644 --- a/00-introduction.html +++ b/00-introduction.html @@ -301,10 +301,10 @@

-
+

-

@@ -324,7 +324,7 @@

-
See all in one page +
See all in one page
@@ -401,8 +401,7 @@

Objectives

-

Getting ready to use R for the first time -

+

Getting ready to use R for the first time


In this lesson we will take you through the very first things you need to get R working.

@@ -410,8 +409,7 @@

Objectives

-

Tip: This lesson works best on the cloud -

+

Tip: This lesson works best on the cloud

Remember, these lessons assume we are using the pre-configured virtual machine instances provided to you at a genomics workshop. Much @@ -423,16 +421,14 @@

Tip: This lesson works best on the cloudA Brief History of R -

+

A Brief History of R


The programming language R has been around since 1995, and was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand. R is based off the S programming language developed at Bell Labs and was developed to teach intro statistics. See this slide deck by Ross Ihaka for more info on the subject.

-

Advantages of using R -

+

Advantages of using R


At more than 20 years old, R is fairly mature and growing in popularity. However, programming isn’t a popularity contest. Here are key advantages of analyzing data in R:

@@ -462,8 +458,7 @@

Tip: This lesson works best on the cloud
-

Discussion: Your experience -

+

Discussion: Your experience

What has motivated you to learn R? Have you had a research question for which spreadsheet programs such as Excel have proven difficult to @@ -471,8 +466,7 @@

Discussion: Your experience

-

Introducing RStudio Server -

+

Introducing RStudio Server


In these lessons, we will be making use of a software called RStudio, an Integrated Development Environment (IDE). RStudio, like most IDEs, provides a graphical interface to R, making it more user-friendly, and providing @@ -482,8 +476,7 @@

Discussion: Your experience, a version of RStudio that can be accessed in your web browser. RStudio Server has the same features of the Desktop version of RStudio you could download as standalone software.

-

Log on to RStudio Server -

+

Log on to RStudio Server


Open a web browser and enter the URL you used to log in at the terminal (provided by your instructors), followed by :8787. For example, if your URL was ec2.12.2.45.678.compute-1.amazonaws.com, @@ -494,8 +487,7 @@

Discussion: Your experience
-

Tip: Make sure there are no spaces before or after your URL. -

+

Tip: Make sure there are no spaces before or after your URL.

If your URL has spaces, your web browser may interpret it as a search query.

@@ -508,8 +500,7 @@

Tip: Make sure there are no spaces before or after you credentials for the genomics Data Carpentry instances will be provided by your instructors.

You should now see the RStudio interface:

-
rstudio default session

Create an RStudio project -

+
rstudio default session

Create an RStudio project


One of the first benefits we will take advantage of in RStudio is something called an RStudio Project. An RStudio project allows you to more easily:

@@ -549,8 +540,7 @@

Tip: Make sure there are no spaces before or after you
-

Tip: Make your project more reproducible with renv -

+

Tip: Make your project more reproducible with renv

One of the most wonderful and also frustrating aspects of working with R is managing packages. We will talk more about them, but packages @@ -568,8 +558,7 @@

Tip: Make your project more reproducible with renv

-

Creating your first R script -

+

Creating your first R script


Now that we are ready to start exploring R, we will want to keep a record of the commands we are using. To do this we can create an R script:

@@ -587,16 +576,14 @@

Tip: Make your project more reproducible with renv
-

Tip: Save your script now -

+

Tip: Save your script now

Remember to save your script at this point. Anything can happen during your lesson and you don’t want to lose your work!

-

Overview and customization of the RStudio layout -

+

Overview and customization of the RStudio layout


Here are the major windows (or panes) of the RStudio environment:

rstudio default session
  • Source: This pane is where you will write/view R @@ -633,8 +620,7 @@

    Tip: Save your script now
    -

    Tip: Uploads and downloads in the cloud -

    +

    Tip: Uploads and downloads in the cloud

    In the “Files” tab you can select a file and download it from your cloud instance (click the “more” button) to your local computer. Uploads @@ -653,8 +639,7 @@

    Tip: Uploads and downloads in the cloud

    -

    You are working with R -

    +

    You are working with R

    Although we won’t be working with R at the terminal, there are lots of reasons to. For example, once you have written an RScript, you can @@ -665,8 +650,7 @@

    You are working with RGetting to work with R: navigating directories -

    +

Getting to work with R: navigating directories


Now that we have covered the more aesthetic aspects of RStudio, we can get to work using some commands. We will write, execute, and save the commands we learn in our genomics_r_basics.R script @@ -708,8 +692,7 @@

R
-

Exercise: Work interactively in R -

+

Exercise: Work interactively in R

What happens when you try to enter the getwd() command in the Console pane?

@@ -768,7 +751,7 @@

R

-

Tip: Never use setwd() +

Tip: Never use setwd()

Wait, what was the last 2 minutes about? Well, setting your working @@ -785,8 +768,7 @@

Tip: Never use setwd()

-

Using functions in R, without needing to master them -

+

Using functions in R, without needing to master them


A function in R (or any computing language) is a short program that takes some input and returns some output. Functions may seem like an advanced topic (and they are), but you have already used at least one @@ -797,8 +779,7 @@

Tip: Never use setwd()
-

Exercise: What do these functions do? -

+

Exercise: What do these functions do?

Try the following functions by writing them in your script. See if you can guess what they do, and make sure to add comments to your script @@ -853,8 +834,7 @@

OUTPUT