[R-pkg-devel] Fwd: R-package-devel@R-project.org: RANDR

2017-01-24 Thread Cathy Lee Gierke
I'm cleaning up the problems in my build, but there are a few I do not
understand, like this one.  What is this telling me?



* checking for unstated dependencies in examples ...Warning in grep("^Xlib:
*extension \"RANDR\" missing on display", out, invert = TRUE,  :

  input string 4 is invalid in this locale

Error in grep("^Xlib: *extension \"RANDR\" missing on display", out, invert
= TRUE,  :

  attempt to set index 4/4 in SET_STRING_ELT

Execution halted


​Thank you for your assistance,
​
Cathy Lee Gierke

[[alternative HTML version deleted]]

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

Re: [R-pkg-devel] Multiple architectures on Windows

2017-01-24 Thread Sean Taylor
I am testing a package on Windows for submission for CRAN but having trouble 
getting it to work on i386 and x64 platforms simultaneously.

At install time, the package runs a install.libs.R to generate an RData file.  
This file contains compiled code (they are cached Stan models generated from 
the rstan package) that is architecture specific.

When I check the package on Windows, it will always fail to load the RData file 
on whatever architecture it was not installed with (e.g. if I install with x64, 
it will fail to load on i386).  This suggests to me that the install step is 
not running for both architectures as it should, or that they are being written 
to the same place and one is overwriting the other.

Is there a way to configure the package to force it to run install.libs.R to 
generate these RData files separately under both architectures?  The problem as 
far as I can tell is that the `R_ARCH` global variable is always empty in 
install.libs.R, so under both i386 and x86 runs, the RData files are being 
written to the same place.  My destination directory is set using the following 
line: `dest <- file.path(R_PACKAGE_DIR, paste0('libs', R_ARCH))`.

Things I have tried to force this behavior:

-  Adding `Biarch: true` to the DESCRIPTION file.

-  Adding a configure.win file.

Thanks for any help you can offer!  I am happy to share the package file itself 
if you find that useful.

Sean Taylor
s...@fb.com

References:
My install.libs.R: 
https://gist.github.com/seanjtaylor/17f3d3df9adade9d201973e32c8cc362
Install/Check output with no package configuration: 
https://gist.github.com/seanjtaylor/4a5c26aec9662c2c606e61e24d0d1ebf
Install/Check output with `Biarch: true`:  
https://gist.github.com/seanjtaylor/da5b51298e3ac38825a09d1c01435ade
Install/Check output with configure.win file: 
https://gist.github.com/seanjtaylor/925902ba4093ab4eb1ef748d677a63c7
Install/Check output with `Biarch: true` AND configure.win file: 
https://gist.github.com/seanjtaylor/8382f28ead1ccd6b5e2e9c5cc036f4ad


[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Multiple architectures on Windows

2017-01-24 Thread Dirk Eddelbuettel

Sean,

You could look at the packages Rblpapi and x13binary both of which do
something a little nonstandard, but arch dependent.  You can either 'hit it'
in the configure or the make step.  I can detail if needed.

x13binary is smaller. It just pulls the Census binary in, for Windows that is
precompiled.  Here is its configure.win:

-
#!/bin/sh
cwd=$(pwd)
cd inst

r_script="${R_HOME}/bin${R_ARCH_BIN}/Rscript"
set_internet2=`"${r_script}" -e 
"cat(ifelse(compareVersion(paste(R.Version()['major'], R.Version()['minor'], 
sep = '.'), '3.2.2') > 0, '', 'setInternet2();'))"`

"${r_script}" -e "${set_internet2} 
download.file('https://github.com/x13org/x13prebuilt/raw/master/v1.1.26/windows/x13ashtml.zip',
 'x13ashtml.zip', quiet = TRUE, mode = \"wb\")"
unzip -u x13ashtml.zip
cp x13ashtml/x13ashtml.exe bin
rm x13ashtml.zip
rm -R x13ashtml
cd ${cwd}

exit 0
-


Similarly, here is src/Makevars.win for Rblpapi -- it needs a library we
fetch from Bloomberg (in configure.win) but unpack as needed:

-
## -*- mode: Makefile; tab-width: 8 -*-
##
##  Makefile.win -- Windows build system
##
##  Copyright (C) 2015  Whit Armstrong and Dirk Eddelbuettel
##
##  This file is part of Rblpapi
##
##  Rblpapi is free software: you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 2 of the License, or
##  (at your option) any later version.
##
##  Rblpapi is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with Rblpapi.  If not, see .


## Distinguish between 32 and 64 bit windows
ifeq "$(WIN)" "64"
FLV = x64
else
FLV = i386
endif

## Standard compiler / linker flags including windows flavor
CXX_STD = CXX11
PKG_CPPFLAGS = -I../inst/include -I.
PKG_LIBS = -lblpapi3_${WIN} -L${FLV}


## SHLIB target is built by R, blpLibrary is a target we use to expand the 
tar.gz
all:blpLibrary $(SHLIB)

## target to ensure tar.gz files get unpacked
## the opening '@' ensures operations are executed 'quietly'
## in order to see commands as they happens add a 'v' to the tar and cp commands
## curl has '-k' flag to suppress certificate warnings
blpLibrary:
@if [ ! -d ../inst ]; then mkdir -p ../inst; fi
@if [ ! -d ../blp/win/${FLV} ]; then mkdir -p 
../blp/win/${FLV}; fi
@if [ ! -f ../blp/win/${FLV}/blpHeaders.tar.gz ]; then curl -s 
-k -L -O 
https://github.com/Rblp/blp/raw/master/headers/windows/blpHeaders.tar.gz; mv 
blpHeaders.tar.gz ../blp/win/${FLV}; tar xfz 
../blp/win/${FLV}/blpHeaders.tar.gz -C ../inst; fi
@if [ ! -f ../blp/win/${FLV}/blpLibrary.tar.gz ]; then curl -s 
-k -L -O https://github.com/Rblp/blp/raw/master/win${WIN}/blpLibrary.tar.gz; mv 
blpLibrary.tar.gz ../blp/win/${FLV}; tar xfz 
../blp/win/${FLV}/blpLibrary.tar.gz; fi
@if [ ! -d ${FLV} ]; then mkdir -p ${FLV}; fi
@cp blpapi3_${WIN}.dll ${FLV}
@if [ ! -d ../inst/libs/${FLV} ]; then mkdir -p 
../inst/libs/${FLV}; fi
@cp blpapi3_${WIN}.dll ../inst/libs/${FLV}

## Ensure the blpLibrary target is always executed
.Phony: blpLibrary

-

Hth,  Dirk


-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


Re: [R-pkg-devel] Fwd: R-package-devel@R-project.org: RANDR

2017-01-24 Thread Dirk Eddelbuettel

On 24 January 2017 at 15:11, Cathy Lee Gierke wrote:
| I'm cleaning up the problems in my build, but there are a few I do not
| understand, like this one.  What is this telling me?
| 
| 
| 
| * checking for unstated dependencies in examples ...Warning in grep("^Xlib:
| *extension \"RANDR\" missing on display", out, invert = TRUE,  :
| 
|   input string 4 is invalid in this locale
| 
| Error in grep("^Xlib: *extension \"RANDR\" missing on display", out, invert
| = TRUE,  :
| 
|   attempt to set index 4/4 in SET_STRING_ELT
| 
| Execution halted
| 
| 
| ​Thank you for your assistance,

Those are X11 error messages. How are your running your test? Anything
unusual like a remote connection suppressing display extension such as RANDR
which are usually available at the workstation itself.

In any case, this may have nothing to do with you package per se but as did
not share code or how you ran the tests it is hard to say more.

Best, Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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

Re: [R-pkg-devel] Fwd: R-package-devel@R-project.org: RANDR

2017-01-24 Thread Cathy Lee Gierke
Thank you Dirk.

When you say test, I think you mean the examples in the documentation.
Which I likely do have wrong, because I'm not sure how to make a data file
available to the example. but that may be a different issue.

I don't know what RANDR is.  I am opening several alternate output files:
 pdf, rtf txt.  Would that impact it?  Here is the example call to my
package, if that helps:

 \examples{
  #-   Vignette3  visualization

  filePath<-"~/file/path/Installing CAT/Vignette3"
 # use for mac
  #filePath<-"c:\\file\\path\\Installing CAT\\Vignette3"
  # use for PC
  fileName<-file.path(filePath,'activity stress c57--stress
copy2-part.txt')
  file2Name<-file.path(filePath,'good-6d-2m-part.txt')

  CatCall(TimeCol=c(1,2), timeFormat=“\%d/\%m/\%y
\%H:\%M:\%S”,lum=NA, valCols=5, sumCols=c(), Avg=FALSE, export=TRUE,
sizePts=2, binPts=1, Span = 0, Increment=0, k=5, yLab=NA, modulo=1440,
Rverbose=0, RmaxGap=3000, Skip=0, header=TRUE, Smoothing=T,
Actogram=T,AutoCorr=T,CrossCorr=T,Console=F,Graphics="pdf", Darkness1=0,
LagPcnt=1, tz="GMT",
fileName=fileName,file2=list(Name=file2Name,TimeCol=c(1,2),
timeFormat="\%d/\%m/\%y \%H:\%M:\%S", lum=NA, valCols=5,
sumCols=c(),sizePts=2, binPts=1,Darkness=0))
  }

Can I tell you anything that would be more helpful?

Cathy Lee Gierke


*“Darkness cannot drive out darkness: only light can do that. Hate cannot
drive out hate: only love can do that.” *
*“The arc of the moral universe is long, but it bends towards justice.”*
*“Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity.” *
*“Never forget that everything Hitler did in Germany was legal.”   *
*“Forgiveness is not an occasional act, it is a constant attitude.” *
*“Injustice anywhere is a threat to justice everywhere.”  *

― Martin Luther King Jr.



On Tue, Jan 24, 2017 at 4:28 PM, Dirk Eddelbuettel  wrote:

>
> On 24 January 2017 at 15:11, Cathy Lee Gierke wrote:
> | I'm cleaning up the problems in my build, but there are a few I do not
> | understand, like this one.  What is this telling me?
> |
> | 
> |
> | * checking for unstated dependencies in examples ...Warning in
> grep("^Xlib:
> | *extension \"RANDR\" missing on display", out, invert = TRUE,  :
> |
> |   input string 4 is invalid in this locale
> |
> | Error in grep("^Xlib: *extension \"RANDR\" missing on display", out,
> invert
> | = TRUE,  :
> |
> |   attempt to set index 4/4 in SET_STRING_ELT
> |
> | Execution halted
> |
> | 
> | ​Thank you for your assistance,
>
> Those are X11 error messages. How are your running your test? Anything
> unusual like a remote connection suppressing display extension such as
> RANDR
> which are usually available at the workstation itself.
>
> In any case, this may have nothing to do with you package per se but as did
> not share code or how you ran the tests it is hard to say more.
>
> Best, Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

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

Re: [R-pkg-devel] Fwd: R-package-devel@R-project.org: RANDR

2017-01-24 Thread Roy Mendelssohn - NOAA Federal
Hi Cathy:
> On Jan 24, 2017, at 2:41 PM, Cathy Lee Gierke  wrote:
> 
> Which I likely do have wrong, because I'm not sure how to make a data file
> available to the example. but that may be a different issue.

See:

http://r-pkgs.had.co.nz/data.html

In fact read through the entire thing.  it will make you like much easier if 
and when you go to submit your package.

-Roy


**
"The contents of this message do not reflect any position of the U.S. 
Government or NOAA."
**
Roy Mendelssohn
Supervisory Operations Research Analyst
NOAA/NMFS
Environmental Research Division
Southwest Fisheries Science Center
***Note new street address***
110 McAllister Way
Santa Cruz, CA 95060
Phone: (831)-420-3666
Fax: (831) 420-3980
e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/

"Old age and treachery will overcome youth and skill."
"From those who have been given much, much will be expected" 
"the arc of the moral universe is long, but it bends toward justice" -MLK Jr.

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