## Here is a preview of the content of video 2:

- workspace definition - where does R go to get and store my things?
- storing and accessing data - how do I create my data and get it into R ? (read.table)
- objects / variables - what are they? how to look at them, how to remove them
- basic statistics - mean, summary, one-sample t-test
- simple plot and editing data

Review of and comments on the video:

There are many references for R - maybe because the documentation is not really user-friendly. So, lots of people have written books and webpages, etc. It can be daunting to wade through all of the information and lots of times there is not enough information to allow you to run the program yourself. Thus, this site; I hope to show you in the videos that it does work, and what is necessary to do it yourself.

Here are the commands we looked at in the video and some others:

**From the command line in R:**

To find out where R goes to get things and store them (your workspace or work directory) | getwd() |

To load your data file (for example: bdr.txt that includes column headings): | mydata read.table("bdr.txt",header=T) |

If you have a variable, myX, in your table, to pick out the myX column and make a variable out of it | myX mydata$myX |

Some basic statistics with myX:
mean
standard deviation
variance
median
max
min |
mean(myX)
sd(myX)
var(myX)
median(myX)
max(myX)
min(myX) |

One sample t-test: to test if the mean of myX is 100: | t.test(myX, mu=100) |

Box plot of myX: | boxplot(myX) |

Histogram of myX: | hist(myX) |

QQ plot against normal (comparing quantiles to see how "normal" the data are - the straighter the lineup of points the more normal the data are): | qqnorm(myX) |

| |

Of course, enhancements of all these are possible. You'll have to plunge into the documentation on the CRAN site, or elsewhere.

In case you have some experience and are looking for some quick references, here are some:

Cran reference card:https://cran.r-project.org/doc/contrib/Short-refcard.pdf

Jonathan Baron's help page: https://finzi.psych.upenn.edu/
Baron's reference card: https://www.psych.upenn.edu/~baron/refcard.pdf

Contact me at: dtudor@germinalknowledge.com