5

I have an .RProfile file that I set up on my Mac Laptop. When I tried to save the file after coding it in BBEdit, the system objected, saying I must give it a name that doesn't begin with the dot. I saved it as RProfile.txt, the opened my Terminal window and did:

mv RProfile.txt .RProfile

Which worked.

Now I've tried to set the same thing up at school on PC's with Windows 7 and I haven't been successful yet. Again, the system objected to the .RProfile name. If I save it as RProfile.txt, what can I use to change the name to .RProfile? I tried changing the name in the folder directory, but again it objected.

Can someone help me on this issue?

Thanks.

IRTFM
  • 258,963
  • 21
  • 364
  • 487
David
  • 981
  • 1
  • 15
  • 27

1 Answers1

8

Add a period at the end when titling it as in .Rprofile. The end period will magically disappear.

Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
  • I'd like to now ask a second question. On my Mac, I was able to put .RProfile in my home user directory, so even when I open an old project or create an new project, the .RProfile executes. My question is, where do I put the .RProfile on each lab computer in our classroom so that this same thing will happen? – David Feb 26 '15 at 20:39
  • Check this video: https://www.youtube.com/watch?v=oZrVlsWMDBc You can throw one in a project directory as well if you're using RStudio – Tyler Rinker Feb 26 '15 at 21:38
  • Unfortunately that won't work for us, as we already change the working directory to ~/E7014/lectures, so I don't know the original directory to put it in. I do know that that I can put it into any project folder and then restart, but I want to put it in a folder where it will start up whether or not I am working on a project. – David Feb 26 '15 at 22:41
  • When I tried this, it caused me problems: the file was created, but then practically no program found it, and I could not even delete it by its name (only using the .R* pattern). Creating it without the final dot worked. – jciloa May 02 '19 at 07:28