[R] Problems Creating an R package
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 29 18:03:26 CEST 2006
On Thu, 29 Jun 2006, Thomas Petzoldt wrote:
> Hi Aarti
>
> src/ if you have source files in C or Fortran.
> R/ for the R sources.
>
> If you have no C or Fortran files, you should delete the src/ directory.
>
> The syntax error in your R function is simply that the "," is on a new
> line so R "thinks" that the line above is complete.
R does know it is waiting for a ')'. The error is exactly where it says, at
>> 6: , .env = <
and of course
>> , .env = <environment>, class = c("Class", "Object"), ...instanciationTime =
^^^^^^^^^^^^^
which is not valid R.
>
> Hope it helps
>
> Thomas P.
>
>
> Aarti Dahiya wrote:
>> Hi all,
>>
>> When I check my package using "Rcmd check ..\myPackage\R.mykg" on Windows in
>> Command Prompt, this is what get:-
>>
>> * using log directory 'C:/R/bin/R.getdata.Rcheck'
>> * using Version 2.3.1 (2006-06-01)
>> * checking for file 'R.getdata/DESCRIPTION' ... OK
>> * checking extension type ... Package
>> * this is package 'R.getdata' version '1.0'
>> * checking package dependencies ... OK
>> * checking if this is a source package ... OK
>> * checking whether package 'R.getdata' can be installed ... OK
>> * checking package directory ... OK
>> * checking for portable file names ... OK
>> * checking DESCRIPTION meta-information ... OK
>> * checking top-level files ... OK
>> * checking index information ... OK
>> * checking package subdirectories ... WARNING
>> Subdirectory 'src' contains no source files.
>> * checking R files for syntax errors ... ERROR
>> Syntax error in file 'R/ConnectionFactory.R'
>>
>> Q1. What should I put in 'src'. I did put two of my source .R files, it
>> still does not work.
>>
>> Q2. This is what I get if I source R/ConnectionFactory.R.
>> Error in parse(file, n = -1, NULL, "?") : syntax error at
>> 5: }
>> 6: , .env = <
>>
>> These are the contents of R/ConnectionFactory.R.
>>
>> "ConnectionFactory" <-
>> structure(function()
>> {
>> extend(Object(), "ConnectionFactory")
>> }
>> , .env = <environment>, class = c("Class", "Object"), ...instanciationTime =
>
>
>> structure(1151521420.604, class = c("POSIXt",
>> "POSIXct")), formals = c("public", "class"), modifiers = c("public",
>> "class")
>>
>> Please note that this file is one that was automatically generated in
>> R.mykg/R. My source file ConnectionFactory.R has the actual R code which
>> sources just fine.
>>
>> I will greatly appreciate any help! Thank you.
>>
>> Aarti
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Brian D. Ripley, ripley at 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
More information about the R-help
mailing list