Saturday, October 14, 2017

Looking up location included in photo metadata.


In Google Maps enter:

40°22'53.11"N 111°54'44.23"W

Saturday, September 16, 2017

Setting Up R for Performing Basic Statistical Analyses

Installing Main Programs

Make sure these are installed.


Working in an R notebook allows you to keep a copy of the code you've run and generate output you can save and share.

  • R Studio - File - New File - New Notebook

R Studio Add Ins

R Studio allows for installation of add-ins. The GREA add-in which allows for the import of many types of data files into R seems like it will be useful.

(The code snippets which follow are R code insertions in an R notebook in R Studio.)


R Package Management for Specific Projects

I can never remember what packages I used after I tried something but I haven't worked on it for a while. I found keeping a list of the packages I need and letting R do the tedious work of making sure they're ready to use reduces my frustration level.



R Packages Mentioned in This Post


Saturday, September 2, 2017

R data exploration

histograms for all numeric variables in data frame
https://www.r-bloggers.com/quick-plot-of-all-variables/

> dataset %>%
+ keep(is.numeric) %>%
+ gather() %>%
+ ggplot(aes(value)) +
+ facet_wrap(~key, scales = "free") +
+ geom_histogram()

Plotting in R
http://www.stat.wisc.edu/~larget/stat302/chap2.pdf


data frame column types
numeric
double
interger
logical
factor

messy data frames
http://www.win-vector.com/blog/2015/04/what-can-be-in-an-r-data-frame-column/
POSIXlt
Arbitrary lists
Matrices
Data frames

Wednesday, August 30, 2017

R manipulating data frames

Basic tutorial
http://www.r-tutor.com/r-introduction/data-frame

data.frame() Documentation
https://stat.ethz.ch/R-manual/R-devel/library/base/html/data.frame.html

data frame manipulation
https://www.datacamp.com/community/tutorials/15-easy-solutions-data-frame-problems-r#gs.g8nD2Tk

Edit data
fix(dataset)
How to import SPSS data (.sav) file into R.
https://www.r-bloggers.com/how-to-open-an-spss-file-into-r/

library(foreign)
dataset = read.spss(file.choose(), to.data.frame=TRUE)

To view the data set.
View(dataset)

09/16/2017
I stumbled across a newer package for importing and exporting data. It's called rio.

Links to package information:
https://cran.r-project.org/web/packages/rio/index.html

https://cran.r-project.org/web/packages/rio/vignettes/rio.html

https://cran.r-project.org/web/packages/rio/README.html

Installing rio:
> install.packages("rio", dependencies = TRUE)
> library("rio")

Importing a file:
> dataFile = import(file.choose())