Skip to content
Prev 350197 / 398506 Next

Smart detection of wrap width?

I'm glad it's helpful!

Defining it and then invoking it in ~/.Rprofile would work, but then you
will need to be careful about managing both ./.Rprofile and ~/.Rprofile
files. If you have one of the former, then the latter does not get sourced
at startup (see ?Startup). Of course, you can put source('~/.Rprofile') in
a local ./.Rprofile to take care of that if you want.

But in the long run, it would be a better practice to put personal helper
functions like this in a package and then load it in your .Rprofile
file(s). Most of my ./.Rprofile files have
  require(rmacq)
  setwid()
in them (along with whatever other directory-specific startup actions I
want). The more personal helper functions you have, the more valuable it
will be to put them in a package instead of defining them in ~/.Rprofile.

-Don