Last updated: 2020-07-04

Checks: 6 1

Knit directory: Hands-on-Training/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown is untracked by Git. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200702) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version bebd6f1. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/commandline.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


Command Line Basics - Terminal

In this tutorial, we will learn some basic Unix/Linux commands to perform tasks in the command line. The command line is an interface that allows you to store, manage, and process data.

Terminal is an app that gives you access to the command line. To start, open Terminal using the search button for your computer. Whenever you’re in Terminal, you are “standing” in a certain file on your computer.

  • pwd (present working directory)
    • Type and enter pwd
    • This will print the directory or folder you are currently in.
  • ls (list files)
    • Type and enter ls
    • This wil print all of the items in your current folder.
  • cd (change directory)
    • This command allows you to move from folder to folder.

    • Type and enter cd
    • This will bring you to your “home directory”
    • If you type ls, you will see Desktop, Downloads, and the rest of the folders in there.

    • Type and enter cd Desktop (capitals are important!)
    • This will bring you into your Desktop folder

    • Type and enter cd ..
    • This command takes you back one folder
    • In this case, it will take you back from your Desktop to your home directory

    • When moving to a folder, you must type out the full “path” to it
    • For example, let’s say you want to go to a folder (named “Folder”) in your Desktop.
    • Right now, you are in your “home directory.” If you type cd Folder, Terminal will give you an error, saying “there is no such file or directory.” This is because the command line only looks in your current folder, and there is no “Folder” in your home directory
    • Instead, you have to type cd Desktop/Folder. The command line looks for “Desktop” in your home directory, then for “Folder” in your Desktop.

  • mkdir (make directory)
    • This command lets you create a folder in your current folder.

    • Try making a folder named “Practice” in your Desktop:
    • First, get to your Desktop using the cd command
    • Then type and enter mkdir Practice
    • Use the ls command to see your newly made folder

  • mv (move/rename)
    • This command lets you move a file/folder to a different folder
    • You can also rename files/folders using this command

    • Type and enter *mv

  • [tab] (auto-completion)

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.4.6    rstudioapi_0.11 knitr_1.29      magrittr_1.5   
 [5] workflowr_1.6.2 R6_2.4.1        rlang_0.4.6     stringr_1.4.0  
 [9] tools_4.0.2     xfun_0.15       git2r_0.27.1    htmltools_0.5.0
[13] ellipsis_0.3.1  yaml_2.2.1      digest_0.6.25   rprojroot_1.3-2
[17] tibble_3.0.1    lifecycle_0.2.0 crayon_1.3.4    later_1.1.0.1  
[21] vctrs_0.3.1     promises_1.1.1  fs_1.4.2        glue_1.4.1     
[25] evaluate_0.14   rmarkdown_2.3   stringi_1.4.6   compiler_4.0.2 
[29] pillar_1.4.4    backports_1.1.8 httpuv_1.5.4    pkgconfig_2.0.3