workingDirectoryPopulate {WebAnalytics}R Documentation

Create files in the working directory to be used for report generation

Description

The function creates the specified directory (if it does not already exist) and creates the configured file directory (by default the name is 'txdata') if that does not exist. If the files directory has an absolute path it is created, if it is a relative path it is appended to the work directory path and created. The work directory contains the report template and scripts, the files directory holds the images that are generated by the report template. It creates the following files:

makerpt.ps1

PowerShell script to generate the report. The script is run by specifying its name followed by the stem part of the R file that contains the script .\makerpt.ps1 reportname

makerpt.sh

bash script to generate the report. The script is run by specifying its name followed by the stem part of the R file that contains the script ./makerpt.sh reportname

size10.clo

A file used by LaTex that specifies the page layout

webanalyticsreport.cls

A latex document class that the report uses

logo.eps

A 2cm square eps logo placed in the top right corner of each report page

sampleRfile.R

An outline R report file

If a file exists and has different content to the new file it will be renamed (a timestamp suffix added to the name) before the new file is created.

Usage

workingDirectoryPopulate(directoryName = ".")

Arguments

directoryName

A character string that specifies the name of the directory to be created and populated

Value

The function does not return a value

Author(s)

Greg Hunt <greg@firmansyah.com>

Examples

# in the current directory run it as 
# workingDirectoryPopulate()


workingDir = paste0(tempdir(),"/wk")

workingDirectoryPopulate(workingDir)



[Package WebAnalytics version 0.9.12 Index]