The metalabr
package provides functions for reading, validating, and
cleaning datasets that support the MetaLab site.
Before you can use metalabr
, you must install it. If will first need
to install the devtools
package. After the devtools
package is available, you can install
the latest version of metalabr
directly from Github with the
following command:
devtools::install_github("langcog/metalabr")
Once the metalabr
package has been installed, you can can load it with
the following command:
library(metalabr)
Now that the metalabr
package has been loaded, you can read in the
current datasets incorporated into the Metalab website with the
following commands. The first line of code will read in the medadata
associated with each MetaLab dataset, including the URL of the Google
sheet that contains the raw data. At that point, you can optionally
filter ml_dataset_info
to the rows for which you want to read the
raw data.
The second line of code will read the raw data from Google Sheets for
each of the datasets in ml_dataset_info
.
library(metalabr)
metadata <- get_metalab_metadata()
metalab_data <- get_metalab_data(metadata)