When you don’t see any >
at the bottom of your console, hitting escape might help. If it doesn’t, clicking the stop sign in the top right corner of the console might help.
You will be able to solve any other problem when you google it.
Shortcut | Result |
---|---|
Alt + - |
<- |
Ctrl + Enter |
Run selected code from Script |
Enter |
Run line of code in Console |
install.packages()
- only needs to happen oncelibrary()
- needs to happen every sessiondata()
- loading data from packageread.csv()
- loading data form .csv file. If your data is not displayed as separate columns, explore the use of the sep
and dec
arguments.class()
str()
length()
dim()
summary()
head()
tail()
names()
or colnames()
ncol()
and nrow()
levels()
is.na()
anyNA()
is.nan()
is.infinite()
c()
vector()
matrix()
list()
data.frame()
cbind()
and rbind()
When a
is a data.frame
a$plot
- selects the column from a
which is called “plot”a[,"plot"]
- selects the column from a
which is called “plot”a[1,2]
- selects the value at the first row, second columna[,2]
- selects the second column as a numeric vectora[1,]
- selects the first row as a numeric vectora[2]
- selects the second column as a data frameplot()
points()
lines()
pairs()
hist()
boxplots()
par()
apply()
specnumber()
diversity()
tsallis()
specpool()
specaccum()
betadiver()
beta.pair()
beta.multi()