Petr Pajdla & Peter Tkáč
AES_707: Statistics seminar for archaeologists
14. 4. 2022
Today:
# install.packages("binford")
library(binford)
data(LRB)
data(LRBkey)
LRB?LRB describing? In other words, what are the observations and variables? LRBkey data set?famsz) and a size of a single family dwelling (sz1fam)?cor() function, use only complete observations (argument use = "complete.obs")sz1fam) vary in different continents (wldsec)?density) and the primary source of food (subsp.1)?Consider which type of plot (histogram, density, boxplot, scatterplot) will best help you answer the questions. For some questions, there are more possible options.
For the findings of a study to be reproducible means that results obtained (…) in a statistical analysis of a data set should be achieved again with a high degree of reliability when the study is replicated.
https://en.wikipedia.org/wiki/Reproducibility
(Marwick et al. 2017; Marwick et al. 2018;
The Plain Person’s Guide to Plain Text Social Science
http://plain-text.co/
Guides to better science: guide on reproducible code and data management.
# install.packages("rmarkdown")
# install.packages("knitr")
library(rmarkdown)
library(knitr)
R codeYAML header separated by --- and bearing info about author, date, type of output…
Code chunks separated by:
```{r chunk-name}
code here…
```
key shortcut: ctrl + alt + i
a <- 10+5
a
[1] 15
{r, <option>}echo = FALSE
include = FALSE
fig.cap = "..." adds caption to the graphics
see the rest of the options at https://rmarkdown.rstudio.com/lesson-3.html
kable(sipky[1:5,1:10], caption = "DartPoints dataset")
Table: DartPoints dataset
| Name | Catalog | TARL | Quad | Length | Width | Thickness | B.Width | J.Width | H.Length |
|---|---|---|---|---|---|---|---|---|---|
| Darl | 41-0322 | 41CV0536 | 26/59 | 42.8 | 15.8 | 5.8 | 11.3 | 10.6 | 11.6 |
| Darl | 35-2946 | 41CV0235 | 21/63 | 40.5 | 17.4 | 5.8 | NA | 13.7 | 12.9 |
| Darl | 35-2921 | 41CV0132 | 20/63 | 37.5 | 16.3 | 6.1 | 12.1 | 11.3 | 8.2 |
| Darl | 36-3487 | 41CV0594 | 10/54 | 40.3 | 16.1 | 6.3 | 13.5 | 11.7 | 8.3 |
| Darl | 36-3321 | 41CV1023 | 12/58 | 30.6 | 17.1 | 4.0 | 12.6 | 11.2 | 8.9 |