Re: [Rd] core Matrix package segfaulted on R CMD check --use-gct

2011-03-28 Thread Douglas Bates
Can you provide the output from

sessionInfo()

so we can know the platform?  Also, did you configure R with
--enable-strict-barrier or set the C compilation flag
-DTESTING_WRITE_BARRIER?  I think that run-time error message can only
be thrown under those circumstances (not that it isn't an error, it's
just not checked for in other circumstances).

On Sat, Mar 26, 2011 at 5:21 PM, Hin-Tak Leung  wrote:
> Current core/Recommended Matrix package (0.999375-48) has been segfaulting 
> against R 2.13-alpha/2.14-trunk for the last week or so (since R-2.13 was 
> branched, when I started trying) when "run with R CMD check --use-gct":
>
> --
>> pkgname <- "Matrix"
>> source(file.path(R.home("share"), "R", "examples-header.R"))
>> gctorture(TRUE)
>> options(warn = 1)
>> library('Matrix')
> Loading required package: lattice
> Error : .onLoad failed in loadNamespace() for 'Matrix', details:
>  call: fun(...)
>  error: unprotected object (0x2768b18) encountered (was REALSXP)
> Error: package/namespace load failed for 'Matrix'
> Execution halted
> ---
>
> I traced to this because "R CMD check --use-gct snpStats" (both 1.1.13 and 
> 1.1.12) segfaults with the same message, and before that, the snpMatrix 
> 1.15.8.4 which includes some of David's newly written ld() ( which depends on 
> Matrix.)
>
> If the Matrix package segfaults, David's new ld() isn't useable.
>
>

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


Re: [Rd] core Matrix package segfaulted on R CMD check --use-gct

2011-03-28 Thread Martin Maechler
> Douglas Bates 
> on Mon, 28 Mar 2011 09:24:39 -0500 writes:

> Can you provide the output from sessionInfo()

> so we can know the platform?  Also, did you configure R
> with --enable-strict-barrier or set the C compilation flag
> -DTESTING_WRITE_BARRIER?  I think that run-time error
> message can only be thrown under those circumstances (not
> that it isn't an error, it's just not checked for in other
> circumstances).

interesting.

In the mean time, I *did* run --- for several hours! ---
your code example below,
and it did *not* segfault for me (64-bit, Linux Fedora 13).

Martin

> Douglas Bates 
> on Mon, 28 Mar 2011 09:24:39 -0500 writes:

> Can you provide the output from
> sessionInfo()

> so we can know the platform?  Also, did you configure R with
> --enable-strict-barrier or set the C compilation flag
> -DTESTING_WRITE_BARRIER?  I think that run-time error message can only
> be thrown under those circumstances (not that it isn't an error, it's
> just not checked for in other circumstances).

> On Sat, Mar 26, 2011 at 5:21 PM, Hin-Tak Leung  
wrote:
>> Current core/Recommended Matrix package (0.999375-48) has been 
segfaulting against R 2.13-alpha/2.14-trunk for the last week or so (since 
R-2.13 was branched, when I started trying) when "run with R CMD check 
--use-gct":
>> 
>> --
>>> pkgname <- "Matrix"
>>> source(file.path(R.home("share"), "R", "examples-header.R"))
>>> gctorture(TRUE)
>>> options(warn = 1)
>>> library('Matrix')
>> Loading required package: lattice
>> Error : .onLoad failed in loadNamespace() for 'Matrix', details:
>>  call: fun(...)
>>  error: unprotected object (0x2768b18) encountered (was REALSXP)
>> Error: package/namespace load failed for 'Matrix'
>> Execution halted
>> ---
>> 
>> I traced to this because "R CMD check --use-gct snpStats" (both 1.1.13 
and 1.1.12) segfaults with the same message, and before that, the snpMatrix 
1.15.8.4 which includes some of David's newly written ld() ( which depends on 
Matrix.)
>> 
>> If the Matrix package segfaults, David's new ld() isn't useable.
>> 
>>

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


Re: [Rd] unique.matrix issue [Was: Anomaly with unique and match]

2011-03-28 Thread jochen laubrock
Still, from a user's perspective this behavior is somewhat irritating. Wouldn't 
it be better to rewrite unique.matrix to use formatC or sprintf instead of 
as.character, on which paste in line 9 implicitly relies, at least in R version 
2.12.2  (2011-02-25)?

For example, use

temp <- apply(x, MARGIN, formatC, digits=324, format="f")

instead of

temp <- apply(x, MARGIN, function(x) paste(x, collapse = "\r"))

Don't know whether this affects performance, though.

Sorry to chime in late. 
Cheers, 
Jochen


> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8


On Mar 9, 2011, at 20:11 , Simon Urbanek wrote:

> match() is a red herring here -- it is really a very specific thing that has 
> to do with the fact that you're running unique() on a matrix. Also it's much 
> easier to reproduce:
> 
>> x=c(1,1+0.2e-15)
>> x
> [1] 1 1
>> sprintf("%a",x)
> [1] "0x1p+0"   "0x1.1p+0"
>> unique(x)
> [1] 1 1
>> sprintf("%a",unique(x))
> [1] "0x1p+0"   "0x1.1p+0"
>> unique(matrix(x,2))
> [,1]
> [1,]1
> 
> and this comes from the fact that unique.matrix uses string representation 
> since it has to take into account all values of a row/column so it pastes all 
> values into one string, but for the two numbers that is the same:
>> as.character(x)
> [1] "1" "1"
> 
> Cheers,
> Simon
> 
> 
> On Mar 9, 2011, at 9:48 AM, Terry Therneau wrote:
> 
>> I stumbled onto this working on an update to coxph.  The last 6 lines
>> below are the question, the rest create a test data set.
>> 
>> tmt585% R
>> R version 2.12.2 (2011-02-25)
>> Copyright (C) 2011 The R Foundation for Statistical Computing
>> ISBN 3-900051-07-0
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>> 
>> # Lines of code from survival/tests/singtest.R
>>> library(survival)
>> Loading required package: splines
>>> test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
>> + status=c(1,NA,1,0,1,1,0),
>> + x= c(0, 2,1,1,1,0,0))
>>> 
>>> temp <- rep(0:3, rep(7,4))
>>> 
>>> stest <- data.frame(start  = 10*temp,
>> + stop   = 10*temp + test1$time,
>> + status = rep(test1$status,4),
>> + x  = c(test1$x+ 1:7, rep(test1$x,3)),
>> + epoch  = rep(1:4, rep(7,4)))
>>> 
>>> fit1 <- coxph(Surv(start, stop, status) ~ x * factor(epoch), stest)
>> 
>> ## New lines
>>> temp1 <- fit1$linear.predictor
>>> temp2 <- as.matrix(temp1)
>>> match(temp1, unique(temp1))
>> [1] 1 2 3 4 4 5 6 7 7 7 6 6 6 8 8 8 6 6 6 9 9 9 6 6
>>> match(temp2, unique(temp2))
>> [1]  1  2  3  4  4  5  6  7  7  7  6  6  6 NA NA NA  6  6  6  8  8  8
>> 6  6
>> 
>> ---
>> 
>> I've solved it for my code by not calling match on a 1 column vector.  
>> In general, however, should I be using some other paradym for this "map
>> to unique" operation?  For example match(as.character(x),
>> unique(as.character(x)) ?
>> 
>> Terry T
>> 
>> __
>> 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

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


Re: [Rd] Testing window for R 2.13.0

2011-03-28 Thread Matt Shotwell

Some very minor things:

- typo R-admin manual, section 2.8, fourth sentence beginning "This will 
find build...", should read "This will build..."?


- typo in src/library/compiler/man/compile.Rd, line 35: 
"\item{ascii}{logical; should the compiled file be saved with in ascii" 
should read "...saved in ascii..."?


My build and test was successful (on a very common platform 
x86-64/Ubuntu). Typescript here:

http://biostatmatt.com/temp/R-alpha-r54865-build-test.html

Cheers to another release,
Matt

On 03/18/2011 04:22 PM, Prof Brian Ripley wrote:

We are now starting testing R 2.13.0/alpba/beta/RC and testing and
feedback would be appreciated (whereas reports on problems immediately
after release will try our patience).

Sources are available at
http://cran.r-project.org/src/base-prerelease/
Windows binaries at
http://cran.r-project.org/bin/windows/base/rtest.html
and Mac binaries at http://r.research.att.com/, specifically
http://r.research.att.com/R-2.13-branch-leopard.pkg
(and it is best to use the CRAN master rather than mirrors which will
lag behind).

Please report (success as well as failure except on the most common
platforms) here, r-wind...@r-project.org or r-sig-...@r-project.org. We
probably have good coverage of Debian/Fedora i686/x86_64 Linux, Mac OS
X, Windows, Solaris and x86_64 FreeBSD 8.2: reports on other platforms
would be particularly welcome.

There have been a number of confused postings about 64-bit R on Solaris:
the R-admin manual in this version contains detailed instructions on
what works for us (Solaris Studio 12.2 and 12u1, and gcc4 on Sparc) and
what doesn't (gcc on amd64) and why.

Package maintainers should review the results for their packages at
http://cran.r-project.org/web/checks/check_summary.html
and submit updates if needed as soon as possible and definitely well
before April 13. That page is in the process of migration to R-prerel:
for now the most useful columns are r-devel (Fedora), r-devel (Windows,
really R-prerel) and the Solaris x86 column.

Brian Ripley (for the R-core team)




--
Matthew S Shotwell   Assistant Professor   School of Medicine
 Department of Biostatistics   Vanderbilt University

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


Re: [Rd] error in: testing if installed package can be loaded

2011-03-28 Thread Uwe Ligges



On 21.03.2011 18:01, Thomas Roth wrote:

hi,

I am preparing my package for R 2.13
build and check gives no warnings just OK's

However when running R CMD INSTALL it gives me (nfortunately it is in
german)





You can change to English by setting

set LANGUAGE=en

before running R CMD check.




** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Fehler: '\U' ohne Hex-Ziffern in der Zeichenkette beginnend mit "C:\U"
genutzt
Ausführung angehalten
Fehler: loading failed


Interesting. From which path are you testing. Using which command? 
What's the name of the package? Can we see the package? Do you have 
recent Rtools installed?


[Checking packages works on winbuilder with R-2.13.0 alpha for 64-bit 
Windows for all CRAN packages without such a message.]


Best,
Uwe Ligges




Is this the packages fault? because i wouldn't know where to look...

sessionInfo()  gives

R version 2.13.0 alpha (2011-03-17 r54849)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252
  LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252

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

other attached packages:
[1] qualityTools_1.41

loaded via a namespace (and not attached):
[1] tools_2.13.0

Best Whishes

Thomas Roth

[[alternative HTML version deleted]]




__
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] datalist and data objects in R Package building

2011-03-28 Thread Uwe Ligges



On 24.03.2011 16:51, andrew stewart wrote:

Hello all,

I have,say 4 R objects...  bar1, bar2, bar3, bar4.. that I'd like to include
in an R package "foobar".

The desired functionality would be:


library(foobar)
data(foo)
ls()

[1] "bar1" "bar2" "bar3" "bar4"

I've tried the following two approaches:

1) I created the file 'datalist' under pre-build directory 'foobar/data/'
with the following contents:
foo: bar1 bar2 bar3 bar4

After package build and install, "data(foo)" reports that data set 'foo' not
found (bar1, bar2, etc are all available individually, and are listed under
data() as "bar1 (foo)".



If you want just one object "foo", then prpare a list

foo <- list(bar1,...)

that contains the 4 objects bar1, ... .
You can load that objects and access the list components afterwards.

I think you misunderstood the data concept: You can save objects and 
load them if the package is installed. That's it.


Best,
Uwe Ligges




2) I created an image via save.image resulting in foo.rda (containing bar1,
bar2, etc).

data(foo) now loads bar1 - bar4, but 'foo' doesn't appear in the list of
available datasets displayed when trying to tab complete within data().


So my question is, what's the correct approach for what I'm trying to do
here?  Any advice welcome and appreciated.

Thanks,
Andrew

[[alternative HTML version deleted]]

__
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] datalist and data objects in R Package building

2011-03-28 Thread Uwe Ligges



On 28.03.2011 17:49, andrew stewart wrote:

Thank you for your response.

Yes, using a call to data() after 1) building and 2) installing my own
package is exactly what I'm trying to accomplish.  I am building a package.
  I would like to load the data objects that are part of the custom package
that I have created and installed on my machine.  Apologies if I wasn't
clear about that part.


Then just apply data() on all data names in your package or bundle the 
data in lists. If you want to load all data object all the time you load 
your package, I'd recommend to enable lazy loading of the data, so you 
do not need to explicitly load by data are loaded on demand.


Best,
Uwe Ligges





2011/3/28 Uwe Ligges




On 24.03.2011 16:51, andrew stewart wrote:


Hello all,

I have,say 4 R objects...  bar1, bar2, bar3, bar4.. that I'd like to
include
in an R package "foobar".

The desired functionality would be:

  library(foobar)

data(foo)
ls()


[1] "bar1" "bar2" "bar3" "bar4"

I've tried the following two approaches:

1) I created the file 'datalist' under pre-build directory 'foobar/data/'
with the following contents:
foo: bar1 bar2 bar3 bar4

After package build and install, "data(foo)" reports that data set 'foo'
not
found (bar1, bar2, etc are all available individually, and are listed
under
data() as "bar1 (foo)".




If you want just one object "foo", then prpare a list

foo<- list(bar1,...)

that contains the 4 objects bar1, ... .
You can load that objects and access the list components afterwards.

I think you misunderstood the data concept: You can save objects and load
them if the package is installed. That's it.

Best,
Uwe Ligges



  2) I created an image via save.image resulting in foo.rda (containing

bar1,
bar2, etc).

data(foo) now loads bar1 - bar4, but 'foo' doesn't appear in the list of
available datasets displayed when trying to tab complete within data().


So my question is, what's the correct approach for what I'm trying to do
here?  Any advice welcome and appreciated.

Thanks,
Andrew

[[alternative HTML version deleted]]

__
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] datalist and data objects in R Package building

2011-03-28 Thread andrew stewart
Thank you for your response.

Yes, using a call to data() after 1) building and 2) installing my own
package is exactly what I'm trying to accomplish.  I am building a package.
 I would like to load the data objects that are part of the custom package
that I have created and installed on my machine.  Apologies if I wasn't
clear about that part.


2011/3/28 Uwe Ligges 

>
>
> On 24.03.2011 16:51, andrew stewart wrote:
>
>> Hello all,
>>
>> I have,say 4 R objects...  bar1, bar2, bar3, bar4.. that I'd like to
>> include
>> in an R package "foobar".
>>
>> The desired functionality would be:
>>
>>  library(foobar)
>>> data(foo)
>>> ls()
>>>
>> [1] "bar1" "bar2" "bar3" "bar4"
>>
>> I've tried the following two approaches:
>>
>> 1) I created the file 'datalist' under pre-build directory 'foobar/data/'
>> with the following contents:
>> foo: bar1 bar2 bar3 bar4
>>
>> After package build and install, "data(foo)" reports that data set 'foo'
>> not
>> found (bar1, bar2, etc are all available individually, and are listed
>> under
>> data() as "bar1 (foo)".
>>
>
>
> If you want just one object "foo", then prpare a list
>
> foo <- list(bar1,...)
>
> that contains the 4 objects bar1, ... .
> You can load that objects and access the list components afterwards.
>
> I think you misunderstood the data concept: You can save objects and load
> them if the package is installed. That's it.
>
> Best,
> Uwe Ligges
>
>
>
>  2) I created an image via save.image resulting in foo.rda (containing
>> bar1,
>> bar2, etc).
>>
>> data(foo) now loads bar1 - bar4, but 'foo' doesn't appear in the list of
>> available datasets displayed when trying to tab complete within data().
>>
>>
>> So my question is, what's the correct approach for what I'm trying to do
>> here?  Any advice welcome and appreciated.
>>
>> Thanks,
>> Andrew
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>

[[alternative HTML version deleted]]

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


Re: [Rd] Testing window for R 2.13.0

2011-03-28 Thread peter dalgaard

On Mar 28, 2011, at 17:15 , Matt Shotwell wrote:

> - typo R-admin manual, section 2.8, fourth sentence beginning "This will find 
> build...", should read "This will build..."?
> 
> - typo in src/library/compiler/man/compile.Rd, line 35: 
> "\item{ascii}{logical; should the compiled file be saved with in ascii" 
> should read "...saved in ascii..."?

Fixed (twice, even. Luke got there before me.)

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd@cbs.dk  Priv: pda...@gmail.com

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


[Rd] Windows build not running on r-forge

2011-03-28 Thread S Ellison
Please forgive any mis-post, and do feel free to point me to a more
appropriate list if this isn't properly R-dev.

I have a package on R-forge that shows correct linux and other *nix
builds, but no windows build. The log for the patched version shows the
error below, which appears to be due to a lack of /src files, a problem
that does not halt the *nix builds.

The package contains no compiled code (src is intentionally empty).


Log as follows:
* installing to library 'R:/lib/R/CRAN/2.12'
* installing *source* package 'metRology' ...
** libs

*** arch - i386
Error in file.copy(Sys.glob("src/*"), ss, recursive = TRUE) : 
  no files to copy from
* removing 'R:/lib/R/CRAN/2.12/metRology'
Run time: 1.27 seconds.

Advice would be welcome on what I can do about it...?

Steve Ellison

***
This email and any attachments are confidential. Any use...{{dropped:8}}

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


Re: [Rd] Windows build not running on r-forge

2011-03-28 Thread S Ellison
Thanks for the advice; blindingly simple. I was foxed by the fact that
the R-forge linux 'builds' ran successfully with warning but not error.

Regret that I couldn't provide R version detail, but the problem was
the build at the r-forge end and not my own installed version of R; I
could only tell you what the R-forge log told me. 


Steve Ellison


>>> Prof Brian Ripley  28/03/2011 05:32 >>>
On Mon, 28 Mar 2011, S Ellison wrote:

> Please forgive any mis-post, and do feel free to point me to a more
> appropriate list if this isn't properly R-dev.
>
> I have a package on R-forge that shows correct linux and other *nix
> builds, but no windows build. The log for the patched version shows
the
> error below, which appears to be due to a lack of /src files, a
problem
> that does not halt the *nix builds.
>
> The package contains no compiled code (src is intentionally empty).
>
>
> Log as follows:
> * installing to library 'R:/lib/R/CRAN/2.12'
> * installing *source* package 'metRology' ...
> ** libs
>
> *** arch - i386
> Error in file.copy(Sys.glob("src/*"), ss, recursive = TRUE) :
>  no files to copy from
> * removing 'R:/lib/R/CRAN/2.12/metRology'
> Run time: 1.27 seconds.
>
> Advice would be welcome on what I can do about it...?

Don't have an empty 'src' directory: that is not a valid source 
package.

And please do tell us the version of R as per the posting guide.  I am

guessing 2.12.2 here.

>
> Steve Ellison
>
>
> ***
> This email and any attachments are confidential. Any\ ...{{dropped:24}}

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


[Rd] use scan("http://www.example.com/file.htm") with an hidden-fake IP adress

2011-03-28 Thread Arthur Charpentier
Dear users,
I am currently using scan(,what="character") to read - automacally - some
html pages,
I was wondering if there was an option to "hide" my IP-adress, or to use a
"fake" one ?
I would like to chek if the website is using my IP-adress to change the
content of the page (it is the price of airline tickets actually)
I want to see if it is possible to do a request with some fake IP, to
compare the prices,
thanks for your help

[[alternative HTML version deleted]]

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


Re: [Rd] use scan("http://www.example.com/file.htm") with an hidden-fake IP adress

2011-03-28 Thread Simon Urbanek

On Mar 28, 2011, at 2:24 PM, Arthur Charpentier wrote:

> Dear users,
> I am currently using scan(,what="character") to read - automacally - some
> html pages,
> I was wondering if there was an option to "hide" my IP-adress, or to use a
> "fake" one ?
> I would like to chek if the website is using my IP-adress to change the
> content of the page (it is the price of airline tickets actually)
> I want to see if it is possible to do a request with some fake IP, to
> compare the prices,
> thanks for your help
> 

You can't really change the IP address since that is where the server sends the 
result. That's why your request packet has your IP so the response can be 
delivered back to you. Obviously, you won't get anything if the IP doesn't 
match. The only way to make requests to a server from a different IP is to use 
another machine that has a different IP (e.g., a proxy server).

Cheers,
Simon

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