| 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: | 2026-06-02 10:20:59 UTC |
| Source: | https://github.com/IFPRI/GTR |
addDescriptionPar
addDescriptionPar(target_files)addDescriptionPar(target_files)
target_files |
Files which should be edited |
Modded text
Abhijeet Mishra
## Not run: addDescriptionPar() ## End(Not run)## Not run: addDescriptionPar() ## End(Not run)
addDescriptionPost
addDescriptionPost(target_files)addDescriptionPost(target_files)
target_files |
Files which should be edited |
Modded text
Abhijeet Mishra
## Not run: addDescriptionPost() ## End(Not run)## Not run: addDescriptionPost() ## End(Not run)
addHeadR
addHeadR(model_path = NULL)addHeadR(model_path = NULL)
model_path |
Path to file for cleanup of R block |
Adds header metadata
Abhijeet Mishra
## Not run: addHeadR() ## End(Not run)## Not run: addHeadR() ## End(Not run)
addNewlineR
addNewlineR(model_path = NULL)addNewlineR(model_path = NULL)
model_path |
Path to model |
Modified GMS files with "optimized" parameter descriptions
Abhijeet Mishra
## Not run: addNewlineR() ## End(Not run)## Not run: addNewlineR() ## End(Not run)
addOptimizedPars
addOptimizedPars(file_path, return_df = FALSE, post = FALSE)addOptimizedPars(file_path, return_df = FALSE, post = FALSE)
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 |
Modded text
Abhijeet Mishra
## Not run: addOptimizedPars() ## End(Not run)## Not run: addOptimizedPars() ## End(Not run)
addRealizationPhase
addRealizationPhase(model_path = NULL)addRealizationPhase(model_path = NULL)
model_path |
Path of files to be modified |
Modded text
Abhijeet Mishra
## Not run: addRealizationPhase() ## End(Not run)## Not run: addRealizationPhase() ## End(Not run)
cleanR
cleanR(file_path, return_text_only = FALSE)cleanR(file_path, return_text_only = FALSE)
file_path |
Path to file for cleanup of R block |
return_text_only |
If only cleaned text be returned |
Cleanup for GMS files with "optimized" parameter descriptions
Abhijeet Mishra
## Not run: cleanR() ## End(Not run)## Not run: cleanR() ## End(Not run)
parGen
parGen(lines_after_pattern)parGen(lines_after_pattern)
lines_after_pattern |
Lines for which parameters need to be generated |
Modded text
Abhijeet Mishra
## Not run: parGen() ## End(Not run)## Not run: parGen() ## End(Not run)
remove_empty_lines_from_end
remove_empty_lines_from_end(file_path)remove_empty_lines_from_end(file_path)
file_path |
File paths |
Removing empty lines
Abhijeet Mishra
## Not run: remove_empty_lines_from_end() ## End(Not run)## Not run: remove_empty_lines_from_end() ## End(Not run)
removeEmptyR
removeEmptyR(model_path = NULL, multiline_fix = FALSE)removeEmptyR(model_path = NULL, multiline_fix = FALSE)
model_path |
Path to model |
multiline_fix |
If multiple newlines should be cleaned. Default is FALSE |
Modified GMS files with "optimized" parameter descriptions
Abhijeet Mishra
## Not run: removeEmptyR() ## End(Not run)## Not run: removeEmptyR() ## End(Not run)
replace_multiple_empty_lines
replace_multiple_empty_lines(file_path)replace_multiple_empty_lines(file_path)
file_path |
File paths |
Removing empty lines
Abhijeet Mishra
## Not run: replace_multiple_empty_lines() ## End(Not run)## Not run: replace_multiple_empty_lines() ## End(Not run)
updateDataOutput
updateDataOutput(model_path = NULL)updateDataOutput(model_path = NULL)
model_path |
Path to model |
Modified GMS files with "optimized" parameter descriptions
Abhijeet Mishra
## Not run: updateDataOutput() ## End(Not run)## Not run: updateDataOutput() ## End(Not run)