---
title: "Get started: the GGIR R package"
output:
   html_document:
    toc : true
    number_sections: true
    toc_depth: 3
    toc_float: true #by turning this on, the table of contents moves to the left of the page.
urlcolor: blue
vignette: >
  %\VignetteIndexEntry{Get started: the GGIR R package}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
editor_options:
  markdown:
    wrap: 72
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

This section will guide you through the process of configuring your work
environment to initiate the use of GGIR. For this purpose, you will need
at least one accelerometer file to be processed by GGIR, please feel
free to download [this .gt3x file](https://www.dropbox.com/s/covfyj31sarfaw0/GGIR01.gt3x?dl=0) or [this .cwa file](https://biobank.ndph.ox.ac.uk/ukb/refer.cgi?id=131620)
and follow the instructions below.

## Run GGIR for first time

1.  First, you will need to place your file(s) in a folder in your
    computer. Make sure that this folder does only contain accelerometer
    files.

2.  Use the following command to run GGIR over your data using all the
    default options.

    -   datadir refers to the directory where you have located the
        accelerometer files.

    -   outputdir refers to the directory where you want to store the
        GGIR’s output.

``` r
library(GGIR) 
GGIR(datadir="C:/mystudy/mydata", outputdir="D:/myresults")
```

After some minutes, you should be able to see how your output directory
gets populated with files, reports, and visualizations.

## Related links

-   [Install R and GGIR](https://wadpac.github.io/GGIR/articles/chapter0_Installation.html).
-   [Get support](https://wadpac.github.io/GGIR/articles/chapter0_Support.html)
-   [Suitable file formats for GGIR](https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html#input-files)
