• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/46

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

46 Cards in this Set

  • Front
  • Back
Matrix (N * T) into Vector.
(i-1)*T + t
Type of an object?
class(obj)
Eliminate the effect of class.
unclass(obj)
Levels of a factor?
levels(factor)
What is a data.frame?
A list made into a matrix.
Formating in C.
formatC(foo, digits=3)
Formating in C to obtain integers.
formatC(foo, format="d")
Intersection between two vectors.
intersect(vec1,vec2)
Belong to a set.
belong(element,set)
FALSE or TRUE
Demonstration of plotting maths.
demo(plotmath)
Including mathematical formulaes.
expression()
Combingin maths and variables.
bquote()
Horizontal axis labels.
par(las=1)
Margin intervals.
par(mai=c(1,1,1,1))
Direction of par(mai=c(1,1,1,1))
bottom, left, top, right.
Order and apply an order.
o <- order[vec]
order.vec <- vec[o]
Differences between two sets.
setdiff(v1,v2)
Select type of output in SCAN.
scan(foo.txt, what="character)
Add a grid to a graph.
grid(Number_Cells_X, Number_Cells_Y, lwd=2)
P-value from ANOVA object.
anova$p
F-value from ANOVA object.
anova$F
1:3 - 2
c(-1,0,1)
1:3*2
c(2,4,6)
Close R.
q()
Fit a linear model with DESIGN matrix.
lm.fit(X[n*p], y[n])
Fixed and Random Coefficients in LME.
model$coefficients
Factor to numeric
as.numeric(as.vector(factor))
Is a missing value?
is.na(value)
Max removing missing values.
max(vec, na.rm=TRUE)
Random/Fixed effects from a model.
mod$coefficients
Bash within R.
system("mkdir foo")
Set working directory.
setwd()
Suppress a letter in a string.
strsplit( "foo\", "\")
Write entries in one single column.
write(foo, foo.txt, ncolumns=1)
Matrix Product.
A %*% B
xAx
x %*% A %*% x
Matrix Inverse
solve(A)
xA^{-1}x
x %*% solve(A,x)
Permission problem when installing new package.
chown 777 -R R
Difference between order() and rank().
x[order(x)] is equivalent to sort(x).
rank(x) is just the ranks.
gedelete
gedelete
Difference between && and &
&& apply to vectors of length 1.
& apply elementwise to vectors.
Difference between || and |
|| apply to vectors of length 1.
| apply elementwise to vectors.
Syntax for while.
while (condition) expr
Maximum likelihood estimation.
mle(-loglik)
Plot Time series.
plot(as.ts(mat))