helps: helps

Description Usage Arguments Examples

View source: R/package.R

Description

Packages required: "SASxport", "reshape", "Hmisc", "tidyr","ReporteRs","plyr". Run each function in the order listed below. Steps 1, 2 and 3, will provide additional settings in excel spreadsheet. PLEASE COMPLETE THE SETTINGS IN EACH SPREADSHEET BEFORE RUNNING NEXT STEP #'

Usage

1

Arguments

install.pack

first time package user, run this function to install all required packages.

working.folder

Mandatory. Define the main working path or folder (ex: working.folder<-"C:/Users/lpheng/Desktop/xptdefine").

define.library

Mandatory. If library not available, type define.library<- "no". If library is available, copy define library file to main working folder and set define.library<-"(library file name).csv"

step1()

funtion create "list of files.csv" spreadsheet if not exist.?step1 for details

step2()

create subfolders, import files in the "list of files.csv" to input folder and create studydefinelist.csv. Note that a WARNING message may appear if one or more labels are longer than 8 characters. These labels will be reported in an Excel file called Var_name_GT8.csv. You can make changes to the label to get appropriate length. Note also that you can flag variables for remove in "list of files.csv". If you want to make changes to your data, run step3().

step3()

This step is optional. Run this option to apply the changes to label name or lable removal.

step4()

Convert csv to xpt and create define document

Examples

1
2
3
4
5
6
7
8
Copy these lines below to script editor
library(xptdef)
working.folder<-"C:/Users/lpheng/Desktop/packdev/test" #set the working path
step1(working.folder)
define.library="no" # or enter the name of the library
step2()
title="Test" # Mondatory. this title will appear in define
step4(title)

leonpheng/xptdefine documentation built on Nov. 21, 2019, 1:31 p.m.