Ron Michael
2010-Mar-22 20:53 UTC
[R] Fw: Re: Why "\\" instead of simple "/" to specify a file path [modified]
Hi, I was following this thread and would like to ask is there any way to save and open a .RData file after using some Password. What I mean to say, how to make my workplace password-protected? Also would like to know how same can be done for .R file. Thanks for your time. Thanks and regards, --- On Tue, 23/3/10, David Winsemius <dwinsemius@comcast.net> wrote: From: David Winsemius <dwinsemius@comcast.net> Subject: Re: [R] Why "\\" instead of simple "/" to specify a file path To: "Bogaso" <bogaso.christofer@gmail.com> Cc: r-help@r-project.org Date: Tuesday, 23 March, 2010, 1:51 AM On Mar 22, 2010, at 1:22 PM, Bogaso wrote:> > Hi all, > > I have saved my workplace in a .RData format. However if I want to open > that, I need to use following code : > > load("C:\\......") > > Here my question is why "\\". In all the time generally we use "/" like when > we use read.delim() function etc. Is there any possibility to have some > consistency there?Depends what you mean by consistency. The same rule applies on all current supported OS platforms. Doubling the back-slashes is needed because "\" is an "escape character".> Is there any other way to re-open the .RData file?If your OS supports it you may be able to use drag-drop with file icons or you can use file.choose() --David.> > Thanks, > --View this message in context: http://n4.nabble.com/Why-instead-of-simple-to-specify-a-file-path-tp1677973p1677973.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. New Email names for you! il. [[elided Yahoo spam]] [[alternative HTML version deleted]]
David Winsemius
2010-Mar-22 21:00 UTC
[R] Fw: Re: Why "\\" instead of simple "/" to specify a file path [modified]
How about saving, then issuing system() calls to run a zipping program with password? Then remove the original. ?file.remove (.R source files are just text.) -- David. On Mar 22, 2010, at 4:53 PM, Ron Michael wrote:> Hi, I was following this thread and would like to ask is there any > way to save and open a .RData file after using some Password. What I > mean to say, how to make my workplace password-protected? > Also would like to know how same can be done for .R file. > Thanks for your time. > Thanks and regards, > > > --- On Tue, 23/3/10, David Winsemius <dwinsemius at comcast.net> wrote: > > From: David Winsemius <dwinsemius at comcast.net> > Subject: Re: [R] Why "\\" instead of simple "/" to specify a file path > To: "Bogaso" <bogaso.christofer at gmail.com> > Cc: r-help at r-project.org > Date: Tuesday, 23 March, 2010, 1:51 AM > > > On Mar 22, 2010, at 1:22 PM, Bogaso wrote: > >> >> Hi all, >> >> I have saved my workplace in a .RData format. However if I want to >> open >> that, I need to use following code : >> >> load("C:\\......") >> >> Here my question is why "\\". In all the time generally we use "/" >> like when >> we use read.delim() function etc. Is there any possibility to have >> some >> consistency there? > > Depends what you mean by consistency. The same rule applies on all > current supported OS platforms. Doubling the back-slashes is needed > because "\" is an "escape character". > >> Is there any other way to re-open the .RData file? > > If your OS supports it you may be able to use drag-drop with file > icons or you can use file.choose() > > > --David. >> >> Thanks, >> --View this message in context: http://n4.nabble.com/Why-instead-of-simple-to-specify-a-file-path-tp1677973p1677973.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > > > New Email names for you! > > il. > [[elided Yahoo spam]] > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Marc Schwartz
2010-Mar-22 21:43 UTC
[R] Password Protection of Data Files and R Code (Was: Fw: Re: Why "\\" instead of simple "/" to specify a file path [modified])
You need to specify more detail on your functional requirements relative to protection. R itself does not support the direct use of encrypted data or R source files. If you simply want to encrypt/decrypt files before and after use in R, you can use third party programs such as GnuPG (http://www.gnupg.org/) or commercial equivalents. However, once the file/data is in memory (RAM) during an R session, it may be written to a tmp or swap partition on the disk by R itself or by the OS, in which case, it will be available 'in the clear' to someone else with physical access to your computer. If this is a concern, then you want to look a whole disk/volume encryption programs that protect your entire disk and require a password at system boot or during the mounting of an encrypted disk/partition. The details of this will depend upon the OS. For example on higher end Windows systems, there is BitLocker, on Linux there is DM-Crypt/LUKS and on OSX there is FileVault. There are also third party applications such as TrueCrypt, PGP Desktop/WDE (which I use on OSX) and WinMagic, which are available on multiple operating systems. In the second scenario, everything on the physical disk is encrypted and the reading and writing of these files, which includes the decryption and encryption, is done transparently during disk I/O. Thus, there is no need to manage individual files. Each of these approaches have pros and cons relative to security, the impact on operating procedures and to some extent, system performance. There was also a thread covering related matter back in late 2007: http://thread.gmane.org/gmane.comp.lang.r.general/94290/ In the future, with a significant subject matter change like this, please start a new thread. HTH, Marc Schwartz On Mar 22, 2010, at 3:53 PM, Ron Michael wrote:> Hi, I was following this thread and would like to ask is there any way to save and open a .RData file after using some Password. What I mean to say, how to make my workplace password-protected? > Also would like to know how same can be done for .R file. > Thanks for your time. > Thanks and regards,<snip>