Package 'GTR'

Title: GAMS Text inserter for R
Description: GAMS Text inserter for R.
Authors: Abhijeet Mishra [aut, cre]
Maintainer: Abhijeet Mishra <[email protected]>
License: GPL (>= 3)
Version: 1.6.2
Built: 2024-12-28 02:53:05 UTC
Source: https://github.com/IFPRI/GTR

Help Index


addDescriptionPar

Description

addDescriptionPar

Usage

addDescriptionPar(target_files)

Arguments

target_files

Files which should be edited

Value

Modded text

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addDescriptionPar()

## End(Not run)

addDescriptionPost

Description

addDescriptionPost

Usage

addDescriptionPost(target_files)

Arguments

target_files

Files which should be edited

Value

Modded text

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addDescriptionPost()

## End(Not run)

addHeadR

Description

addHeadR

Usage

addHeadR(model_path = NULL)

Arguments

model_path

Path to file for cleanup of R block

Value

Adds header metadata

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addHeadR()

## End(Not run)

addNewlineR

Description

addNewlineR

Usage

addNewlineR(model_path = NULL)

Arguments

model_path

Path to model

Value

Modified GMS files with "optimized" parameter descriptions

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addNewlineR()

## End(Not run)

addOptimizedPars

Description

addOptimizedPars

Usage

addOptimizedPars(file_path, return_df = FALSE, post = FALSE)

Arguments

file_path

Path of files to be modified

return_df

If modded dataframe is returned with intermediate edits

post

if only clean text is returned for postsolve files

Value

Modded text

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addOptimizedPars()

## End(Not run)

addRealizationPhase

Description

addRealizationPhase

Usage

addRealizationPhase(model_path = NULL)

Arguments

model_path

Path of files to be modified

Value

Modded text

Author(s)

Abhijeet Mishra

Examples

## Not run: 
addRealizationPhase()

## End(Not run)

cleanR

Description

cleanR

Usage

cleanR(file_path, return_text_only = FALSE)

Arguments

file_path

Path to file for cleanup of R block

return_text_only

If only cleaned text be returned

Value

Cleanup for GMS files with "optimized" parameter descriptions

Author(s)

Abhijeet Mishra

Examples

## Not run: 
cleanR()

## End(Not run)

parGen

Description

parGen

Usage

parGen(lines_after_pattern)

Arguments

lines_after_pattern

Lines for which parameters need to be generated

Value

Modded text

Author(s)

Abhijeet Mishra

Examples

## Not run: 
parGen()

## End(Not run)

remove_empty_lines_from_end

Description

remove_empty_lines_from_end

Usage

remove_empty_lines_from_end(file_path)

Arguments

file_path

File paths

Value

Removing empty lines

Author(s)

Abhijeet Mishra

Examples

## Not run: 
remove_empty_lines_from_end()

## End(Not run)

removeEmptyR

Description

removeEmptyR

Usage

removeEmptyR(model_path = NULL, multiline_fix = FALSE)

Arguments

model_path

Path to model

multiline_fix

If multiple newlines should be cleaned. Default is FALSE

Value

Modified GMS files with "optimized" parameter descriptions

Author(s)

Abhijeet Mishra

Examples

## Not run: 
removeEmptyR()

## End(Not run)

replace_multiple_empty_lines

Description

replace_multiple_empty_lines

Usage

replace_multiple_empty_lines(file_path)

Arguments

file_path

File paths

Value

Removing empty lines

Author(s)

Abhijeet Mishra

Examples

## Not run: 
replace_multiple_empty_lines()

## End(Not run)

updateDataOutput

Description

updateDataOutput

Usage

updateDataOutput(model_path = NULL)

Arguments

model_path

Path to model

Value

Modified GMS files with "optimized" parameter descriptions

Author(s)

Abhijeet Mishra

Examples

## Not run: 
updateDataOutput()

## End(Not run)