An R package for simple exploratory analyses and visualization of geoarchaeological data for the UW ARCHY 482 & 486 Geoarchaeology class of Autumn 2013. The objective is to promote reproducible research in geoarchaeology by making the analyses explicit and by supporting reporting of the results in a R Markdown file that includes text, figures, and the code that generated the results.
First, make sure you've got Hadley Wickham's excellent devtools package installed. If you haven't got it, you can get it with these lines in your R console:
install.packages(pkgs = "devtools", dependencies = TRUE)
Windows users will also need to install Rtools and Mac users will also need to install Xcode. These are installed outside of R.
Then, use the install_github()
function to fetch this package from github:
require(devtools)
install_github("benmarwick/au13uwgeoarchlab", quick=TRUE)
Finally, attach the package to your R session like so, and get some basic information about it:
require(au13uwgeoarchlab)
# get a list of functions in this package
ls("package:au13uwgeoarchlab")
# get help on how to use a function
?psd_strat_plot
Get the lab report template R Markdown file by right-clicking on the link and saving as an Rmd file to work on in RStudio. Then study the lab report template carefully because it shows how all of the functions in this package should be used. This is what is looks like when it's working properly.
Message: Error: attempt to use zero-length variable name
Solution: You are probably trying to use a file name that has spaces or an unusual
character in it. Change your filename so it has no spaces and, ideally,
no punctuation that can be mistaken for a maths symbol (ie. no +, -, /. :, periods, etc.)
Message: ...had status 1
Solution: A few possibilities... You may have your PDF file open and R cannot overwrite the file while it's open. Quit all your PDF files and try again. Or, you may have an exotic
character in your text, like a degree symbol or letters with accents or diacritics
that is causing encoding problems. Replace exotic characters with more standard ones
and try again.
Message: ... .Random.seed ...
Solution: Go to the location of your markdown file and delete the folders called
cache
and figure
, then try again
Message: Error: client error: (406) Not Acceptable
Solution: Try this instead:
install.packages("installr")
require(installr)
install.packages.zip("https://github.com/benmarwick/au13uwgeoarchlab/archive/master.zip")
# ignore any messages after install.packages.zip
require(au13uwgeoarchlab)
Currently this package is limited to the exploration of the data collected during Autumn 2013.
The MIT License (MIT)
Copyright (c) 2013 Ben Marwick
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.