Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Statistical Software: R Koujue

This guide contains resources to assist faculty, researchers, staff, and students in learning statistical software, such as R, Python, SAS, Stata, SPSS

Quick Tips

R commands are case-sensitive.

# comment follows.

<- or = is assignment operator.

c is used to concatenate.

demo() is used to see what R can do.

ls() lists existng objects in R.

help() displays the help manual for a command.

read.table() reads text files.

read.csv() reads comma-separated files.

read.dta() reads Stata (.dta) data files.

read.fwf() reads fixed format text files.

str() gets structure of a dataset.

save() data in an R data file.

load() reads data in an R data file.

library() loads an installed package.

rm() removes objects.

class() lists the type of an object.

mean() calculates the mean.

median() calculates the median.

sd() calculates the standard deviation.

cor() calculates correlations.

summary() is a generic function which provides a summary results of an object.

by() is used to apply a function to a data frame split by factors.

tapply() is used to apply a function to each cell of an array.

hist() is used to draw a histogram plot.

boxplot() is used to draw a box plot.

table() is used to generate a frequency table.

rbind() combines rows of data.

cbine() combines columns of data.

merge() is used to match-merge two data frames.

t.test() can conduct one sample, two sample and paired t-tests.

lm() fits a lienar model (regression).

anova() extracts the anova table from a lm object.

glm() is used for generalized lienar models.

wilcox.test() is a non-parametric analog to the indepndent two-sample t-test.

kruskal.test() is a non-parametric analog to the one-way anova.

WEB RESOURCES

THE BOOKS OF TREASURES

R TUTORIALS - INTRODUCTION TO R

Introduction to plotting in R

Summary Statistics In R

R Workshops/Webinars

R Sessions

STATS HOME

Profile Photo
Jianjun Hua
Contact:
Dartmouth College

Hanover NH 03755


QUESTIONNAIRE

This guide has a user friendly interface.

QUESTIONNAIRE
Strongly agree: 12 votes (70.59%)
Agree: 4 votes (23.53%)
Neutral: 0 votes (0%)
Disagree: 0 votes (0%)
Strongly disagree: 1 votes (5.88%)
Total Votes: 17

Post-Workshop Survey