Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions episodes/03-basics-factors-dataframes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,15 @@
of 29 variables (columns). Double-clicking on the name of the object will open
a view of the data in a new tab.

![RStudio data frame view](fig/rstudio_dataframeview.png)

Check warning on line 188 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: fig/rstudio_dataframeview.png

The majority of the columns in the data frame correspond to standard fields found in a
*Variant Call Format (VCF)* file, while others were added during our data processing. The VCF
format is a standard format for storing variant calls (also known as Single Nucleotide Polymorphisms or SNPs),
and you can read more about it, including a description of the fields we have here
in [the VCF specification](https://samtools.github.io/hts-specs/VCFv4.2.pdf)
or [on wikipedia](https://en.wikipedia.org/wiki/Variant_Call_Format).

We can also quickly query the dimensions of the variable using `dim()`. You'll see that the first number `801` shows the number of rows, then `29` the number of columns

```{r, purl=FALSE}
Expand Down Expand Up @@ -844,12 +851,12 @@
choose **From Excel...** (notice there are several other options you can
explore).

![RStudio import menu](fig/rstudio_import_menu.png)

Check warning on line 854 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: fig/rstudio_import_menu.png

Next, under **File/Url:** click the <KBD>Browse</KBD> button and navigate to the **Ecoli\_metadata.xlsx** file located at `/home/dcuser/dc_sample_data/R`.
You should now see a preview of the data to be imported:

![RStudio import screen](fig/rstudio_import_screen.png)

Check warning on line 859 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: fig/rstudio_import_screen.png

Notice that you have the option to change the data type of each variable by
clicking arrow (drop-down menu) next to each column title. Under **Import
Expand Down
Loading