Learn R Programming

odk (version 1.5)

odk2spss: Convert 'ODK' or 'XLSForm' to 'SPSS' Data Frame

Description

After develop a 'ODK' frame, we can link the frame to 'Google Sheets' and collect data through 'Android'. This data uploaded to a 'Google sheets'. odk2spss() function help to convert the 'ODK' frame into 'SPSS' frame. Also able to add downloaded 'Google sheets' data by using pc.data or read data from 'Google sheets' by using 'ODK' frame 'submission_url'.

Usage

odk2spss(xlsx, pb.url=NULL, pc.data = NULL, out.path = NULL)

Arguments

xlsx

path of 'ODK' or XLSForm questionniare frame in 'xlsx' format.

pb.url

Published link of 'Google Sheets' for data, if pb.url = NULL , then the odk2spss() function try to get data from pc.data.

pc.data

path of data file in 'xlsx' format, if pc.data = NULL , then the odk2spss() function download data from 'Google Sheets', internet connection needed for this.

out.path

path of output file with file name (ex: path/output_file.sps).if out.path=NULL, then odk2spss() function will show the auto output file path.

Value

odk2spss() create a '*.sps' file. Open '*.sps' file by 'SPSS' softwere and Run. Then we will get 'SPSS' data frame with data.

Examples

Run this code
# NOT RUN {
library(odk)
data(odk.frame)
data(gs.data)
##--Convert 'odk.frame' to 'SPSS' data frame and input gs.data data set.

odk2spss(xlsx=odk.frame, pc.data=gs.data, out.path="spss.sps")

##### Internet connection needed if pc.data = NULL

# }

Run the code above in your browser using DataLab