[1] 42
Today’s goals…
<-
is an assignment operator
(use Alt + - in RStudio to write it).
c()
(combine, concatenate)$
operator returns a single column.'data.frame': 4 obs. of 4 variables:
$ x: int 95 96 97 98
$ y: chr "a" "b" "c" "d"
$ z: logi TRUE FALSE FALSE TRUE
$ w: num 4.2 4.4 4.6 4.8
is.
prefix:is.numeric()
, is.double()
etc.TRUE
and FALSE
in R
.NA
, ie. not available.Inf
and -Inf
for infinities.NULL
for an object of a zero length.Plain-text document.
Practical exchange and preservation format for data sets.
Most open and commercial softwares will allow export in CSV.
Americas: separated by commas (,
), period (.
) as a decimal mark.
Europe: separated by semicolon (;
), comma (,
) as a decimal mark.
Comma separated:
read.csv(file = "path")
Semicolon separated:
read.csv2(file = "path")
Other delimiter:
read.table(file = "path", sep = "separator")
Adapted from Carlson 2011
Measurements on five types of dart points from Fort Hood in central Texas (Darl, Ensor, Pedernales, Travis, and Wells). The points were recovered during 10 different pedestrian survey projects during the 1980’s and were classified and measured by H. Blaine Ensor…
darts
object?archdata::DartPoints
read.csv()
, ncol()
and nrow()
, str()
, colnames()
AES_707 Statistics seminar for archaeologists | Coding in R