A Short List of Some Useful R Commands: Input and Display
A Short List of Some Useful R Commands: Input and Display
Moving Around
Data Manipulation
Statistical Tests
binom.test()
prop.test() #perform test with proportion(s)
t.test() #perform t test
chisq.test() #perform Chi-square test
pairwise.t.test()
power.anova.test()
power.t.test()
aov()
anova()
TukeyHSD()
kruskal.test()
Distributions
sample(x, size, replace = FALSE, prob = NULL) # take a simple random sample of size n from the
# population x with or without replacement
rbinom(n,size,p)
pbinom()
qbinom()
dbinom()
rnorm(n,mean,sd) #randomly generate n numbers from a Normal distribution with the specific mean and sd
pnorm() #find probability (area under curve) of a Normal(10,3^2) distribution to the left
#of 8,i.e. P(X <= 8), by pnorm(8,mean=10,sd=3)
qnorm() #find quantity or value x such that area under Normal(10,3^2) curve and to the left
#of x equals 0.25 by qnorm(0.25,mean=10,sd=3)
rt()
pt()
qt()
runif(n,lower,upper)
punif()
qunif()