Created
May 17, 2016 22:23
-
-
Save ukanga/292e9b65b0f417a597cabb5510dcfd59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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