The formula print method does not respect the environment width option.
For example, given the following long formula:
fo <- y ~ factor1 + factor2 + factor3 + factor4 + factor5 + factor6 + factor7 + factor8
Set the environment width fairly narrow
options(width=30)
And print the formula
print(fo)
Results in (regardless of the width option)
y ~ factor1 + factor2 + factor3 + factor4 + factor5 + factor6 +
factor7 + factor8
Any ideas how to make print.formula respect the width option?
I ended up going with a sightly different approach:
It respects the environment’s width setting, while printing the naked (not a string vector) formula with correct indenting.