Skip to content

Instantly share code, notes, and snippets.

@ukanga
Created May 17, 2016 22:23
Show Gist options
  • Select an option

  • Save ukanga/292e9b65b0f417a597cabb5510dcfd59 to your computer and use it in GitHub Desktop.

Select an option

Save ukanga/292e9b65b0f417a597cabb5510dcfd59 to your computer and use it in GitHub Desktop.
---
title: "Example of using Ona.R"
author: Ukang'a Dickson
date: "`r format(Sys.time(), '%B %d, %Y')`"
output: html_document
---
An example of using ona.R.
Load ona.R library.
```{r}
library(ona)
```
Download the form with id_string `amharic_tutorial` from the account `ukdemo` using the username `ukdemo` and supplying the password.
```{r}
tutorial <- onaDownload('amharic_tutorial', 'ukdemo', 'ukdemo', 'demo')
```
Initialize a data frame and git the time difference in the date field.
```{r}
tutorial_frame <- data.frame(tutorial)
max(tutorial_frame$date) - min(tutorial_frame$date)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment