[R] Problems Creating an R package

Aarti Dahiya aarti_dahiya at hotmail.com
Thu Jun 29 17:06:24 CEST 2006

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" <-
	extend(Object(), "ConnectionFactory")
, .env = <environment>, class = c("Class", "Object"), ...instanciationTime = 
structure(1151521420.604, class = c("POSIXt",
"POSIXct")), formals = c("public", "class"), modifiers = c("public",

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.


More information about the R-help mailing list