Re: [Rd] Build fails with sysdata.rda in R dir

2012-06-23 Thread Uwe Ligges



On 15.06.2012 16:37, Vitalie Spinu wrote:


Hi,

I am getting a strange error with 15.0 which I've not seen with previous
versions of R.

If sysdata.rda is included in R directory of the package I am getting:

R CMD build betfairly.roxygen/
* checking for file ‘betfairly.roxygen/DESCRIPTION’ ... OK
* preparing ‘betfairly’:
* checking DESCRIPTION meta-information ... OK
* excluding invalid files
Subdirectory 'R' contains invalid file names:
   ‘getMarketTradedVolume.Rd’ ‘sfdsfsd’
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘betfairly/inst/doc’
* looking to see if a ‘data/datalist’ file should be added
Error in if (any(update)) { : missing value where TRUE/FALSE needed
Execution halted


If I remove the data everything is fine:

@~/works/betfair$ rm betfairly.roxygen/R/sysdata.rda
@~/works/betfair$ R CMD build betfairly.roxygen/
* checking for file ‘betfairly.roxygen/DESCRIPTION’ ... OK
* preparing ‘betfairly’:
* checking DESCRIPTION meta-information ... OK
* excluding invalid files
Subdirectory 'R' contains invalid file names:
   ‘getMarketTradedVolume.Rd’ ‘sfdsfsd’
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘betfairly/inst/doc’
* building ‘betfairly_1.2.1.tar.gz’


If I manually adding sysdata.rda after build then checks run ok.



Hmmm, and how have you added it before? Can you send us an example how 
to create an sysdata.rda that causes R to fail? If this is done vy 
roxygen, please ask the roxygen maintainers. If plainR, I am happy to 
look into it.


Best,
Uwe Ligges




Vitalie.

R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i686-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Have download.packages consider non-CRAN repositories

2012-06-23 Thread Uwe Ligges



On 22.06.2012 15:10, Ingmar Schuster wrote:

Hi Uwe and List,

Thanks for your suggestions.

It's a complete repository with source Packages and the PACKAGES(.gz)
index file under src/contrib/. As mentioned: explicitly calling

install.packages(PACKAGE_NAME,
repos=file:///Users/arbeit/Documents/clarin/Open_Science/PMR2/,
type=source);

works without any problems. But configuring the repository through
R_HOME/etc/repositories and obmitting the repos argument to
install.packages() is what I want and what doesn't work. Ideas?


1. I haven't tried your syntax from above, but I'd rather use
 file:/Users/arbeit/Documents/clarin/Open_Science/PMR2
or under Windows in a safer way::
 file:c:/Users/arbeit/Documents/clarin/Open_Science/PMR2

2. Maybe you forgot to set the Repository active via setRepositories()?

3. Why don't you just set the repositories at startup, e.g. in 
Rprofile.site or your personal .Rprofile via:


local({
  r - getOption(repos)
  r[myCRAN] - file:store/ligges/public_html/CRAN
  options(repos=r)
})

works for me with store being a machine in the network (via UNC path).

Best,
uwe Ligges





And note that is must be a complete repository, i.e. packages in subdir
./src/contrib. A user can use install.packages(., type=source) if
you do not provide binaries in case they are expected by default.

Uwe Ligges


I knew about the type=source argument to install.packages() but
hoped there would be a way to permanently configure this as default
for a source-only repository.


Thanks,
Ingmar Schuster



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] globalVariables()

2012-06-23 Thread John Fox
Dear r-devel list members,

By placing a call to the new (with R 2.15.1) globalVariables() in the 
development version of the Rcmdr package, I've succeeded in reducing the 
notes produced by R CMD check from dozens to two. But I still get the 
following notes, even though '.commander.done' is in the call to 
globalVariables():

- snip 

* checking R code for possible problems ... NOTE
Commander: no visible binding for '-' assignment to '.commander.done'
  (C:/Users/John Fox/workspace/Rcmdr/R/commander.R:653)
closeCommander: no visible binding for '-' assignment to
  '.commander.done' (C:/Users/John
  Fox/workspace/Rcmdr/R/file-menu.R:142)

- snip 

Is there a way to get rid of these notes (without, of course, removing the - 
assignments)?

Finally, here's a rough function that I used to compose the globalVariables() 
command from the package check summary; it's probably not bullet-proof, but 
perhaps others will find it useful for packages, like the Rcmdr, that currently 
generate many notes about global variables:

- snip 

findGlobals - function(filein=00check.log, fileout=globals.R){
  checklog - readLines(filein)
  whichline - which(grepl(checking R code for possible problems .* NOTE, 
checklog))
  checklog - checklog[-(1:whichline)]
  whichline - which(grepl(checking Rd files, checklog))
  checklog - checklog[-(whichline:length(checklog))]
  globals - gsub(.*no visible binding for global variable[ ]*, , checklog)
  globals - gsub(.*no visible global function definition for[ ]*, , 
globals)
  globlas - gsub(.*no visible binding for '-' assignment to[ ]*, , 
globals)
  globals - globals[globals != ]
  globals - sub(^ *, , globals)
  globals - sub( *$, , globals)
  whichentries - which(grepl(:, globals))
  globals - globals[-whichentries]
  globals - gsub(.* , , globals)
  globals - unique(globals)
  cmd - paste(if (getRversion() = '2.15.1') globalVariables(c(, 
   paste(globals, collapse=, ), )), sep=)
  cmd - strwrap(cmd)
  writeLines(cmd, fileout)
}

- snip 

Any help would be appreciated.

John


John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Win 64 package build - ERROR: loading failed for 'x64'

2012-06-23 Thread John Nolan
I have developed an R package that works under Win32, but when I attempt to 
build it on Win64,
I get ERROR: loading failed for 'x64'

More precisely, I developed and tested the package under Win32 and it works. 
But when I move
to a 64 bit Windows 7 (Home Premium) system, and attempt to build both 32 bit 
and 64 bit packages, 
the 32 bit package seems to build, but the 64 bit build fails.
'rcmd build test' works fine, producing DLLs in both src-i386 and src-x64

But 'rcmd check test' and 'rcmd install test' both fail.  
When R attempts to load the 64 bit DLL.  A pop-up window says
   R for Windows terminal front-end has stopped working,
then I get the error message on the console
   ERROR: loading failed for 'x64'
   
Below is the Makevar.win file (it selects a library based on 32 vs 64 bit).
Also below is 00install.out and R.Version() output.

I'd appreciate any suggestions.

John
 
...
 John P. Nolan
 Math/Stat Department
 227 Gray Hall,   American University
 4400 Massachusetts Avenue, NW
 Washington, DC 20016-8050

 jpno...@american.edu  
 voice: 202.885.3140  web: academic2.american.edu/~jpnolan
 
...

- Makevar.win --
ifeq $(WIN) 64
PKG_LIBS=../../../win64/test_win64.a -lgfortran
else
PKG_LIBS=../../../win32/test_win32.a -lgfortran
endif

PKG_CPPFLAGS=-I/JohnsWork/test/src/

-  00install.out -

* installing *source* package 'test' ...
** libs

*** arch - i386
gcc  -IC:/PROGRA~1/R/R-215~1.0/include -DNDEBUG -I/JohnsWork/test/src
-O3 -Wall  -std=gnu99 -mtune=core2 -c testR.c -o testR.o
gcc -shared -s -static-libgcc -o test.dll tmp.def testR.o 
../../../win32/test_win32.lib -lgfortran -LC:/PROGRA~1/R/R-215~1.0/bin/i386 -lR
installing to C:/JohnsWork/test/make/R/test.Rcheck/test/libs/i386

*** arch - x64
gcc -m64 -IC:/PROGRA~1/R/R-215~1.0/include -DNDEBUG -I/JohnsWork/test/src   
-Id:/RCompile/CRANpkg/extralibs64/local/include -O2 -Wall  -std=gnu99 
-mtune=core2 -c testR.c -o testR.o
gcc -m64 -shared -s -static-libgcc -o test.dll tmp.def testR.o 
../../../win64/test_win64.lib -lgfortran 
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 
-Ld:/RCompile/CRANpkg/extralibs64/local/lib -LC:/PROGRA~1/R/R-215~1.0/bin/x64 
-lR
make: `symbols.rds' is up to date.
installing to C:/JohnsWork/test/make/R/test.Rcheck/test/libs/x64
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
ERROR: loading failed for 'x64'
* removing 'C:/JohnsWork/test/make/R/test.Rcheck/test'

-

 str(R.Version())
List of 14
 $ platform  : chr x86_64-pc-mingw32
 $ arch  : chr x86_64
 $ os: chr mingw32
 $ system: chr x86_64, mingw32
 $ status: chr 
 $ major : chr 2
 $ minor : chr 15.0
 $ year  : chr 2012
 $ month : chr 03
 $ day   : chr 30
 $ svn rev   : chr 58871
 $ language  : chr R
 $ version.string: chr R version 2.15.0 (2012-03-30)
 $ nickname  : chr 
 
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel