Prof, Ripley.

I think I figured it out.  I took the instructions for  code_files to mean
that you had to supply the
path to the directory and not the paths to all the files within that
directory.

I'll show my work below  which should make  clear the mistake that I made

  sessionInfo()R version 2.13.0 (2011-04-13)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] R.utils_1.7.5     R.oo_1.8.0        R.methodsS3_1.2.1

loaded via a namespace (and not attached):
[1] tools_2.13.0
   getwd()[1] "C:/Users/steve/Documents/GHCNPackage"
list.files(full.names=TRUE)[1] "./d.R" "./f.R"

  filePath <- getwd()  filePath[1]
"C:/Users/steve/Documents/GHCNPackage"
package.skeleton(name="testpackage",code_files=filePath)Error in
file(file, "r") : cannot open the connectionIn addition: Warning
message:In file(file, "r") :
  cannot open file 'C:/Users/steve/Documents/GHCNPackage': Permission denied

# Looks like I need a path all the way to the file.

# start with one file to test   testFile
<-file.path(filePath,"d.R",fsep=.Platform$file.sep)
package.skeleton(name="testpackage",code_files=testFile)Creating
directories ...Creating DESCRIPTION ...Creating Read-and-delete-me
...Copying code files ...Making help files ...Done.Further steps are
described in './testpackage/Read-and-delete-me'.  ?package.skeleton()

  testFile2 <-file.path(filePath,"f.R",fsep=.Platform$file.sep)
package.skeleton(name="testpackage",code_files=c(testFile,testFile2))Creating
directories ...Error in package.skeleton(name = "testpackage",
code_files = c(testFile,  :
  directory './testpackage' already exists
package.skeleton(name="testpackage",code_files=c(testFile,testFile2))Creating
directories ...Creating DESCRIPTION ...Creating Read-and-delete-me
...Copying code files ...Making help files ...Done.Further steps are
described in './testpackage/Read-and-delete-me'.


Success. I assumed that you just passed in the directory that   contained
all the source
Files and that all the files in that directory ending in .R would be used.

Thanks

On Wed, Jun 8, 2011 at 11:44 PM, Prof Brian Ripley <rip...@stats.ox.ac.uk>wrote:

> On Wed, 8 Jun 2011, steven mosher wrote:
>
>  I'm using package.skeleton()  windows 7, 64 bit.
>>
>> When I try to specify the code_files
>>
>> package_skeleton(....code_files = "  some directory")
>>
>> I get a warning that that the connection cannot be opened and
>> I get a Permissions denied error.
>>
>
> Which connection?  Please copy-and-paste exactly what you did and what the
> output was.
>
>
>  I'm running R as admin and I've given everybody full permissions on the
>> folder.
>>
>> What am I missing
>>
>
> There can be more to that on Windows 7.  Is it read-only, for example?
> One thing which often catches users of POSIX operating systems (like me) is
> that read-only files are also no-delete files.
>
>         [[alternative HTML version deleted]]
>>
>
> Please don't keep sending HTML when the posting guide expressly asked you
> not to.
>
>  ______________________________________________
>> 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.
>>
>>
> --
> Brian D. Ripley,                  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to