Learn R Programming

TroublemakeR (version 0.0.1)

write_ampl_lines: Writes an AMPL line

Description

This function takes a character and writes them to a .dat file. The file will be written to the location specified by the name argument. If the file already exists, it will be overwritten. The file format is plain text, with each line terminated by a newline character.

Usage

write_ampl_lines(line, name = "Problem")

Value

.dat file. This function is used for the side-effect of writing values to a file.

Arguments

line

line to be written to .dat file

name

The name of the output file

Examples

Run this code

write_ampl_lines("param s:= 1")

file.remove("Problem.dat")

Run the code above in your browser using DataLab