[R] R Crashes with .C

2016-06-28 Thread David .
Hi everyone,


I'm a beginner in R and I'm trying to load a .dll file, named dll.dll, that's 
written in C, into R. It seems to work, now I want to use the functions that 
are stored in the .dll file and I encounter problems.

I've searched for a solution or other method in manuals, here and on google. 
Would be very thankful if I could get a suggestion of what to use or any idea!

My code:

setwd("C:/Users/MyUser/R")
dyn.load("dll.dll")
is.loaded("DLL_FUNK")
# For some reason True with capital letters, not in lower case
output <- .C("DLL_FUNK", in9 = as.integer(7))
#output # R Crashes before I can write this.
# R Crashes
# In outdata.txt: "in-value=   139375128"

The function should return a number, 1955. But I can't seem to get to that 
value. What am I doing wrong?

Update with code (Fortran runned as C), this is the code in dll.dll:

subroutine  dll_funk(in9)
implicit none

!+++
!***  Declarations: variables, functions
!+++
integer(4) :: in9
!integer :: in9


! Definitions of variables in the external function calls
!!dec$ attributes c,alias :'dll_funk' :: dll_funk
!dec$ attributes dllexport:: dll_funk
!dec$ attributes value:: in9

open(194,file='outdata.txt')
write(194,*) 'in-value=', in9
! in9 = 1955
close(194)

end subroutine
!end function

So now when it runs, R crashes but before it writes to my file (outdata.txt) 
but it't not my number, maybe some kind of address...

Another question, do you recommend me to run the code with .C and from C run 
the Fortran code or is it better to run it with .Fortran with only Fortran 
code? It seems like .Fortran have problem handling strings, or that's what I 
understood from: Interface func .C and 
.Fortran

Thanks for your time!

Best regards,
David



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes upon changing directories, loading files, etc.

2015-04-06 Thread Nicole Ford
Hello,

I am experiencing an issue, repeatedly, which began today.  

Example code:

load(file.choose())  ##sometimes it crashes here/ endless spinner/ other times 
I can get through.

or: i go up to options at the top to set wd, or select ‘file’ - ‘open’ and it 
will do the same thing.

I found a page where people were indicating they had this issue, but there was 
no one responding with a fix.  see below:

bugs.r-project.org/bugzilla/show_bug.cgi?id=14240


I am running :

R version 3.1.3 (2015-03-09) -- Smooth Sidewalk
Platform: x86_64-apple-darwin13.4.0 (64-bit)
On OS X 10.10

Any help/ direction is appreciated.

~Nicole
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] R crashes upon changing directories, loading files, etc.

2015-04-06 Thread Prof Brian Ripley
It seems this is not R but R.app (the separate project providing an OS X 
console: see the 'R Installation and Administration' manual).  If so, 
the only appropriate list is R-sig-Mac (see the posting guide).


On 06/04/2015 19:14, Nicole Ford wrote:

Hello,

I am experiencing an issue, repeatedly, which began today.

Example code:

load(file.choose())  ##sometimes it crashes here/ endless spinner/ other times 
I can get through.

or: i go up to options at the top to set wd, or select ‘file’ - ‘open’ and it 
will do the same thing.

I found a page where people were indicating they had this issue, but there was 
no one responding with a fix.  see below:

bugs.r-project.org/bugzilla/show_bug.cgi?id=14240


Which is about Windows in 2010, and does have a response.




I am running :

R version 3.1.3 (2015-03-09) -- Smooth Sidewalk
Platform: x86_64-apple-darwin13.4.0 (64-bit)
On OS X 10.10

Any help/ direction is appreciated.

~Nicole
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Re: [R] R crashes upon changing directories, loading files, etc.

2015-04-06 Thread peter dalgaard

 On 06 Apr 2015, at 22:17 , Prof Brian Ripley rip...@stats.ox.ac.uk wrote:
 
 Nicole Ford wrote:

[snip]
 
 I found a page where people were indicating they had this issue, but there 
 was no one responding with a fix.  see below:
 
 bugs.r-project.org/bugzilla/show_bug.cgi?id=14240
 
 Which is about Windows in 2010, and does have a response.

It might be noted, though, that this is not the first report from someone 
having this sort of issue on Yosemite. See e.g. Christopher Swan's note from 
April 4 on R-sig-Mac.

(This sort of issue tends to be slow to fix. We need to have a developer who 
can reproduce the issue _and_ is capable of debugging Mac GUI code.)

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

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes upon changing directories, loading files, etc.

2015-04-06 Thread Nicole Ford
Yes, it definitely is the GUI as it works just fine when I load data using a 
file path.  I can work around it, thankfully, but it would be great if this 
issue could be fixed.  I suspected Yosemite as it's given me multiple problems 
since install.

Thanks for the input.  Hopefully someone with that skill set might see this and 
the other thread you mentioned. 

~Nicole



Sent from my iPhone

 On Apr 6, 2015, at 5:26 PM, peter dalgaard pda...@gmail.com wrote:
 
 
 On 06 Apr 2015, at 22:17 , Prof Brian Ripley rip...@stats.ox.ac.uk wrote:
 
 Nicole Ford wrote:
 
 [snip]
 
 I found a page where people were indicating they had this issue, but there 
 was no one responding with a fix.  see below:
 
 bugs.r-project.org/bugzilla/show_bug.cgi?id=14240
 
 Which is about Windows in 2010, and does have a response.
 
 It might be noted, though, that this is not the first report from someone 
 having this sort of issue on Yosemite. See e.g. Christopher Swan's note from 
 April 4 on R-sig-Mac.
 
 (This sort of issue tends to be slow to fix. We need to have a developer who 
 can reproduce the issue _and_ is capable of debugging Mac GUI code.)
 
 -- 
 Peter Dalgaard, Professor,
 Center for Statistics, Copenhagen Business School
 Solbjerg Plads 3, 2000 Frederiksberg, Denmark
 Phone: (+45)38153501
 Email: pd@cbs.dk  Priv: pda...@gmail.com
 
 
 
 
 
 
 
 

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when I run rgeos::gDistance

2015-03-03 Thread Roger Bivand
Adrian Torchiana adrian.torchiana at gmail.com writes:

 
 Hi,
 
 This is my first post to R-help.  I'm having trouble getting rgeos to work.

R-help is arguably too general to help, please ask questions of this kind on
R-sig-geo.

 
 Info on the server and packages I'm using:
 
...
 $ *rpm -qa | grep geos*
 geos-devel-3.4.2-1.rhel6.x86_64
 geos-3.4.2-1.rhel6.x86_64
 

How did you install rgeos (from source)? Are other versions of GEOS present
not installed as RPMs?

...
 $ *R -q*
  *library(rgeos)*
 rgeos version: 0.3-8, (SVN revision 460)
  GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921
  Polygon checking: TRUE
 
  *example(gDistance)*
 
 gDstnc pt1 = readWKT(POINT(0.5 0.5))
 
 gDstnc pt2 = readWKT(POINT(2 2))
 
 gDstnc p1 = readWKT(POLYGON((0 0,1 0,1 1,0 1,0 0)))
 
 gDstnc p2 = readWKT(POLYGON((2 0,3 1,4 0,2 0)))
 
 gDstnc gDistance(pt1,pt2)
 R: GeometryComponentFilter.cpp:34: virtual void
 geos::geom::GeometryComponentFilter::filter_ro(const
 geos::geom::Geometry*): Assertion `0' failed.
 Aborted (core dumped)

rgeos is tested regularly and frequently, so the issue here is on your
platform, I'm afraid.

 
 I'd like to be able to use the gDistance function.  What should I do to fix
 this?

The simplest way is to install GEOS from source, because you avoid relying
on upstream packaging. This will however interfere with other software that
may depend on your existing GEOS. 

 
 Please let me know if any additional information would be helpful.
 
 Thank you for your time,
 
 Adrian
 
   [[alternative HTML version deleted]]
 

Please do not post HTML.

Roger



__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes when I run rgeos::gDistance

2015-03-02 Thread Adrian Torchiana
Hi,

This is my first post to R-help.  I'm having trouble getting rgeos to work.

Info on the server and packages I'm using:

$ *uname -a*
Linux some-server.somewhere.com 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar
25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ *R --version*
R version 3.0.2 (2013-09-25) -- Frisbee Sailing
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)

$ *lsb_release -a*
LSB Version:
:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final

$ *rpm -qa | grep geos*
geos-devel-3.4.2-1.rhel6.x86_64
geos-3.4.2-1.rhel6.x86_64

$ *rpm -qa | grep gdal*
gdal-1.9.2-6.rhel6.x86_64
gdal-libs-1.9.2-6.rhel6.x86_64
gdal-devel-1.9.2-6.rhel6.x86_64
gdal-java-1.9.2-6.rhel6.x86_64

$ *R -q*
 *library(rgeos)*
rgeos version: 0.3-8, (SVN revision 460)
 GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921
 Polygon checking: TRUE

 *example(gDistance)*

gDstnc pt1 = readWKT(POINT(0.5 0.5))

gDstnc pt2 = readWKT(POINT(2 2))

gDstnc p1 = readWKT(POLYGON((0 0,1 0,1 1,0 1,0 0)))

gDstnc p2 = readWKT(POLYGON((2 0,3 1,4 0,2 0)))

gDstnc gDistance(pt1,pt2)
R: GeometryComponentFilter.cpp:34: virtual void
geos::geom::GeometryComponentFilter::filter_ro(const
geos::geom::Geometry*): Assertion `0' failed.
Aborted (core dumped)


I'd like to be able to use the gDistance function.  What should I do to fix
this?

Please let me know if any additional information would be helpful.

Thank you for your time,

Adrian

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes with Error in UseMethod(depth) when resizing ggplot windows

2015-02-24 Thread Eike Petersen
Hello everyone,

Quite frequently I encounter crashes when resizing ggplot windows. The
error message is always as follows:

 Error in UseMethod(depth) :
  no applicable method for 'depth' applied to an object of class NULL

 Process R exited abnormally with code 255 at Tue Feb 24 21:51:18 2015

The error seems to occur rather unpredictably when I do several
resizings, e.g. moving a plot window from one monitor to another using
Windows+Arrow Key several times. It only seems to happen when plotting
rather large data frames.

I was about to file this as a ggplot2 issue, but then I realized that I
can't reproduce it using RStudio - normally, I use emacs/ESS (on Windows
7). So maybe this is a bug related to the plot engine...? The problem
is that I can't even do a traceback(), since R is crashed.

How should I proceed? Are there any other options to retrieve valuable
debug information?

Kind regards,
Eike

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with Error in UseMethod(depth) when resizing ggplot windows

2015-02-24 Thread Duncan Murdoch
On 24/02/2015 4:13 PM, Eike Petersen wrote:
 Hello everyone,
 
 Quite frequently I encounter crashes when resizing ggplot windows. The
 error message is always as follows:
 
 Error in UseMethod(depth) :
  no applicable method for 'depth' applied to an object of class NULL

 Process R exited abnormally with code 255 at Tue Feb 24 21:51:18 2015
 
 The error seems to occur rather unpredictably when I do several
 resizings, e.g. moving a plot window from one monitor to another using
 Windows+Arrow Key several times. It only seems to happen when plotting
 rather large data frames.
 
 I was about to file this as a ggplot2 issue, but then I realized that I
 can't reproduce it using RStudio - normally, I use emacs/ESS (on Windows
 7). So maybe this is a bug related to the plot engine...? The problem
 is that I can't even do a traceback(), since R is crashed.
 
 How should I proceed? Are there any other options to retrieve valuable
 debug information?

It's not easy, but you can run R under a debugger, and it will show you
the location of the crash.  As far as I know only gdb supports debugging
R on Windows (there's a copy in the Rtools collection), but perhaps that
will change now that Microsoft has purchased Revolution Analytics.

Duncan Murdoch

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-04 Thread Milan Bouchet-Valat
Le vendredi 03 janvier 2014 à 22:40 +0200, Xebar Saram a écrit :
 Hi again and thank you all for the answers
 
 i need to add that im a relatively R neewb so i apologize in advance
 
 i started R with the --vanilla option and ran gc()
 
 this is the output i get:
 
  gc()
  used (Mb) gc trigger (Mb) max used (Mb)
 Ncells 182236  9.8 407500 21.8   35 18.7
 Vcells 277896  2.2 786432  6.0   785897  6.0
 
 also this is the memory.profile()
 
  memory.profile()
NULL  symbolpairlist closure environment promise
   15611   866952277 3144175
language special builtinchar logical integer
   21636  44 63763614574   11089
  double complex   character ... anylist
 782   1   20934   0   08023
  expressionbytecode externalptr weakref raw  S4
   162711272 364 365 831
 
 
 im running on linux (arch linux) and 'free' shows this:
 
 
 zeltak@zuni ~ ↳ free -h
  total   used   free sharedbuffers cached
 Mem:  251G99G   152G66G   249M84G
 -/+ buffers/cache:14G   237G
 Swap:   0B 0B 0B
 
 im not running any parrallel stuff at all
 
 milan: how does one know if the  memory is fragmented?
AFAIK you cannot. One thing you can do is compare the report from gc()
to was the Linux top command says about the actual memory used by the R
process (see the RES column, hit '' three times to sort on it).

But are you saying that with the situation you describe above (i.e. 152G
of free RAM), you get errors about memory allocation?


Regards

 thank you all again i really appreciate the help
 
 best
 
 Z
 
 
 
 On Thu, Jan 2, 2014 at 10:35 PM, Ben Bolker bbol...@gmail.com wrote:
 
  Xebar Saram zeltakc at gmail.com writes:
 
  
   Hi All,
  
   I have a terrible issue i cant seem to debug which is halting my work
   completely. I have R 3.02 installed on a linux machine (arch
  linux-latest)
   which I built specifically for running high memory use models. the system
   is a 16 core, 256 GB RAM machine. it worked well at the start but in the
   recent days i keep getting errors and crashes regarding memory use, such
  as
   cannot create vector size of XXX, not enough memory etc
  
   when looking at top (linux system monitor) i see i barley scrape the 60
  GB
   of ram (out of 256GB)
  
   i really don't know how to debug this and my whole work is halted due to
   this so any help would be greatly appreciated
 
I'm very sympathetic, but it will be almost impossible to debug
  this sort of a problem remotely, without a reproducible example.
  The only guess that I can make, if you *really* are running *exactly*
  the same code as you previously ran successfully, is that you might
  have some very large objects hidden away in a saved workspace in a
  .RData file that's being loaded automatically ...
 
I would check whether gc(), memory.profile(), etc. give sensible results
  in a clean R session (R --vanilla).
 
Ben Bolker
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
  http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-03 Thread Xebar Saram
Hi again and thank you all for the answers

i need to add that im a relatively R neewb so i apologize in advance

i started R with the --vanilla option and ran gc()

this is the output i get:

 gc()
 used (Mb) gc trigger (Mb) max used (Mb)
Ncells 182236  9.8 407500 21.8   35 18.7
Vcells 277896  2.2 786432  6.0   785897  6.0

also this is the memory.profile()

 memory.profile()
   NULL  symbolpairlist closure environment promise
  15611   866952277 3144175
   language special builtinchar logical integer
  21636  44 63763614574   11089
 double complex   character ... anylist
782   1   20934   0   08023
 expressionbytecode externalptr weakref raw  S4
  162711272 364 365 831


im running on linux (arch linux) and 'free' shows this:


zeltak@zuni ~ ↳ free -h
 total   used   free sharedbuffers cached
Mem:  251G99G   152G66G   249M84G
-/+ buffers/cache:14G   237G
Swap:   0B 0B 0B

im not running any parrallel stuff at all

milan: how does one know if the  memory is fragmented?

thank you all again i really appreciate the help

best

Z



On Thu, Jan 2, 2014 at 10:35 PM, Ben Bolker bbol...@gmail.com wrote:

 Xebar Saram zeltakc at gmail.com writes:

 
  Hi All,
 
  I have a terrible issue i cant seem to debug which is halting my work
  completely. I have R 3.02 installed on a linux machine (arch
 linux-latest)
  which I built specifically for running high memory use models. the system
  is a 16 core, 256 GB RAM machine. it worked well at the start but in the
  recent days i keep getting errors and crashes regarding memory use, such
 as
  cannot create vector size of XXX, not enough memory etc
 
  when looking at top (linux system monitor) i see i barley scrape the 60
 GB
  of ram (out of 256GB)
 
  i really don't know how to debug this and my whole work is halted due to
  this so any help would be greatly appreciated

   I'm very sympathetic, but it will be almost impossible to debug
 this sort of a problem remotely, without a reproducible example.
 The only guess that I can make, if you *really* are running *exactly*
 the same code as you previously ran successfully, is that you might
 have some very large objects hidden away in a saved workspace in a
 .RData file that's being loaded automatically ...

   I would check whether gc(), memory.profile(), etc. give sensible results
 in a clean R session (R --vanilla).

   Ben Bolker

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-03 Thread jim holtman
It would help to know the sizes of the objects that have in your
workspace and also provide the 10 prior lines of your script at the
point of the error so that we can see what you are trying to do.  The
following commands will list out the sizes of the objects:


cbind(sapply(ls(), function(x){
object.size(get(x))
}))

copy and paste it into the command line when the error occurs.

Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.


On Fri, Jan 3, 2014 at 3:40 PM, Xebar Saram zelt...@gmail.com wrote:
 Hi again and thank you all for the answers

 i need to add that im a relatively R neewb so i apologize in advance

 i started R with the --vanilla option and ran gc()

 this is the output i get:

 gc()
  used (Mb) gc trigger (Mb) max used (Mb)
 Ncells 182236  9.8 407500 21.8   35 18.7
 Vcells 277896  2.2 786432  6.0   785897  6.0

 also this is the memory.profile()

 memory.profile()
NULL  symbolpairlist closure environment promise
   15611   866952277 3144175
language special builtinchar logical integer
   21636  44 63763614574   11089
  double complex   character ... anylist
 782   1   20934   0   08023
  expressionbytecode externalptr weakref raw  S4
   162711272 364 365 831


 im running on linux (arch linux) and 'free' shows this:


 zeltak@zuni ~ ↳ free -h
  total   used   free sharedbuffers cached
 Mem:  251G99G   152G66G   249M84G
 -/+ buffers/cache:14G   237G
 Swap:   0B 0B 0B

 im not running any parrallel stuff at all

 milan: how does one know if the  memory is fragmented?

 thank you all again i really appreciate the help

 best

 Z



 On Thu, Jan 2, 2014 at 10:35 PM, Ben Bolker bbol...@gmail.com wrote:

 Xebar Saram zeltakc at gmail.com writes:

 
  Hi All,
 
  I have a terrible issue i cant seem to debug which is halting my work
  completely. I have R 3.02 installed on a linux machine (arch
 linux-latest)
  which I built specifically for running high memory use models. the system
  is a 16 core, 256 GB RAM machine. it worked well at the start but in the
  recent days i keep getting errors and crashes regarding memory use, such
 as
  cannot create vector size of XXX, not enough memory etc
 
  when looking at top (linux system monitor) i see i barley scrape the 60
 GB
  of ram (out of 256GB)
 
  i really don't know how to debug this and my whole work is halted due to
  this so any help would be greatly appreciated

   I'm very sympathetic, but it will be almost impossible to debug
 this sort of a problem remotely, without a reproducible example.
 The only guess that I can make, if you *really* are running *exactly*
 the same code as you previously ran successfully, is that you might
 have some very large objects hidden away in a saved workspace in a
 .RData file that's being loaded automatically ...

   I would check whether gc(), memory.profile(), etc. give sensible results
 in a clean R session (R --vanilla).

   Ben Bolker

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


 [[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-02 Thread Ben Bolker
Xebar Saram zeltakc at gmail.com writes:

 
 Hi All,
 
 I have a terrible issue i cant seem to debug which is halting my work
 completely. I have R 3.02 installed on a linux machine (arch linux-latest)
 which I built specifically for running high memory use models. the system
 is a 16 core, 256 GB RAM machine. it worked well at the start but in the
 recent days i keep getting errors and crashes regarding memory use, such as
 cannot create vector size of XXX, not enough memory etc
 
 when looking at top (linux system monitor) i see i barley scrape the 60 GB
 of ram (out of 256GB)
 
 i really don't know how to debug this and my whole work is halted due to
 this so any help would be greatly appreciated

  I'm very sympathetic, but it will be almost impossible to debug
this sort of a problem remotely, without a reproducible example.
The only guess that I can make, if you *really* are running *exactly*
the same code as you previously ran successfully, is that you might
have some very large objects hidden away in a saved workspace in a
.RData file that's being loaded automatically ...

  I would check whether gc(), memory.profile(), etc. give sensible results
in a clean R session (R --vanilla).

  Ben Bolker

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-02 Thread Max Kuhn
Describing the problem would help a lot more. For example, if you were
using some of the parallel processing options in R, this can make extra
copies of objects and drive memory usage up very quickly.

Max


On Thu, Jan 2, 2014 at 3:35 PM, Ben Bolker bbol...@gmail.com wrote:

 Xebar Saram zeltakc at gmail.com writes:

 
  Hi All,
 
  I have a terrible issue i cant seem to debug which is halting my work
  completely. I have R 3.02 installed on a linux machine (arch
 linux-latest)
  which I built specifically for running high memory use models. the system
  is a 16 core, 256 GB RAM machine. it worked well at the start but in the
  recent days i keep getting errors and crashes regarding memory use, such
 as
  cannot create vector size of XXX, not enough memory etc
 
  when looking at top (linux system monitor) i see i barley scrape the 60
 GB
  of ram (out of 256GB)
 
  i really don't know how to debug this and my whole work is halted due to
  this so any help would be greatly appreciated

   I'm very sympathetic, but it will be almost impossible to debug
 this sort of a problem remotely, without a reproducible example.
 The only guess that I can make, if you *really* are running *exactly*
 the same code as you previously ran successfully, is that you might
 have some very large objects hidden away in a saved workspace in a
 .RData file that's being loaded automatically ...

   I would check whether gc(), memory.profile(), etc. give sensible results
 in a clean R session (R --vanilla).

   Ben Bolker

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 

Max

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-02 Thread Milan Bouchet-Valat
Le jeudi 02 janvier 2014 à 09:07 +0200, Xebar Saram a écrit :
 Hi All,
 
 I have a terrible issue i cant seem to debug which is halting my work
 completely. I have R 3.02 installed on a linux machine (arch linux-latest)
 which I built specifically for running high memory use models. the system
 is a 16 core, 256 GB RAM machine. it worked well at the start but in the
 recent days i keep getting errors and crashes regarding memory use, such as
 cannot create vector size of XXX, not enough memory etc
 
 when looking at top (linux system monitor) i see i barley scrape the 60 GB
 of ram (out of 256GB)
 
 i really don't know how to debug this and my whole work is halted due to
 this so any help would be greatly appreciated
One important thing to note is that while the memory use may appear to
be low, if the memory is fragmented, R may not be able to allocate a
*contiguous* memory area for a big vector (you didn't tell us how big it
was). In that case, AFAIK the only solution is to restart R (saving the
session or objects you want to keep).


Regards

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes with memory errors on a 256GB machine (and system shoes only 60GB usage)

2014-01-01 Thread Xebar Saram
Hi All,

I have a terrible issue i cant seem to debug which is halting my work
completely. I have R 3.02 installed on a linux machine (arch linux-latest)
which I built specifically for running high memory use models. the system
is a 16 core, 256 GB RAM machine. it worked well at the start but in the
recent days i keep getting errors and crashes regarding memory use, such as
cannot create vector size of XXX, not enough memory etc

when looking at top (linux system monitor) i see i barley scrape the 60 GB
of ram (out of 256GB)

i really don't know how to debug this and my whole work is halted due to
this so any help would be greatly appreciated

Best wishes

Z

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes with kud-kernelUD(data, h=LSCV) script

2012-06-21 Thread Amanda Kuepfer
Hi, 

I am looking to perform a kernel density analysis in R, following the script 
that a friend of mine is using successfully. However, unlike for her, when I 
enter kud-kernelUD(data, h=LSCV), R crashes and closes every time. This 
does not happen when I perform a different kernel analysis 
(kud-kernelUD(data))..

I have tried to un-install and re-install R, but it still crashes..


The script I am using is as follows: 

library(adehabitatHR)
library(maptools)
data-read.csv(sa 4 trips 13F.csv)
xy = data[c(X, Y)]
id-data[,c(ID)]
coordinates(data) = c(X, Y) 
class(data) 

kud-kernelUD(data) # this works fine
kud-kernelUD(data, h=LSCV) # this causes R to crash


Any suggestions would be greatly appreciated.

Many thanks for your time, 

Kind regards,
-Amanda-
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with kud-kernelUD(data, h=LSCV) script

2012-06-21 Thread R. Michael Weylandt
Hi Amanda,

I can't reproduce this without your data set. Would it be possible for
you to give us dput(head(data, 20)) if you need further help?

Also, if you could supply the output of sessionInfo()? That's often
helpful for anything that crashes [that term means many things to
different people so if you could be more specific that'd be great as
well]

Finally, you may with to get in touch with the maintainer of the
adehabitatHR package directly. You can get contact info by typing
maintainer(adehabitatHR) at your prompt.

Best,
Michael

On Thu, Jun 21, 2012 at 6:25 AM, Amanda Kuepfer amandakuep...@yahoo.com wrote:
 Hi,

 I am looking to perform a kernel density analysis in R, following the script 
 that a friend of mine is using successfully. However, unlike for her, when I 
 enter kud-kernelUD(data, h=LSCV), R crashes and closes every time. This 
 does not happen when I perform a different kernel analysis 
 (kud-kernelUD(data))..

 I have tried to un-install and re-install R, but it still crashes..


 The script I am using is as follows:

 library(adehabitatHR)
 library(maptools)
 data-read.csv(sa 4 trips 13F.csv)
 xy = data[c(X, Y)]
 id-data[,c(ID)]
 coordinates(data) = c(X, Y)
 class(data)

 kud-kernelUD(data) # this works fine
 kud-kernelUD(data, h=LSCV) # this causes R to crash


 Any suggestions would be greatly appreciated.

 Many thanks for your time,

 Kind regards,
 -Amanda-
        [[alternative HTML version deleted]]


 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with kud-kernelUD(data, h=LSCV) script

2012-06-21 Thread Peter Ehlers

On 2012-06-21 04:25, Amanda Kuepfer wrote:

Hi,

I am looking to perform a kernel density analysis in R, following the script that a friend of mine is 
using successfully. However, unlike for her, when I enterkud-kernelUD(data, 
h=LSCV), R crashes and closes every time. This does not happen when I perform a different 
kernel analysis (kud-kernelUD(data))..

I have tried to un-install and re-install R, but it still crashes..


The script I am using is as follows:

library(adehabitatHR)
library(maptools)
data-read.csv(sa 4 trips 13F.csv)
xy = data[c(X, Y)]
id-data[,c(ID)]
coordinates(data) = c(X, Y)
class(data)

kud-kernelUD(data) # this works fine
kud-kernelUD(data, h=LSCV) # this causes R to crash


In both cases, shouldn't that be 'xy' instead of 'data'?
Presumably, your data.frame 'data' (bad name) contains
at least one more column ('ID'). Or why did you define
'xy' and then not use it?

Peter Ehlers




Any suggestions would be greatly appreciated.

Many thanks for your time,

Kind regards,
-Amanda-
[[alternative HTML version deleted]]


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes due to stats.dll

2012-03-20 Thread Kamil Bartoń

Dnia 2012-03-18 01:15, Ted Stankowich pisze:

Hello!
I've been running a looped AIC analysis using several modules including ape, 
nlme, and MuMIn, and
during one particularly long analysis, R (ver 2.14.12) crashes several minutes 
into the routine with
the simple message R for windows GUI front-end has stopped working. I'm using 
a brand new laptop
with Windows 7, i7 processor, 8GB RAM. I've tried it on both the 64 bit and 32 
bit versions of R.
Using the 64 bit version, the analysis makes it through a few iterations before 
it crashes (maybe
about 20-25 min into the test).

...

Does anyone have any idea what might be going wrong here?



I assume you're using MuMIn::dredge. If so, most likely the model fitting function with some 
combination of parameters causes the crash. You can use 'trace = TRUE' argument for 'dredge' to find 
out which model is it. To see the output after the crash, use either R in console (not RGUI) or 
divert the output to a file with 'sink'.


kamil

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes due to stats.dll

2012-03-18 Thread Ted Stankowich

Hello!
I've been running a looped AIC analysis using several modules including 
ape, nlme, and MuMIn, and during one particularly long analysis, R (ver 
2.14.12) crashes several minutes into the routine with the simple 
message R for windows GUI front-end has stopped working.  I'm using a 
brand new laptop with Windows 7, i7 processor, 8GB RAM.  I've tried it 
on both the 64 bit and 32 bit versions of R.  Using the 64 bit version, 
the analysis makes it through a few iterations before it crashes (maybe 
about 20-25 min into the test).


The event viewer provides this information every time it crashes:
Faulting application name: Rgui.exe, version: 2.142.58522.0, time stamp: 
0x4f4e7196
Faulting module name: stats.dll, version: 2.142.58522.0, time stamp: 
0x4f4e72c0

Exception code: 0xc005

Does anyone have any idea what might be going wrong here?

Thanks in advance!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes due to stats.dll

2012-03-18 Thread Uwe Ligges



On 18.03.2012 01:15, Ted Stankowich wrote:

Hello!
I've been running a looped AIC analysis using several modules including
ape, nlme, and MuMIn, and during one particularly long analysis, R (ver
2.14.12) crashes several minutes into the routine with the simple
message R for windows GUI front-end has stopped working. I'm using a
brand new laptop with Windows 7, i7 processor, 8GB RAM. I've tried it on
both the 64 bit and 32 bit versions of R. Using the 64 bit version, the
analysis makes it through a few iterations before it crashes (maybe
about 20-25 min into the test).

The event viewer provides this information every time it crashes:
Faulting application name: Rgui.exe, version: 2.142.58522.0, time stamp:
0x4f4e7196
Faulting module name: stats.dll, version: 2.142.58522.0, time stamp:
0x4f4e72c0
Exception code: 0xc005

Does anyone have any idea what might be going wrong here?


Not unless you specify a minimal reproducible example that causes the 
crash, preferrably without using contribted packages. Otherwise the 
reason for the crash may be caused by them.


Uwe Ligges




Thanks in advance!

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes due to stats.dll

2012-03-18 Thread Duncan Murdoch

On 12-03-17 8:15 PM, Ted Stankowich wrote:

Hello!
I've been running a looped AIC analysis using several modules including
ape, nlme, and MuMIn, and during one particularly long analysis, R (ver
2.14.12) crashes several minutes into the routine with the simple
message R for windows GUI front-end has stopped working.  I'm using a
brand new laptop with Windows 7, i7 processor, 8GB RAM.  I've tried it
on both the 64 bit and 32 bit versions of R.  Using the 64 bit version,
the analysis makes it through a few iterations before it crashes (maybe
about 20-25 min into the test).

The event viewer provides this information every time it crashes:
Faulting application name: Rgui.exe, version: 2.142.58522.0, time stamp:
0x4f4e7196
Faulting module name: stats.dll, version: 2.142.58522.0, time stamp:
0x4f4e72c0
Exception code: 0xc005

Does anyone have any idea what might be going wrong here?


Most likely some function is writing to memory it doesn't own.  This 
might be a bug in the stats package, but I would guess it is much more 
likely to be a bug in one of the other packages you used, and stats is 
crashing when it comes across the damage.


Debugging this sort of thing is quite hard in Windows:  you need to 
build R with debugging information and run it under a compatible version 
of a debugger (e.g. gdb).  I'd recommend trying the code on a Linux or 
MacOS system, where you will still need to make sure the debugger is 
installed, but you tend to get more informative messages from it.


Duncan Murdoch

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes when communicating with JAGS

2011-08-11 Thread David Wooff

There is a thread on this topic already:
http://finzi.psych.upenn.edu/Rhelp10/2010-August/250934.html

I'm rather mystified by a similar problem and wondering whether I've 
overlooked something obvious. I'm running with latest versions of R and 
all packages, and latest version of JAGS running under Windows 7.


Here's the problem. I have some source code. It's given below - standard 
stuff - seeds example from BUGS volume 1. I'm using R2WinBUGS only to 
create the model file, and R2jags as a front end to JAGS. I have the 
same problem whether or not I use R2jags.


1. If I start RGUI and source the code from a source file. R crashes 
when it tries to execute jags().


  Problem Event Name:   APPCRASH
  Application Name: Rgui.exe
  Application Version:  2.131.56322.0
  Application Timestamp:4e171fac
  Fault Module Name:StackHash_486a
  Fault Module Version: 6.1.7601.17514
  Fault Module Timestamp:   4ce7ba58
  Exception Code:   c374
  Exception Offset: 000ce653
  OS Version:   6.1.7601.2.1.0.768.3
  Locale ID:2057
  Additional Information 1: 486a
  Additional Information 2: 486a33f7a181da7ba2feae88b7ee12b6
  Additional Information 3: 9e02
  Additional Information 4: 9e02b3fab8ac2ab41c0e936dfef5c6d4

2. If I start RGUI and cut and paste the code from a source file. 
Everything works fine.


3. If, after (2) I source the code - and other examples from source 
files - everything works fine.


This seems to indicate that there is some kind of initialization which 
needs to happen before JAGS will work; that this initialization is 
carried out when typing commands into the console, but not carried out 
when sourcing identical commands from a source file.


I have tried delaying issuing the jags command when sourcing (using 
readline()) in case the issue was with readiness of the bugs model being 
written to file; but the crash still happens with any such delay.


I'd be most grateful for tips to circumvent this behaviour.

Cheers,

David

Here's the test code:
#---
   require(R2WinBUGS)
   require(rjags)
   require(R2jags)
   ## write model file:
   print(list.modules())
   write.model(con=blah.bug,model=function() {
  for( i in 1 : N ) {
 r[i] ~ dbin(p[i],n[i])
 b[i] ~ dnorm(0.0,tau)
 logit(p[i]) - alpha0 + alpha1 * x1[i] + alpha2 * x2[i] +
 alpha12 * x1[i] * x2[i] + b[i]
  }
  alpha0 ~ dnorm(0.0,1.0E-6)
  alpha1 ~ dnorm(0.0,1.0E-6)
  alpha2 ~ dnorm(0.0,1.0E-6)
  alpha12 ~ dnorm(0.0,1.0E-6)
  tau ~ dgamma(0.001,0.001)
  sigma - 1 / sqrt(tau)
   })
   g-jags(model.file='blah.bug',
  data = list(r = c(10, 23, 23, 26, 17, 5, 53, 55, 32, 46, 
10, 8, 10, 8, 23, 0, 3, 22, 15, 32, 3),
  n = c(39, 62, 81, 51, 39, 6, 74, 72, 51, 79, 13, 16, 30, 28, 45, 
4, 12, 41, 30, 51, 7),
  x1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 
1, 1),
  x2 = c(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 
1, 1),

  N = 21),
  parameters=c('alpha0', 'alpha1','alpha2','alpha12','tau'),
  inits=list(alpha0 = 0, alpha1 = 0, alpha2 = 0, alpha12 = 
0, tau = 1) ,

  n.iter=1)
#---


--
Dr David Wooff,
Director, Statistics and Mathematics Consultancy Unit,
 Senior Lecturer in Statistics, University of Durham.
Department of Mathematical Sciences, Science Laboratories,
South Road, Durham, DH1 3LE, UK. email: d.a.wo...@dur.ac.uk
Tel. 0191 334 3121, Fax 0191 334 3051.
Web: http://maths.dur.ac.uk/stats/people/daw/daw.html

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when communicating with JAGS

2011-08-11 Thread Uwe Ligges

Works for me with JAGS 3.1.0.

Uwe Ligges


On 11.08.2011 14:09, David Wooff wrote:

There is a thread on this topic already:
http://finzi.psych.upenn.edu/Rhelp10/2010-August/250934.html

I'm rather mystified by a similar problem and wondering whether I've
overlooked something obvious. I'm running with latest versions of R and
all packages, and latest version of JAGS running under Windows 7.

Here's the problem. I have some source code. It's given below - standard
stuff - seeds example from BUGS volume 1. I'm using R2WinBUGS only to
create the model file, and R2jags as a front end to JAGS. I have the
same problem whether or not I use R2jags.

1. If I start RGUI and source the code from a source file. R crashes
when it tries to execute jags().

Problem Event Name: APPCRASH
Application Name: Rgui.exe
Application Version: 2.131.56322.0
Application Timestamp: 4e171fac
Fault Module Name: StackHash_486a
Fault Module Version: 6.1.7601.17514
Fault Module Timestamp: 4ce7ba58
Exception Code: c374
Exception Offset: 000ce653
OS Version: 6.1.7601.2.1.0.768.3
Locale ID: 2057
Additional Information 1: 486a
Additional Information 2: 486a33f7a181da7ba2feae88b7ee12b6
Additional Information 3: 9e02
Additional Information 4: 9e02b3fab8ac2ab41c0e936dfef5c6d4

2. If I start RGUI and cut and paste the code from a source file.
Everything works fine.

3. If, after (2) I source the code - and other examples from source
files - everything works fine.

This seems to indicate that there is some kind of initialization which
needs to happen before JAGS will work; that this initialization is
carried out when typing commands into the console, but not carried out
when sourcing identical commands from a source file.

I have tried delaying issuing the jags command when sourcing (using
readline()) in case the issue was with readiness of the bugs model being
written to file; but the crash still happens with any such delay.

I'd be most grateful for tips to circumvent this behaviour.

Cheers,

David

Here's the test code:
#---
require(R2WinBUGS)
require(rjags)
require(R2jags)
## write model file:
print(list.modules())
write.model(con=blah.bug,model=function() {
for( i in 1 : N ) {
r[i] ~ dbin(p[i],n[i])
b[i] ~ dnorm(0.0,tau)
logit(p[i]) - alpha0 + alpha1 * x1[i] + alpha2 * x2[i] +
alpha12 * x1[i] * x2[i] + b[i]
}
alpha0 ~ dnorm(0.0,1.0E-6)
alpha1 ~ dnorm(0.0,1.0E-6)
alpha2 ~ dnorm(0.0,1.0E-6)
alpha12 ~ dnorm(0.0,1.0E-6)
tau ~ dgamma(0.001,0.001)
sigma - 1 / sqrt(tau)
})
g-jags(model.file='blah.bug',
data = list(r = c(10, 23, 23, 26, 17, 5, 53, 55, 32, 46, 10, 8, 10, 8,
23, 0, 3, 22, 15, 32, 3),
n = c(39, 62, 81, 51, 39, 6, 74, 72, 51, 79, 13, 16, 30, 28, 45, 4, 12,
41, 30, 51, 7),
x1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
x2 = c(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1),
N = 21),
parameters=c('alpha0', 'alpha1','alpha2','alpha12','tau'),
inits=list(alpha0 = 0, alpha1 = 0, alpha2 = 0, alpha12 = 0, tau = 1) ,
n.iter=1)
#---




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes with 'nlme' and corStruct

2011-06-20 Thread Andreea Borla
Hello,

I would like to fit correlation structures with nlme, but R crashes.

My data is similar to the growth of orange trees example from Pinheiro and
Bates (2000),
but data are not equally spaced in time, as the last observation is taken
after 6 days ( and not 2 as the others).
This is the code I'm using:

library(nlme)

DO-c(0.107,0.118,0.271,0.431,0.597,0.909,1.259,1.688,2.301,
0.107,0.150,0.200,0.325,0.425,0.641,0.860,1.329,1.780,
0.101,0.159,0.204,0.484,0.663,1.019,1.335,1.880,1.927)
mtime-rep(c(seq(1,15,2),21),3)
Subject-rep(1:3,each=9)
dataset-data.frame(DO=DO, mtime=mtime, Subject=Subject)

Joy - groupedData( DO ~ mtime | Subject, data = dataset)
m0-nlsList( DO ~ SSlogis(mtime, asym, xmid, scal), data = Joy)
m1.nlme-nlme(m0)
m3.nlme-update(m1.nlme,random=(asym~1), weights = varPower() )

 m4.nlme - update( m3.nlme, corr = corExp(form = ~ mtime) ) # R crashes
 m5.nlme - update( m3.nlme, corr = corRatio(form = ~ mtime) ) # R crashes
 m6.nlme - update( m3.nlme, corr = corSpher(form = ~ mtime) ) # R crashes
 m7.nlme - update( m3.nlme, corr = corLin(form = ~ mtime) ) # R crashes
 m8.nlme - update( m3.nlme, corr = corGaus(form = ~ mtime) ) # R crashes



*sessionInfo():*

R version 2.13.0 (2011-04-13)
Platform: i386-pc-mingw32/i386 (32-bit)

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

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

other attached packages:
[1] nlme_3.1-100svSocket_0.9-51 TinnR_1.0.3 R2HTML_2.2
Hmisc_3.8-3 survival_2.36-5

loaded via a namespace (and not attached):
[1] cluster_1.14.0  drc_2.1-4   grid_2.13.0 lattice_0.19-23
svMisc_0.9-61   tools_2.13.0

Thank you for your help,

Andreea Borla

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R Crashes when using large matrices (Ubuntu 11.04)

2011-06-04 Thread Prof Brian Ripley

On Fri, 3 Jun 2011, Matias Salibian-Barrera wrote:


Hello,

This simple SVD calculation (commands are copied immediately below) 
crashes on my Ubuntu machine (R 2.13.0). However it works fine on my 
Windows 7 machine, so I suspect there's a problem with (my?) Ubuntu 
and / or R. Can anybody else reproduce it (with Ubuntu 11.04)? 
Thanks in advance.



From the traceback, the error appears to be in LAPACK or BLAS.
There is no evidence here that 'R crashes' rather than one of those 
crashed R.


You don't tell us whether you compiled R yourself or used someone 
else's pre-compiled distribution -- if the latter, ask on r-sig-debian 
as this is most likely a problem with the distribution, since 
Debian/Ubuntu builds normally replace R's LAPACK/BLAS with that from 
the OS.


It works correctly on a vanilla R build on i686 Fedora 14.



p - 500
n - 300
set.seed(1234)
x - matrix(rnorm(n*p), n, p)
sih - var(x)
b - svd(sih)

produces:

 *** caught illegal operation ***
address 0x42b8c9, cause 'illegal operand'

Traceback:
 1: .Call(La_svd, jobu, jobv, x, double(min(n, p)), u, v, dgsedd, PACKAGE = 
base)
 2: La.svd(x, nu, nv)
 3: svd(sih)

I'm using Ubuntu 11.04 and

version

   _   
platform   i686-pc-linux-gnu   
arch   i686
os linux-gnu   
system i686, linux-gnu 
status 
major  2   
minor  13.0
year   2011
month  04  
day    13  
svn rev    55427   
language   R   
version.string R version 2.13.0 (2011-04-13)

Thanks,

Matias

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R Crashes when using large matrices (Ubuntu 11.04)

2011-06-04 Thread Prof. John C Nash
On Ubuntu 10.04 it ran fine, albeit in a machine with lots of memory, it seems 
to work
fine. Here's the output:
 rm(list=ls())
 gc()
 used (Mb) gc trigger (Mb) max used (Mb)
Ncells 131881  7.1 35 18.7   35 18.7
Vcells 128838  1.0 786432  6.0   559631  4.3
 p - 500
 n - 300
 set.seed(1234)
 x - matrix(rnorm(n*p), n, p)
 sih - var(x)
 b - svd(sih)

 gc()
  used (Mb) gc trigger (Mb) max used (Mb)
Ncells  133536  7.2 35 18.7   35 18.7
Vcells 1030006  7.92644909 20.2  2536523 19.4


 sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8   LC_NUMERIC=C
 [3] LC_TIME=en_US.utf8LC_COLLATE=en_US.utf8
 [5] LC_MONETARY=C LC_MESSAGES=en_US.utf8
 [7] LC_PAPER=en_US.utf8   LC_NAME=C
 [9] LC_ADDRESS=C  LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

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



Maybe another 11.04 glitch.

JN


On 06/04/2011 06:00 AM, r-help-requ...@r-project.org wrote:
 Message: 93
 Date: Fri, 3 Jun 2011 18:55:06 -0700 (PDT)
 From: Matias Salibian-Barrera msalib...@yahoo.ca
 To: R-help@r-project.org R-help@r-project.org
 Subject: [R] R Crashes when using large matrices (Ubuntu 11.04)
 Message-ID: 75655.88533...@web161614.mail.bf1.yahoo.com
 Content-Type: text/plain; charset=iso-8859-1
 
 
 This simple SVD calculation (commands are copied 
 immediately below) crashes on my Ubuntu machine (R 2.13.0). However it 
 works fine on my Windows 7 machine, so I suspect there's a problem with 
 (my?) Ubuntu and / or R. Can anybody else reproduce it (with Ubuntu 
 11.04)? Thanks in advance.
 
 p - 500
 n - 300
 set.seed(1234)
 x - matrix(rnorm(n*p), n, p)
 sih - var(x)
 b - svd(sih)


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R Crashes when using large matrices (Ubuntu 11.04)

2011-06-04 Thread Douglas Bates
On Fri, Jun 3, 2011 at 7:03 PM, Matias Salibian-Barrera
msalib...@yahoo.ca wrote:
 Hello,

 This simple SVD calculation (commands are copied immediately below) crashes 
 on my Ubuntu machine (R 2.13.0). However it works fine on my Windows 7 
 machine, so I suspect there's a problem with (my?) Ubuntu and / or R. Can 
 anybody else reproduce it (with Ubuntu 11.04)? Thanks in advance.

Works fine for me with Ubuntu 11.04 (amd_64) and the pre-compiled R-2.13.0
$ wajig list r-base-core
ii  r-base-core2.13.0-2natty0 GNU
R core of statistical computation and graphics system

 n - 300
 set.seed(1234)
 x - matrix(rnorm(n*p), n, p)
 sih - var(x)
 b - svd(sih)
 str(b)
List of 3
 $ d: num [1:500] 5.04 4.94 4.92 4.83 4.82 ...
 $ u: num [1:500, 1:500] -0.03663 0.05414 0.00182 -0.02847 -0.00117 ...
 $ v: num [1:500, 1:500] -0.03663 0.05414 0.00182 -0.02847 -0.00117 ...
 sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R Crashes when using large matrices (Ubuntu 11.04)

2011-06-03 Thread Matias Salibian-Barrera
Hello,

This simple SVD calculation (commands are copied immediately below) crashes on 
my Ubuntu machine (R 2.13.0). However it works fine on my Windows 7 machine, so 
I suspect there's a problem with (my?) Ubuntu and / or R. Can anybody else 
reproduce it (with Ubuntu 11.04)? Thanks in advance.

p - 500
n - 300
set.seed(1234)
x - matrix(rnorm(n*p), n, p)
sih - var(x)
b - svd(sih)

produces:

 *** caught illegal operation ***
address 0x42b8c9, cause 'illegal operand'

Traceback:
 1: .Call(La_svd, jobu, jobv, x, double(min(n, p)), u, v, dgsedd, 
PACKAGE = base)
 2: La.svd(x, nu, nv)
 3: svd(sih)

I'm using Ubuntu 11.04 and 
 version
   _    
platform   i686-pc-linux-gnu    
arch   i686 
os linux-gnu    
system i686, linux-gnu  
status  
major  2    
minor  13.0 
year   2011 
month  04   
day    13   
svn rev    55427    
language   R    
version.string R version 2.13.0 (2011-04-13)

Thanks,

Matias

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R Crashes when using large matrices (Ubuntu 11.04)

2011-06-03 Thread Matias Salibian-Barrera
Sorry for re-posting, but the original one ended up inside a previous and 
unrelated thread. -- Matias

-

Hello,

This simple SVD calculation (commands are copied 
immediately below) crashes on my Ubuntu machine (R 2.13.0). However it 
works fine on my Windows 7 machine, so I suspect there's a problem with 
(my?) Ubuntu and / or R. Can anybody else reproduce it (with Ubuntu 
11.04)? Thanks in advance.

p - 500
n - 300
set.seed(1234)
x - matrix(rnorm(n*p), n, p)
sih - var(x)
b - svd(sih)

produces:

 *** caught illegal operation ***
address 0x42b8c9, cause 'illegal operand'

Traceback:
 1: .Call(La_svd, jobu, jobv, x, double(min(n, p)), u, v, dgsedd, 
PACKAGE = base)
 2: La.svd(x, nu, nv)
 3: svd(sih)

I'm using Ubuntu 11.04 and 
 version
   _    
platform   i686-pc-linux-gnu    
arch   i686 
os linux-gnu    
system i686, linux-gnu  
status  
major  2    
minor  13.0 
year   2011 
month  04   
day    13   
svn rev    55427    
language   R    
version.string R version 2.13.0 (2011-04-13)

Thanks,

Matias

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-10-21 Thread ippopappo

Hi!

I have been using R for two years, but since last week I have a problem with
rgl, using R 2.12 on Ubuntu 10.04.
In fact, when I load rgl with library(), before any other command, I have
the following error message.

Could anybody help me?
Thanks in advance,
#
+ library(rgl)

 *** caught segfault ***
address 0x4, cause 'memory not mapped'

Traceback:
 1: .Call(rgl_init, initValue)
 2: rgl.init(initValue)
 3: fun(...)
 4: doTryCatch(return(expr), name, parentenv, handler)
 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6: tryCatchList(expr, classes, parentenv, handlers)
 7: tryCatch(fun(...), error = identity)
 8: runHook(.onLoad, package, env, package.lib, package)
 9: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source)
10: doTryCatch(return(expr), name, parentenv, handler)
11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: tryCatchList(expr, classes, parentenv, handlers)
13: tryCatch(expr, error = function(e) {call - conditionCall(e)if
(!is.null(call)) {if (identical(call[[1L]], quote(doTryCatch))) 
   
call - sys.call(-4L)dcall - deparse(call)[1L]prefix -
paste(Error in, dcall, : )LONG - 75Lmsg -
conditionMessage(e)sm - strsplit(msg, \n)[[1L]]w - 14L +
nchar(dcall, type = w) + nchar(sm[1L], type = w)if (is.na(w))   
 
w - 14L + nchar(dcall, type = b) + nchar(sm[1L], type =
b)if (w  LONG) prefix - paste(prefix, \n  , sep =
)}else prefix - Error : msg - paste(prefix,
conditionMessage(e), \n, sep = ).Internal(seterrmessage(msg[1L]))   
if (!silent  identical(getOption(show.error.messages), TRUE)) { 
  
cat(msg, file = stderr()).Internal(printDeferredWarnings())}   
invisible(structure(msg, class = try-error))})
14: try({ns - loadNamespace(package, c(which.lib.loc, lib.loc),
keep.source = keep.source)dataPath - file.path(which.lib.loc, package,
data)env - attachNamespace(ns, pos = pos, dataPath = dataPath,
deps)})
15: library(rgl)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

--- interrupted ---
##
---
Andrea Boneschi
Politecnico di Milano
-- 
View this message in context: 
http://r.789695.n4.nabble.com/R-crashes-when-loading-rgl-package-before-minqa-package-tp2719252p3005193.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ben Bolker
Gaspard Lequeux Gaspard.Lequeux at biomath.ugent.be writes:

 Calling newuoa (from the minqa package) makes R crash when 
 the package rgl 
 is loaded first. This however only on certain selected data.
 
 The data used for testing (saved to 'bugs.R'):
 
 xvals =
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,
27,28,29,30,31,32,33,34,35,36)
 
 yvals =
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,
992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,
975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,
970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,
975.1332,971.0757,989.4693)
 
 initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)
 
 optimft - function(x) {
yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
 log(x[4]^x[5])
return(sum((yvals - yft)^2))
 }
 
 Sequence of commands needed to make the bug appear:
 
 Start R
 source('bugs.R')
 library(minqa)
 library(rgl)
 newuoa(initpar, optimft)
   = OK
 
 Start R
 source('bugs.R')
 library(rgl)
 library(minqa)
 newuoa(initpar, optimft)
= Crash: segfault: address 0x18, cause 'memory not mapped'
 
 I found the bug using the package qpcR, where rgl is loaded when loading 
 qpcR while minqa is only loaded later, when needed.
 
 Running on Debian squeeze 64 bit.
 R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
 rgl version: 0.91
 minqa version:  1.1.9
 Rcpp version: 0.8.6 (loaded by minqa)
 
 Kind regards,
 
 Gaspard Lequeux

  Duplicated on Ubuntu 10.04
 sessionInfo()
R version 2.11.1 (2010-05-31) 
i486-pc-linux-gnu 

locale:
 [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C  
 [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8   LC_NAME=C 
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C   

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

other attached packages:
[1] minqa_1.1.9  Rcpp_0.8.6   rgl_0.91.787

  Running valgrind:

bol...@ubuntu-10:~/R/misc$ R -d valgrind --vanilla
==26985== Memcheck, a memory error detector
==26985== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==26985== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
copyright info
==26985== Command: /usr/lib/R/bin/exec/R --vanilla
==26985== 

R version 2.11.1 (2010-05-31)
[snip startup info]

 xvals =
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,
24,25,26,27,28,29,30,31,32,33,34,35,36)
 
 yvals =
c(857.7597,975.8624,978.2655,979.3034,965.5919,
983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,
991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,
980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,
983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,
971.0757,989.4693)
 
 initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)
 
 optimft - function(x) {
+yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
log(x[4]^x[5])
+return(sum((yvals - yft)^2))
+ }
 
 library(rgl)
 library(minqa)
Loading required package: Rcpp
 newuoa(initpar, optimft)
==26985== Invalid read of size 4
==26985==at 0x6763C17: __cxa_allocate_exception (in
/usr/lib/libstdc++.so.6.0.13)
==26985==by 0x6EC026E: calfun_ (minqa.cpp:30)
==26985==by 0x6EC4F56: newuob_ (newuob.f:323)
==26985==by 0x6EC4ADA: newuoa_ (newuoa.f:68)
==26985==by 0x6EC2350: newuoa_cpp__rcpp__wrapper__(Rcpp::Vector14,
Rcpp::Environment, SEXPREC*) (minqa.cpp:120)
==26985==by 0x6EC27D1: newuoa_cpp (minqa.cpp:110)
==26985==by 0x40BB170: ??? (in /usr/lib/R/lib/libR.so)
==26985==by 0x40F20C1: Rf_eval (in /usr/lib/R/lib/libR.so)
==26985==by 0x40F42BF: ??? (in /usr/lib/R/lib/libR.so)
==26985==by 0x40F1E37: Rf_eval (in /usr/lib/R/lib/libR.so)
==26985==by 0x40F5C6F: Rf_applyClosure (in /usr/lib/R/lib/libR.so)
==26985==by 0x40F1CDC: Rf_eval (in /usr/lib/R/lib/libR.so)
==26985==  Address 0xc is not stack'd, malloc'd or (recently) free'd
==26985== 

 *** caught segfault ***
address 0xc, cause 'memory not mapped'

Traceback:
 1: .Call(newuoa_cpp, par, ctrl, fn1)
 2: newuoa(initpar, optimft)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 

  I strongly suspect that the problem is with minqa, and
that loading rgl is just a way to make the problem surface.

  I may take a look at minqa , but you may want to send an e-mail
to the maintainer [ maintainer(minqa) ] as well ...

  Ben Bolker

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
I get this on Windows (it does not crash):

 library(minqa)
 library(rgl)
 newuoa(initpar, optimft)
Error in newuoa(initpar, optimft) : 
  non-finite x values not allowed in calfun
In addition: Warning message:
In log(x[4]) : NaNs produced


This tells me that you should be constraining your parameter x[4] (may be even 
x[5]) to be non-negative:

Here is what I get with `bobyqa':

 bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))
parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 
0.268156271922112, 27.6418856936228 
objective: 1457.20987728737 
number of function evaluations: 78 



Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Date: Wednesday, September 29, 2010 11:40 am
Subject: [R] R crashes when loading rgl package before minqa package
To: r-help@r-project.org


  Hej,
  
  Calling newuoa (from the minqa package) makes R crash when the 
 package rgl is loaded first. This however only on certain selected data.
  
  The data used for testing (saved to 'bugs.R'):
  
  
  xvals = 
 c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)
  
  yvals = 
 c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)
  
  initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)
  
  optimft - function(x) {
yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
 log(x[4]^x[5])
return(sum((yvals - yft)^2))
  }
  
  
  Sequence of commands needed to make the bug appear:
  
  Start R
  source('bugs.R')
  library(minqa)
  library(rgl)
  newuoa(initpar, optimft)
   = OK
  
  Start R
  source('bugs.R')
  library(rgl)
  library(minqa)
  newuoa(initpar, optimft)
= Crash: segfault: address 0x18, cause 'memory not mapped'
  
  I found the bug using the package qpcR, where rgl is loaded when 
 loading qpcR while minqa is only loaded later, when needed.
  
  
  Running on Debian squeeze 64 bit.
  R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
  rgl version: 0.91
  minqa version:  1.1.9
  Rcpp version: 0.8.6 (loaded by minqa)
  
  Kind regards,
  
  Gaspard Lequeux
  
  __
  R-help@r-project.org mailing list
  
  PLEASE do read the posting guide 
  and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
You data is not good enough for the model that you are trying to fit (or 
conversely, the model is not appropriate for the data).  

Some of the parameters in your model will not be estimable because there is no 
information in the data.

See the following:

xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

fn - function(x) {
yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5])
return(yft)
}

plot(xvals, yvals, type=p)
lines(xvals, fn(initpar))

Hope this helps,
Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Ravi Varadhan rvarad...@jhmi.edu
Date: Thursday, September 30, 2010 10:15 am
Subject: Re: [R] R crashes when loading rgl package before minqa package
To: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Cc: r-help@r-project.org


 I get this on Windows (it does not crash):
  
   library(minqa)
   library(rgl)
   newuoa(initpar, optimft)
  Error in newuoa(initpar, optimft) : 
non-finite x values not allowed in calfun
  In addition: Warning message:
  In log(x[4]) : NaNs produced
  
  
  This tells me that you should be constraining your parameter x[4] 
 (may be even x[5]) to be non-negative:
  
  Here is what I get with `bobyqa':
  
   bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))
  parameter estimates: -5.311767080681, -3861.89005072333, 
 979.239647766226, 0.268156271922112, 27.6418856936228 
  objective: 1457.20987728737 
  number of function evaluations: 78 
  
  
  
  Ravi.
  
  
  
  Ravi Varadhan, Ph.D.
  Assistant Professor,
  Division of Geriatric Medicine and Gerontology
  School of Medicine
  Johns Hopkins University
  
  Ph. (410) 502-2619
  email: rvarad...@jhmi.edu
  
  
  - Original Message -
  From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
  Date: Wednesday, September 29, 2010 11:40 am
  Subject: [R] R crashes when loading rgl package before minqa package
  To: r-help@r-project.org
  
  
Hej,

Calling newuoa (from the minqa package) makes R crash when the 
   package rgl is loaded first. This however only on certain selected 
 data.

The data used for testing (saved to 'bugs.R'):


xvals = 
 c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

yvals = 
 c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

optimft - function(x) {
  yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
 log(x[4]^x[5])
  return(sum((yvals - yft)^2))
}


Sequence of commands needed to make the bug appear:

Start R
source('bugs.R')
library(minqa)
library(rgl)
newuoa(initpar, optimft)
 = OK

Start R
source('bugs.R')
library(rgl)
library(minqa)
newuoa(initpar, optimft)
  = Crash: segfault: address 0x18, cause 'memory not mapped'

I found the bug using the package qpcR, where rgl is loaded when 
   loading qpcR while minqa is only loaded later, when needed.


Running on Debian squeeze 64 bit.
R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
rgl version: 0.91
minqa version:  1.1.9
Rcpp version: 0.8.6 (loaded by minqa)

Kind regards,

Gaspard Lequeux

__
R-help@r-project.org mailing list

PLEASE do read the posting guide 
and provide commented, minimal, self-contained, reproducible code.
  
  __
  R-help@r-project.org mailing list
  
  PLEASE do read the posting guide 
  and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Gaspard Lequeux


Hej,

On Thu, 30 Sep 2010, Ravi Varadhan wrote:


I get this on Windows (it does not crash):


library(minqa)
library(rgl)
newuoa(initpar, optimft)

Error in newuoa(initpar, optimft) :
 non-finite x values not allowed in calfun
In addition: Warning message:
In log(x[4]) : NaNs produced


Does it crash when you load first rgl and then only minqa? Like this:

library(rgl)
library(minqa)
newuoa(initpar, optimft)

/Gaspard



This tells me that you should be constraining your parameter x[4] (may be even 
x[5]) to be non-negative:

Here is what I get with `bobyqa':


bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))

parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 
0.268156271922112, 27.6418856936228
objective: 1457.20987728737
number of function evaluations: 78





Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Date: Wednesday, September 29, 2010 11:40 am
Subject: [R] R crashes when loading rgl package before minqa package
To: r-help@r-project.org



 Hej,

 Calling newuoa (from the minqa package) makes R crash when the
package rgl is loaded first. This however only on certain selected data.

 The data used for testing (saved to 'bugs.R'):


 xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

 yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

 initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

 optimft - function(x) {
   yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5])
   return(sum((yvals - yft)^2))
 }


 Sequence of commands needed to make the bug appear:

 Start R
 source('bugs.R')
 library(minqa)
 library(rgl)
 newuoa(initpar, optimft)
  = OK

 Start R
 source('bugs.R')
 library(rgl)
 library(minqa)
 newuoa(initpar, optimft)
   = Crash: segfault: address 0x18, cause 'memory not mapped'

 I found the bug using the package qpcR, where rgl is loaded when
loading qpcR while minqa is only loaded later, when needed.


 Running on Debian squeeze 64 bit.
 R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
 rgl version: 0.91
 minqa version:  1.1.9
 Rcpp version: 0.8.6 (loaded by minqa)

 Kind regards,

 Gaspard Lequeux

 __
 R-help@r-project.org mailing list

 PLEASE do read the posting guide
 and provide commented, minimal, self-contained, reproducible code.





__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Gaspard Lequeux


Hej,

On Thu, 30 Sep 2010, Ravi Varadhan wrote:

You data is not good enough for the model that you are trying to fit (or 
conversely, the model is not appropriate for the data).


Yes. I agree. However, this should not cause R to crash. (Around 100.000 
models are fitted, and it is not possible to look at the data by hand 
first. Bogus results are filtered out afterwards.)


/Gaspard




Some of the parameters in your model will not be estimable because there is no 
information in the data.

See the following:

xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

fn - function(x) {
yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5])
return(yft)
}

plot(xvals, yvals, type=p)
lines(xvals, fn(initpar))

Hope this helps,
Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Ravi Varadhan rvarad...@jhmi.edu
Date: Thursday, September 30, 2010 10:15 am
Subject: Re: [R] R crashes when loading rgl package before minqa package
To: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Cc: r-help@r-project.org



I get this on Windows (it does not crash):

 library(minqa)
 library(rgl)
 newuoa(initpar, optimft)
 Error in newuoa(initpar, optimft) :
   non-finite x values not allowed in calfun
 In addition: Warning message:
 In log(x[4]) : NaNs produced


 This tells me that you should be constraining your parameter x[4]
(may be even x[5]) to be non-negative:

 Here is what I get with `bobyqa':

 bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))
 parameter estimates: -5.311767080681, -3861.89005072333,
979.239647766226, 0.268156271922112, 27.6418856936228
 objective: 1457.20987728737
 number of function evaluations: 78



 Ravi.

 

 Ravi Varadhan, Ph.D.
 Assistant Professor,
 Division of Geriatric Medicine and Gerontology
 School of Medicine
 Johns Hopkins University

 Ph. (410) 502-2619
 email: rvarad...@jhmi.edu


 - Original Message -
 From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
 Date: Wednesday, September 29, 2010 11:40 am
 Subject: [R] R crashes when loading rgl package before minqa package
 To: r-help@r-project.org


  Hej,

  Calling newuoa (from the minqa package) makes R crash when the
 package rgl is loaded first. This however only on certain selected
data.

  The data used for testing (saved to 'bugs.R'):


  xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

  yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

  initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

  optimft - function(x) {
yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
log(x[4]^x[5])
return(sum((yvals - yft)^2))
  }


  Sequence of commands needed to make the bug appear:

  Start R
  source('bugs.R')
  library(minqa)
  library(rgl)
  newuoa(initpar, optimft)
   = OK

  Start R
  source('bugs.R')
  library(rgl)
  library(minqa)
  newuoa(initpar, optimft)
= Crash: segfault: address 0x18, cause 'memory not mapped'

  I found the bug using the package qpcR, where rgl is loaded when
 loading qpcR while minqa is only loaded later, when needed.


  Running on Debian squeeze 64 bit.
  R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
  rgl version: 0.91
  minqa version:  1.1.9
  Rcpp version: 0.8.6 (loaded by minqa)

  Kind regards,

  Gaspard Lequeux

  __
  R-help@r-project.org mailing list

  PLEASE do read the posting guide
  and provide commented, minimal, self-contained, reproducible code.

 __
 R-help@r-project.org mailing list

 PLEASE do read the posting guide
 and provide commented, minimal, self-contained, reproducible code.





__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Ravi Varadhan
No.  It still does not crash in Windows.

 library(rgl)
 library(minqa)
Loading required package: Rcpp
 newuoa(initpar, optimft)
Error in newuoa(initpar, optimft) : 
  non-finite x values not allowed in calfun
In addition: Warning message:
In log(x[4]) : NaNs produced
 

Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Date: Thursday, September 30, 2010 11:43 am
Subject: Re: [R] R crashes when loading rgl package before minqa package
To: r-help@r-project.org


  Hej,
  
  On Thu, 30 Sep 2010, Ravi Varadhan wrote:
  
  I get this on Windows (it does not crash):
  
  library(minqa)
  library(rgl)
  newuoa(initpar, optimft)
  Error in newuoa(initpar, optimft) :
   non-finite x values not allowed in calfun
  In addition: Warning message:
  In log(x[4]) : NaNs produced
  
  Does it crash when you load first rgl and then only minqa? Like this:
  
  library(rgl)
  library(minqa)
  newuoa(initpar, optimft)
  
  /Gaspard
  
  
  This tells me that you should be constraining your parameter x[4] 
 (may be even x[5]) to be non-negative:
  
  Here is what I get with `bobyqa':
  
  bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))
  parameter estimates: -5.311767080681, -3861.89005072333, 
 979.239647766226, 0.268156271922112, 27.6418856936228
  objective: 1457.20987728737
  number of function evaluations: 78
  
  
  
  Ravi.
  
  
  
  Ravi Varadhan, Ph.D.
  Assistant Professor,
  Division of Geriatric Medicine and Gerontology
  School of Medicine
  Johns Hopkins University
  
  Ph. (410) 502-2619
  email: rvarad...@jhmi.edu
  
  
  - Original Message -
  From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
  Date: Wednesday, September 29, 2010 11:40 am
  Subject: [R] R crashes when loading rgl package before minqa package
  To: r-help@r-project.org
  
  
   Hej,
  
   Calling newuoa (from the minqa package) makes R crash when the
  package rgl is loaded first. This however only on certain selected 
 data.
  
   The data used for testing (saved to 'bugs.R'):
  
  
   xvals = 
 c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)
  
   yvals = 
 c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)
  
   initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)
  
   optimft - function(x) {
 yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
 log(x[4]^x[5])
 return(sum((yvals - yft)^2))
   }
  
  
   Sequence of commands needed to make the bug appear:
  
   Start R
   source('bugs.R')
   library(minqa)
   library(rgl)
   newuoa(initpar, optimft)
= OK
  
   Start R
   source('bugs.R')
   library(rgl)
   library(minqa)
   newuoa(initpar, optimft)
 = Crash: segfault: address 0x18, cause 'memory not mapped'
  
   I found the bug using the package qpcR, where rgl is loaded when
  loading qpcR while minqa is only loaded later, when needed.
  
  
   Running on Debian squeeze 64 bit.
   R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
   rgl version: 0.91
   minqa version:  1.1.9
   Rcpp version: 0.8.6 (loaded by minqa)
  
   Kind regards,
  
   Gaspard Lequeux
  
   __
   R-help@r-project.org mailing list
  
   PLEASE do read the posting guide
   and provide commented, minimal, self-contained, reproducible code.
  
  
  
  __
  R-help@r-project.org mailing list
  
  PLEASE do read the posting guide 
  and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when loading rgl package before minqa package

2010-09-30 Thread Katharine Mullen

I also cannot reproduce the crash.


sessionInfo()

R version 2.11.1 (2010-05-31)
x86_64-unknown-linux-gnu

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] minqa_1.1.9 Rcpp_0.8.6  rgl_0.91

On Thu, 30 Sep 2010, Ravi Varadhan wrote:


No.  It still does not crash in Windows.


library(rgl)
library(minqa)

Loading required package: Rcpp

newuoa(initpar, optimft)

Error in newuoa(initpar, optimft) :
 non-finite x values not allowed in calfun
In addition: Warning message:
In log(x[4]) : NaNs produced




Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Date: Thursday, September 30, 2010 11:43 am
Subject: Re: [R] R crashes when loading rgl package before minqa package
To: r-help@r-project.org



 Hej,

 On Thu, 30 Sep 2010, Ravi Varadhan wrote:

I get this on Windows (it does not crash):

library(minqa)
library(rgl)
newuoa(initpar, optimft)
Error in newuoa(initpar, optimft) :
 non-finite x values not allowed in calfun
In addition: Warning message:
In log(x[4]) : NaNs produced

 Does it crash when you load first rgl and then only minqa? Like this:

 library(rgl)
 library(minqa)
 newuoa(initpar, optimft)

 /Gaspard


This tells me that you should be constraining your parameter x[4]
(may be even x[5]) to be non-negative:

Here is what I get with `bobyqa':

bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0))
parameter estimates: -5.311767080681, -3861.89005072333,
979.239647766226, 0.268156271922112, 27.6418856936228
objective: 1457.20987728737
number of function evaluations: 78



Ravi.



Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University

Ph. (410) 502-2619
email: rvarad...@jhmi.edu


- Original Message -
From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be
Date: Wednesday, September 29, 2010 11:40 am
Subject: [R] R crashes when loading rgl package before minqa package
To: r-help@r-project.org


 Hej,

 Calling newuoa (from the minqa package) makes R crash when the
package rgl is loaded first. This however only on certain selected
data.

 The data used for testing (saved to 'bugs.R'):


 xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

 yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

 initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

 optimft - function(x) {
   yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - 
log(x[4]^x[5])
   return(sum((yvals - yft)^2))
 }


 Sequence of commands needed to make the bug appear:

 Start R
 source('bugs.R')
 library(minqa)
 library(rgl)
 newuoa(initpar, optimft)
  = OK

 Start R
 source('bugs.R')
 library(rgl)
 library(minqa)
 newuoa(initpar, optimft)
   = Crash: segfault: address 0x18, cause 'memory not mapped'

 I found the bug using the package qpcR, where rgl is loaded when
loading qpcR while minqa is only loaded later, when needed.


 Running on Debian squeeze 64 bit.
 R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
 rgl version: 0.91
 minqa version:  1.1.9
 Rcpp version: 0.8.6 (loaded by minqa)

 Kind regards,

 Gaspard Lequeux

 __
 R-help@r-project.org mailing list

 PLEASE do read the posting guide
 and provide commented, minimal, self-contained, reproducible code.



 __
 R-help@r-project.org mailing list

 PLEASE do read the posting guide
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self

[R] R crashes when loading rgl package before minqa package

2010-09-29 Thread Gaspard Lequeux


Hej,

Calling newuoa (from the minqa package) makes R crash when the package rgl 
is loaded first. This however only on certain selected data.


The data used for testing (saved to 'bugs.R'):


xvals = 
c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36)

yvals = 
c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693)

initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764)

optimft - function(x) {
  yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5])
  return(sum((yvals - yft)^2))
}


Sequence of commands needed to make the bug appear:

Start R
source('bugs.R')
library(minqa)
library(rgl)
newuoa(initpar, optimft)
 = OK

Start R
source('bugs.R')
library(rgl)
library(minqa)
newuoa(initpar, optimft)
  = Crash: segfault: address 0x18, cause 'memory not mapped'

I found the bug using the package qpcR, where rgl is loaded when loading 
qpcR while minqa is only loaded later, when needed.



Running on Debian squeeze 64 bit.
R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu
rgl version: 0.91
minqa version:  1.1.9
Rcpp version: 0.8.6 (loaded by minqa)

Kind regards,

Gaspard Lequeux

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when communicating with JAGS

2010-08-31 Thread Florian Weiler
Thanks for your answer, Ben. Indeed I tried to use the newest R
version, but just to be sure I tried it again just now, with the same
result, i.e. R crashes. Unfortunately I cannot even look at the system
configurations as this is a university computer and they (stupidly)
don't give us administrator rights on our machines. I'll have to
discuss this with our IT once I'm back home.
But one thing you mentioned  I didn't really realize before is
interesting, which is that I don't get any messages from Jags before
the crash. Indeed looking at the Jags-window it doesn't do anything.
What you see on your computer is exactly what I would like to see, but
it doesn't even start compiling. So it might be a problem with Jags. I
just tried to use another version of Jags (the older 2.0 version).
However, now I cannot load the library of rjags any more and I don't
understand why. Is there another package I need to install when using
an older version of Jags? Thanks again, Florian


On Tue, Aug 31, 2010 at 12:38 AM, Ben Bolker bbol...@gmail.com wrote:
 Florian Weiler fweiler08 at johnshopkins.it writes:

 First I create some data:
 N - 1000
 x - rnorm(N, 0, 5)

 Then I specify a model in JAGS, storing it in the directory with the
 extension .bug:
 model {
       for (i in 1:N) {
               x[i] ~ dnorm(mu, tau) ## the model
       }
       mu ~ dnorm(0, .0001) ## uninformative priors
       tau - pow(sigma, -2)
       sigma ~ dunif(0, 100)
 }

 Then I call the rjags library and finally I try to run the jags model:
 library('rjags')

 jags - jags.model('example.bug',
                    data = list('x' = x,
                                'N' = N))

 This is where its always crashing, i.e. I don't get an error message,
 but R simply stops working and I have to close and reopen the program.
 I don't even start drawing samples from the model, it just crashes the
 moment I try to call on JAGS.


 [snip]

  My problem is that every
  single time I want to call JAGS from R the latter crashes (i.e. it
  turns pale and the Windows tells me R has stopped working.
  Strangely, if there is a mistake in my jags code, this will be
  reported without a crash. Only when the code is right and the model
  should start to run, R stops working. I already tried to use different
  version of R (currently R 2.10.1 and JAGS-2.1.0-1),but to no avail. A
  couple of days ago I even upgraded from Vista to Windows 7, hoping
  this would sort our the problem, but its still exactly the same. Could
  anyone think of a possible solution for this problem?
 
  I worked on other computers using Windows without encountering the
  described problem. However, I am quite new to using JAGS, so I might
  just be missing the obvious.

  This sort of thing is unfortunately really hard to debug remotely.
  Is it feasible to upgrade to the latest release of R (2.11.1), JAGS, and
 rjags, just to rule that out as a possibility?  You said you had
 used other Windows machines where it worked -- do they have
 similar configurations?  Can you try to look for differences in the
 configurations?  Do you get any messages at all from JAGS before
 the program stops (I get

 Compiling model graph
   Resolving undeclared variables
   Allocating nodes
   Graph Size: 1009

  |++| 100%

 : does any of this appear before R crashes)?

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when communicating with JAGS

2010-08-31 Thread Ben Bolker
Florian Weiler wrote:
 Thanks for your answer, Ben. Indeed I tried to use the newest R
 version, but just to be sure I tried it again just now, with the same
 result, i.e. R crashes. Unfortunately I cannot even look at the system
 configurations as this is a university computer and they (stupidly)
 don't give us administrator rights on our machines. I'll have to
 discuss this with our IT once I'm back home.
 But one thing you mentioned  I didn't really realize before is
 interesting, which is that I don't get any messages from Jags before
 the crash. Indeed looking at the Jags-window it doesn't do anything.
 What you see on your computer is exactly what I would like to see, but
 it doesn't even start compiling. So it might be a problem with Jags. I
 just tried to use another version of Jags (the older 2.0 version).
 However, now I cannot load the library of rjags any more and I don't
 understand why. Is there another package I need to install when using
 an older version of Jags? Thanks again, Florian
   
  I believe you might have to install an older version of rjags
http://cran.r-project.org/src/contrib/Archive/rjags/ --
 I've had problems in the other direction (trying to use new JAGS with
older rjags) and think there may be some
dependencies there.  However, trying to use an older JAGS seems a bit
desperate to me.  I would probably
 start by trying to run JAGS from a Windows shell (see the JAGS manual
for examples), so that you can decide
whether rjags is part of the problem, or whether it's a pure JAGS issue.

 On Tue, Aug 31, 2010 at 12:38 AM, Ben Bolker bbol...@gmail.com wrote:
   
 Florian Weiler fweiler08 at johnshopkins.it writes:

 
 First I create some data:
 N - 1000
 x - rnorm(N, 0, 5)

 Then I specify a model in JAGS, storing it in the directory with the
 extension .bug:
 model {
   for (i in 1:N) {
   x[i] ~ dnorm(mu, tau) ## the model
   }
   mu ~ dnorm(0, .0001) ## uninformative priors
   tau - pow(sigma, -2)
   sigma ~ dunif(0, 100)
 }

 Then I call the rjags library and finally I try to run the jags model:
 library('rjags')

 jags - jags.model('example.bug',
data = list('x' = x,
'N' = N))

 This is where its always crashing, i.e. I don't get an error message,
 but R simply stops working and I have to close and reopen the program.
 I don't even start drawing samples from the model, it just crashes the
 moment I try to call on JAGS.

   
 [snip]

 
 My problem is that every
 single time I want to call JAGS from R the latter crashes (i.e. it
 turns pale and the Windows tells me R has stopped working.
 Strangely, if there is a mistake in my jags code, this will be
 reported without a crash. Only when the code is right and the model
 should start to run, R stops working. I already tried to use different
 version of R (currently R 2.10.1 and JAGS-2.1.0-1),but to no avail. A
 couple of days ago I even upgraded from Vista to Windows 7, hoping
 this would sort our the problem, but its still exactly the same. Could
 anyone think of a possible solution for this problem?

 I worked on other computers using Windows without encountering the
 described problem. However, I am quite new to using JAGS, so I might
 just be missing the obvious.
 
  This sort of thing is unfortunately really hard to debug remotely.
  Is it feasible to upgrade to the latest release of R (2.11.1), JAGS, and
 rjags, just to rule that out as a possibility?  You said you had
 used other Windows machines where it worked -- do they have
 similar configurations?  Can you try to look for differences in the
 configurations?  Do you get any messages at all from JAGS before
 the program stops (I get

 Compiling model graph
   Resolving undeclared variables
   Allocating nodes
   Graph Size: 1009

  |++| 100%

 : does any of this appear before R crashes)?

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes when communicating with JAGS

2010-08-30 Thread Florian Weiler
Dear all,

I have a question regarding using JAGS and R. My problem is that every
single time I want to call JAGS from R the latter crashes (i.e. it
turns pale and the Windows tells me R has stopped working.
Strangely, if there is a mistake in my jags code, this will be
reported without a crash. Only when the code is right and the model
should start to run, R stops working. I already tried to use different
version of R (currently R 2.10.1 and JAGS-2.1.0-1),but to no avail. A
couple of days ago I even upgraded from Vista to Windows 7, hoping
this would sort our the problem, but its still exactly the same. Could
anyone think of a possible solution for this problem?

I worked on other computers using Windows without encountering the
described problem. However, I am quite new to using JAGS, so I might
just be missing the obvious.

Thanks for your help and precious time,
Florian

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when communicating with JAGS

2010-08-30 Thread Florian Weiler
Hi again,

I was asked to provide some code. Well, in my case it doesn't really
matter which example I use, so I just write down a very basic and
canned example:

First I create some data:
N - 1000
x - rnorm(N, 0, 5)

Then I specify a model in JAGS, storing it in the directory with the
extension .bug:
model {
for (i in 1:N) {
x[i] ~ dnorm(mu, tau) ## the model
}
mu ~ dnorm(0, .0001) ## uninformative priors
tau - pow(sigma, -2)
sigma ~ dunif(0, 100)
}

Then I call the rjags library and finally I try to run the jags model:
library('rjags')

jags - jags.model('example.bug',
   data = list('x' = x,
   'N' = N))

This is where its always crashing, i.e. I don't get an error message,
but R simply stops working and I have to close and reopen the program.
I don't even start drawing samples from the model, it just crashes the
moment I try to call on JAGS.

Sorry for not providing the example right away,
Florian


On Mon, Aug 30, 2010 at 9:17 AM, Florian Weiler
fweile...@johnshopkins.it wrote:
 Dear all,

 I have a question regarding using JAGS and R. My problem is that every
 single time I want to call JAGS from R the latter crashes (i.e. it
 turns pale and the Windows tells me R has stopped working.
 Strangely, if there is a mistake in my jags code, this will be
 reported without a crash. Only when the code is right and the model
 should start to run, R stops working. I already tried to use different
 version of R (currently R 2.10.1 and JAGS-2.1.0-1),but to no avail. A
 couple of days ago I even upgraded from Vista to Windows 7, hoping
 this would sort our the problem, but its still exactly the same. Could
 anyone think of a possible solution for this problem?

 I worked on other computers using Windows without encountering the
 described problem. However, I am quite new to using JAGS, so I might
 just be missing the obvious.

 Thanks for your help and precious time,
 Florian


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when communicating with JAGS

2010-08-30 Thread Ben Bolker
Florian Weiler fweiler08 at johnshopkins.it writes:

 First I create some data:
 N - 1000
 x - rnorm(N, 0, 5)
 
 Then I specify a model in JAGS, storing it in the directory with the
 extension .bug:
 model {
   for (i in 1:N) {
   x[i] ~ dnorm(mu, tau) ## the model
   }
   mu ~ dnorm(0, .0001) ## uninformative priors
   tau - pow(sigma, -2)
   sigma ~ dunif(0, 100)
 }
 
 Then I call the rjags library and finally I try to run the jags model:
 library('rjags')
 
 jags - jags.model('example.bug',
data = list('x' = x,
'N' = N))
 
 This is where its always crashing, i.e. I don't get an error message,
 but R simply stops working and I have to close and reopen the program.
 I don't even start drawing samples from the model, it just crashes the
 moment I try to call on JAGS.
 

[snip]

  My problem is that every
  single time I want to call JAGS from R the latter crashes (i.e. it
  turns pale and the Windows tells me R has stopped working.
  Strangely, if there is a mistake in my jags code, this will be
  reported without a crash. Only when the code is right and the model
  should start to run, R stops working. I already tried to use different
  version of R (currently R 2.10.1 and JAGS-2.1.0-1),but to no avail. A
  couple of days ago I even upgraded from Vista to Windows 7, hoping
  this would sort our the problem, but its still exactly the same. Could
  anyone think of a possible solution for this problem?
 
  I worked on other computers using Windows without encountering the
  described problem. However, I am quite new to using JAGS, so I might
  just be missing the obvious.

  This sort of thing is unfortunately really hard to debug remotely.
  Is it feasible to upgrade to the latest release of R (2.11.1), JAGS, and
rjags, just to rule that out as a possibility?  You said you had
used other Windows machines where it worked -- do they have
similar configurations?  Can you try to look for differences in the
configurations?  Do you get any messages at all from JAGS before
the program stops (I get

Compiling model graph
   Resolving undeclared variables
   Allocating nodes
   Graph Size: 1009

  |++| 100%

: does any of this appear before R crashes)?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes with large vectors

2010-07-09 Thread Jeremie Smaga
Good afternoon,

I have been experiencing a lot of crashes working with large vectors in R.

Specifically, I am using XTS of length of minimum 120k elements.

My problem is that I cannot display the vector (otherwise R crashes), I
cannot plot it either (otherwise R crashes). That could be solved by
reducing the amount of points.

However, I have been performing some statistical opreations on is and even
sd(myXTS) crashes R.

By crashes, I mean shuts down without any warning whatsoever.

I use R 2.11.1 (64).

Has anyone had the same kind of problem?

Can we solve this?

Best,


-- 
Jeremie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with large vectors

2010-07-09 Thread Tengfei Yin
Hi Jeremie,

Maybe you can take a look at the bigmemory  package.
 If you have multi core or have access to clusters, you may want to use any
parallel computing strategy.

For plotting of large data, if you are using basic R graphics, first try to
use line instead of using 'point',

if this still doesn't working, you may want to try an alternative way by
using qtinterface (R-forge project), install qtbase and qtpaint, they are
still under development, but painting in QT interface is a lot faster for
large data set.

Best

Tengfei

On Fri, Jul 9, 2010 at 2:42 AM, Jeremie Smaga jere...@4ecap.com wrote:

 Good afternoon,

 I have been experiencing a lot of crashes working with large vectors in R.

 Specifically, I am using XTS of length of minimum 120k elements.

 My problem is that I cannot display the vector (otherwise R crashes), I
 cannot plot it either (otherwise R crashes). That could be solved by
 reducing the amount of points.

 However, I have been performing some statistical opreations on is and even
 sd(myXTS) crashes R.

 By crashes, I mean shuts down without any warning whatsoever.

 I use R 2.11.1 (64).

 Has anyone had the same kind of problem?

 Can we solve this?

 Best,


 --
 Jeremie

[[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Tengfei Yin
MCDB PhD student
1620 Howe Hall, 2274,
Iowa State University
Ames, IA,50011-2274
Homepage: www.tengfei.name

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes with large vectors

2010-07-09 Thread Ben Bolker
Jeremie Smaga jeremie at 4ecap.com writes:

 
 Good afternoon,
 
 I have been experiencing a lot of crashes working with large vectors in R.
 
 Specifically, I am using XTS of length of minimum 120k elements.
 
 My problem is that I cannot display the vector (otherwise R crashes), I
 cannot plot it either (otherwise R crashes). That could be solved by
 reducing the amount of points.
 
 However, I have been performing some statistical opreations on is and even
 sd(myXTS) crashes R.
 
 By crashes, I mean shuts down without any warning whatsoever.
 
 I use R 2.11.1 (64).
 
 Has anyone had the same kind of problem?
 
 Can we solve this?


  You need to provide a reproducible example, or as nearly reproducible
as possible.  You need to provide more information about your system
(Windows?) -- the results of sessionInfo() would help.

  For example, I have no problem taking the standard deviation
of a million-element vector:

 set.seed(1001)
 sd(runif(1e6))
[1] 0.2884210
 sessionInfo()
R version 2.11.1 (2010-05-31) 
i486-pc-linux-gnu 

locale:
 [1] LC_CTYPE=en_US.UTF-8   LC_NUMERIC=C  
 [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C  LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8   LC_NAME=C 
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C   

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

  what happens on your system?



  

  sd(

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-30 Thread premmad

Windows XP 32 bit machine.
allocated 2gb as memory for R 2.9.2
data  will be 20mb and was running calculations on the data .
but the r crashes with out any warning or so.
-- 
View this message in context: 
http://old.nabble.com/R-crashes-tp26110355p26124740.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-30 Thread Romain Francois

On 10/30/2009 05:17 AM, premmad wrote:

Windows XP 32 bit machine.
allocated 2gb as memory for R 2.9.2


can you try again whatever you do with 2.10.0


data  will be 20mb and was running calculations on the data .
but the r crashes with out any warning or so.


That is a bit better, but nowhere near something that can help us help you.

You are going to need a few more sessions for this therapy to be useful, 
we cannot read your computer's mind, just interpret what you tell us. I 
don't want to jump ahead, but can you tell us the childhood of your 
crashes, etc ...


20mb is not huge

Romain

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/BcPw : celebrating R commit #5
|- http://tr.im/ztCu : RGG #158:161: examples of package IDPmisc
`- http://tr.im/yw8E : New R package : sos

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-30 Thread cls59


premmad wrote:
 
 Windows XP 32 bit machine.
 allocated 2gb as memory for R 2.9.2
 data  will be 20mb and was running calculations on the data .
 but the r crashes with out any warning or so.
 

Ahh, well 20 MB is not huge data for R, so there should be no problem with
processing it. The pertinent questions now are:

  * What does your data look like? A small representational sample will
suffice, preferably something that can be copied out of an email and pasted
into R.

  * What operations are you running when R crashes? In your first post you
mentioned R crashes frequently-- does this happen with many different data
sets, but the same operations? 

If you could provide us the data and functions that are being executed just
prior to the crash, then we may be able to help. But without a reproducible
example to test on our own machines, as suggested by the posting guide for
this mailing list, there is really nothing we can do to help with your
problem.


-Charlie

-
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: 
http://old.nabble.com/R-crashes-tp26110355p26132909.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes

2009-10-29 Thread premmad

My R crashes frequently when run  with huge data.
-- 
View this message in context: 
http://www.nabble.com/R-crashes-tp26110355p26110355.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-29 Thread John Kane
And

PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--- On Thu, 10/29/09, premmad mtechp...@gmail.com wrote:

 From: premmad mtechp...@gmail.com
 Subject: [R]  R crashes
 To: r-help@r-project.org
 Received: Thursday, October 29, 2009, 6:13 AM
 
 My R crashes frequently when run  with huge data.
 -- 
 View this message in context: 
 http://www.nabble.com/R-crashes-tp26110355p26110355.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 R-help@r-project.org
 mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained,
 reproducible code.
 


  __
Ask a question on any topic and get answers from real people. Go to Yahoo! 
Answers and share what you know at http://ca.answers.yahoo.com

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-29 Thread Rolf Turner


On 29/10/2009, at 11:13 PM, premmad wrote:



My R crashes frequently when run  with huge data.


Isn't that ***fascinating***!!!

cheers,

Rolf Turner

##
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes

2009-10-29 Thread cls59


premmad wrote:
 
 My R crashes frequently when run  with huge data.
 


I'm afraid this is nowhere near enough information for anyone on this list
to provide any sort of meaningful insight. At the very least we need to
know:

  * What operating system are you using?

  * Specifically, for large data set questions-- are you running a 32 or
64 bit operating system and how much RAM do you have?
 
  * What version of R are you running?

  * What does your data set look like and where does it come from?

  * How big is the data set?

  * How are you trying to read the data in?

You don't need to provide the complete data set-- just a representational
sample that someone interested in your problem could replicate into
something of the appropriate size. This is very critical as it is very
possible that the problem is arising from feeding R corrupted data rather
than R simply choking because the data set is too big.

Without this information, the best you can hope for from this mailing list
is silence or a flippant response.


-Charlie

-
Charlie Sharpsteen
Undergraduate
Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: 
http://www.nabble.com/R-crashes-tp26110355p26123323.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-22 Thread Vassilis Golfinopoulos

Dear all,

it seems that my original diagnosis (using impute together with GeneMeta) 
was not correct. Something else is causing the crash (R-console stops 
working). I will return for questions (probably at the Bioconductor mailing 
list) after I have investigated the problem further.


Thank you all and I apologize for the inappropriate use of your time.

- Original Message - 
From: Duncan Murdoch murd...@stats.uwo.ca

To: Vassilis Golfinopoulos vassilis.golfinopou...@gmail.com
Cc: r-help@r-project.org
Sent: Monday, September 21, 2009 5:13 PM
Subject: Re: [R] R crashes when packages 'impute' and 'GeneMeta' are used 
together.




On 9/21/2009 9:18 AM, Vassilis Golfinopoulos wrote:

Well, the title says all for this one. It seems to crash the
R-console, so it happens whether I use the R-gui or R-console directly
or Emacs with ESS.


Not for me.  (But as Hadley said, you didn't explain what you needed to do 
to trigger the crash, so I may not have done it.  All I did was


library(GeneMeta)
library(impute)

GeneMeta is a Bioconductor package, so you might want to talk about this 
on the Bioconductor mailing list, where you'll find more people who use 
it.  But you should try it in a current release of R (2.9.2 is current), 
and report on the version numbers of the packages.


Duncan Murdoch



I have R 2.9.0 on Windows Vista.

Thanks,
Vassilis

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

and provide commented, minimal, self-contained, reproducible code.




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-21 Thread Vassilis Golfinopoulos
Well, the title says all for this one. It seems to crash the
R-console, so it happens whether I use the R-gui or R-console directly
or Emacs with ESS.

I have R 2.9.0 on Windows Vista.

Thanks,
Vassilis

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-21 Thread hadley wickham
 Well, the title says all for this one.

Not really.  What do you mean by crash?  What do you mean by used together?

Hadley

-- 
http://had.co.nz/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes when packages 'impute' and 'GeneMeta' are used together.

2009-09-21 Thread Duncan Murdoch

On 9/21/2009 9:18 AM, Vassilis Golfinopoulos wrote:

Well, the title says all for this one. It seems to crash the
R-console, so it happens whether I use the R-gui or R-console directly
or Emacs with ESS.


Not for me.  (But as Hadley said, you didn't explain what you needed to 
do to trigger the crash, so I may not have done it.  All I did was


library(GeneMeta)
library(impute)

GeneMeta is a Bioconductor package, so you might want to talk about this 
on the Bioconductor mailing list, where you'll find more people who use 
it.  But you should try it in a current release of R (2.9.2 is current), 
and report on the version numbers of the packages.


Duncan Murdoch



I have R 2.9.0 on Windows Vista.

Thanks,
Vassilis

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes while appending to a created table from SQL Server

2009-03-18 Thread Seeliger . Curt
Folks,

The code below reliably crashes an R 2.8.1 session on XP when connected to 
an SQL Server 2005 database.  The problem arises when appending data using 
sqlSave() with rownames=FALSE to a table that had been previously created 
with rownames=TRUE.  Certainly it's daft to do this as a regular 
procedure, but it would be useful for R to catch the error in a more 
graceful manner.


require(RODBC)
lakes - odbcConnect('Lakes',uid='cseelige')
ss - data.frame('a'='1234','b'='5678', c=9012, stringsAsFactors=FALSE)

sqlDrop(lakes, 'foofooB')
sqlSave(lakes, ss, 'foofooB', append=TRUE)
sqlSave(lakes, ss, 'foofooB', append=TRUE)
sqlSave(lakes, ss, 'foofooB', append=TRUE, rownames=FALSE)

# That last sqlSave() produces an error, which seems to indicate that 
# the table is forever munged even though you sqlDrop() it:
#   Error in sqlSave(lakes, ss, foofooB, append = TRUE, rownames = 
FALSE) : 
# unable to append to table ?foofooB?

sqlDrop(lakes, 'foofooB')

sqlSave(lakes, ss, 'foofooB', append=TRUE)
sqlSave(lakes, ss, 'foofooB', append=TRUE, rownames=FALSE)

# That last line causes the crash.


-- 
Curt Seeliger, Data Ranger
Raytheon Information Services - Contractor to ORD
seeliger.c...@epa.gov
541/754-4638

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes when using the RODBC Package

2009-02-13 Thread Bill Cunliffe
Hi,

I’ve written some code that fetches data from an Access Database (2003),
processes the data, then saves the modified data back into a table in the
Access database.

It works if I only pass through the code once, but if I put a loop around
the code so that I fetch data from a different source table, and then save
it again to a different destination table, the code crashes.  It is either
the final sqlQuery or sqlSave queries.  I have no idea why it is crashing.

As an aside, I also have trouble with the odbcCloseAll() command – R tends
to crash with that, also.

I’m running this on Windows XP, Access 2003, R version 2.7.2

Any insights would be greatly appreciated!  The condensed version of the
code is below.


# import the libraries
library(RODBC)

# Close any existing connections
odbcCloseAll()

# Connect to database
channel - odbcConnect(database, uid=, pwd=)

for ( i in 1:2 ) {

    # 1. Weekly 2. Monthly
    if (i == 1) {
    bWeekly - TRUE
    } else {
    bWeekly - FALSE
    }

    # Get Prices
    if ( bWeekly ) {
    tblName - qryDataWeekly_Crosstab
    } else {
    tblName - qryDataMonthly_Crosstab
    }
    prices - sqlFetch(channel, tblName, colnames = FALSE, rownames
= TRUE)

    # Get Weightings
    sql - SELECT BbSecurity, Weighting FROM qryWeightingsUse
    sWeights - sqlQuery(channel, sql)

    #  Copy Data to Database 
    if ( bWeekly ) {
    tblName - tblIndexWeekly
    } else {
    tblName - tblIndexMonthly
    }
    sqlQuery(channel, paste(DELETE * FROM , tblName)) 
    sqlSave(channel, indexDf, tablename = tblName, append=TRUE,
rownames=FALSE)

}

odbcClose(channel)

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Zornitsa Luleva
Hello,

I am trying to call a FORTRAN subroutine within R and something really
strange happens:

I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked
the [Ordinal/Name Pointer] Table for the function within the library that I
want to call - it is there (objdump - p mpbvv.dll).

Then, I have written an R-wrapper to call the FORTRAN subroutine, which
works fine. SInce I have 200 points, at which I have to evaluate the
function, I have to call it 200 times. It works about 100 times just fine
and then R crashes. The values for which the function is evaluated are
almost the same, there no sudden big differences.

The only thing that is probably not really ok is that is.loaded('mpbvv.dll')
returns FALSE. But if I call getLoadedDLLs(), the library is loaded
 getLoadedDLLs()
 Filename
base base
methods   C:/Programme/R/R-2.7.1/library/methods/libs/methods.dll
grDevices C:/Programme/R/R-2.7.1/library/grDevices/libs/grDevices.dll
stats C:/Programme/R/R-2.7.1/library/stats/libs/stats.dll
mpbvvE:/Zoe/DA/mpbvv.dll
  Dynamic.Lookup
base  FALSE
methodsFALSE
grDevices   FALSE
stats FALSE
mpbvv   TRUE
I am loading four more libraries:

library('actuar')
library('bbmle')
library('polynom')
library('NORMT3')

Could this be a problem?

I don't have any idea why R crashes. Do you?

Thanks a lot for your advice in advance!

Cheers,
Zoe

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Peter Dalgaard
Zornitsa Luleva wrote:
 Hello,

 I am trying to call a FORTRAN subroutine within R and something really
 strange happens:

 I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked
 the [Ordinal/Name Pointer] Table for the function within the library that I
 want to call - it is there (objdump - p mpbvv.dll).

 Then, I have written an R-wrapper to call the FORTRAN subroutine, which
 works fine. SInce I have 200 points, at which I have to evaluate the
 function, I have to call it 200 times. It works about 100 times just fine
 and then R crashes. The values for which the function is evaluated are
 almost the same, there no sudden big differences.

 The only thing that is probably not really ok is that is.loaded('mpbvv.dll')
 returns FALSE. But if I call getLoadedDLLs(), the library is loaded
   
 getLoadedDLLs()
 
  Filename
 base base
 methods   C:/Programme/R/R-2.7.1/library/methods/libs/methods.dll
 grDevices C:/Programme/R/R-2.7.1/library/grDevices/libs/grDevices.dll
 stats C:/Programme/R/R-2.7.1/library/stats/libs/stats.dll
 mpbvvE:/Zoe/DA/mpbvv.dll
   Dynamic.Lookup
 base  FALSE
 methodsFALSE
 grDevices   FALSE
 stats FALSE
 mpbvv   TRUE
 I am loading four more libraries:

 library('actuar')
 library('bbmle')
 library('polynom')
 library('NORMT3')

 Could this be a problem?

 I don't have any idea why R crashes. Do you?

   
The most common case is that people's argument lists to .Fortran do not
match up with the expected types and dimensions of the subroutine. This
may (e.g.) cause you to write past the end of an array, leading to
memory corruption that will not be discovered until it trips up the
memory management some time later. Turning gctorture() on may provoke
the error to occur sooner and become easier to pinpoint.

 Thanks a lot for your advice in advance!
   

-- 
   O__   Peter Dalgaard Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Prof Brian Ripley

On Mon, 18 Aug 2008, Zornitsa Luleva wrote:


Hello,

I am trying to call a FORTRAN subroutine within R and something really
strange happens:


Did you read the posting guide?  It suggests the R-devel list for 
questions about 'C, C++ etc', and Fortran is part of the 'etc'.



I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked
the [Ordinal/Name Pointer] Table for the function within the library that I
want to call - it is there (objdump - p mpbvv.dll).

Then, I have written an R-wrapper to call the FORTRAN subroutine, which
works fine. SInce I have 200 points, at which I have to evaluate the
function, I have to call it 200 times. It works about 100 times just fine
and then R crashes. The values for which the function is evaluated are
almost the same, there no sudden big differences.

The only thing that is probably not really ok is that is.loaded('mpbvv.dll')
returns FALSE.


Correctly: please do read the help before posting: ?is.loaded has

  symbol: a character string giving a symbol name.

not, note, a DLL name.


But if I call getLoadedDLLs(), the library is loaded

getLoadedDLLs()

Filename
base base
methods   C:/Programme/R/R-2.7.1/library/methods/libs/methods.dll
grDevices C:/Programme/R/R-2.7.1/library/grDevices/libs/grDevices.dll
stats C:/Programme/R/R-2.7.1/library/stats/libs/stats.dll
mpbvvE:/Zoe/DA/mpbvv.dll
 Dynamic.Lookup
base  FALSE
methodsFALSE
grDevices   FALSE
stats FALSE
mpbvv   TRUE
I am loading four more libraries:

library('actuar')
library('bbmle')
library('polynom')
library('NORMT3')

Could this be a problem?

I don't have any idea why R crashes. Do you?


Most likely an error in your code.  Perhaps a mismatch (in type, in 
length) between what you pass .Fortran and what your code expects?
Without the reproducible example the posting guide asks for we can only 
guess.



Thanks a lot for your advice in advance!

Cheers,
Zoe

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


PLEASE do.

--
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes in Leopard

2007-12-10 Thread Keith Jones
Hi,

I have upgraded to Leopard and I just installed 2.6.1.  I opened R 
and then I opened package installer and clicked get List.  After 
about five seconds R stopped responding. and Leopard reported that R 
had stopped responding and wanted to sent a report to Apple.  What do 
I need to do get a list of packages so I can download and install 
them?

Thanks,

Keith Jones

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R crashes using quantreg censored estimation (method fcen)

2007-11-29 Thread Malte Brockmann

Dear List,

my R session crashes if I repeatedly run the summary function on a quantreg 
object generated using the censored estimation method or if I set the number of 
bootstrap repititions reasonably high. Are there any known incompabilities 
between quantreg and Windows Vista  AMD64? The error is reproducable using R 
2.6.1 and R 2.5.1.

 sessionInfo()
R version 2.6.1 (2007-11-26) 
i386-pc-mingw32 

locale:
LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

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

other attached packages:
[1] quantreg_4.10 SparseM_0.74

Thanks,
Malte




-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Jared O'Connell
Gesendet: Donnerstag, 29. November 2007 08:57
An: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Betreff: Re: [R] Recommended textbooks for R?

This page may be helpful :)

 http://www.r-project.org/doc/bib/R-books.html

Modern Applied Statistics with S is quite broad and very good.

On Nov 28, 2007 4:38 PM, Max [EMAIL PROTECTED] wrote:
 Hi everyone!

 I've recently begun to learn R for my job as the IT department suffers
 from lack of funding for new software. I was talking to the guy in
 charge of Requisitions and have found out the budget for books is in
 great shape.

 So, I'm curious what books people know of that have R examples and are
 good for:

 1.) Uni and Multivariate Time Series Analysis/Forecasting

 2.) GLMs (at this point it looks like I'll be focusing on nominal and
 ordinal regression models)

 3.) Survival Models

 4.) Multiple Regression

 Any suggestions would be awesome. :)

 thanks,

 -Max

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes using quantreg censored estimation (method fcen)

2007-11-29 Thread Gavin Simpson
On Thu, 2007-11-29 at 09:09 +0100, Malte Brockmann wrote:
 Dear List,
 
 my R session crashes if I repeatedly run the summary function on a
 quantreg object generated using the censored estimation method or if I
 set the number of bootstrap repititions reasonably high. Are there any
 known incompabilities between quantreg and Windows Vista  AMD64? The
 error is reproducable using R 2.6.1 and R 2.5.1.

Err, what does this have to do with Jared's reply to Max's posting about
suitable textbooks and R?

Please don't jump on a thread to ask your own question. Start your own
thread.

If you want people to help you with your problem, you are probably going
to have to give a reproducible example - my R session crashes is way
below what is requested in the posting guide. Even the statements about
what you did are not enough - people need to be able to reproduce your
problem on their machines.

Read the posting guide (URL in the footer of this email) and resend a
message to the list - a new one mind, so you start a new thread. And
make sure you include a reproducible example. If you can't send your
data, try it with one of the data sets that come with quantreg and if it
fails with that also, use that data set in your example.

You should also consider contacting the maintainer of quantreg.

HTH

G

 
  sessionInfo()
 R version 2.6.1 (2007-11-26) 
 i386-pc-mingw32 
 
 locale:
 LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods
 base 
 
 other attached packages:
 [1] quantreg_4.10 SparseM_0.74
 
 Thanks,
 Malte
 
 
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Jared 
 O'Connell
 Gesendet: Donnerstag, 29. November 2007 08:57
 An: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Betreff: Re: [R] Recommended textbooks for R?
 
 This page may be helpful :)
 
  http://www.r-project.org/doc/bib/R-books.html
 
 Modern Applied Statistics with S is quite broad and very good.
 
 On Nov 28, 2007 4:38 PM, Max [EMAIL PROTECTED] wrote:
  Hi everyone!
 
  I've recently begun to learn R for my job as the IT department suffers
  from lack of funding for new software. I was talking to the guy in
  charge of Requisitions and have found out the budget for books is in
  great shape.
 
  So, I'm curious what books people know of that have R examples and are
  good for:
 
  1.) Uni and Multivariate Time Series Analysis/Forecasting
 
  2.) GLMs (at this point it looks like I'll be focusing on nominal and
  ordinal regression models)
 
  3.) Survival Models
 
  4.) Multiple Regression
 
  Any suggestions would be awesome. :)
 
  thanks,
 
  -Max
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes using quantreg censored estimation (method fcen)

2007-11-29 Thread Malte Brockmann
Thanks for your advice, Gavin. I hope to comply with the posting guide this 
time.

With crashing I meant that the R-session is simply terminated without an 
error message (Vista, R2.6.1 and R2.5.1 with precompiled packages, sessionInfo 
see below). I could reproduce the error on a linux machine (R2.5.1-1 for which 
I have compiled the packages on my own). On the linux machine I at least get 
the following error message:

*** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: .Fortran(xys, as.integer(m), as.integer(n), as.integer(p), 
as.integer(R), as.integer(m + 5), as.integer(p + 2), as.double(x), 
as.double(y), as.double(tau), as.double(tol), flag = integer(R), coef = 
double(p * R), resid = double(m), integer(m), double((m + 5) * (p + 
2)), double(m), as.integer(1), sol = double((p + 2)), dsol = double(m), 
lsol = as.integer(0), xx = double(m * p), yy = double(m), 
as.integer(s), PACKAGE = quantreg)
 2: boot.rq.xy(x, y, s, tau)
 3: boot.rq(x[s, ], y[s], tau, ...)
 4: summary.fcrq(model.powell, R = r)
 5: summary(model.powell, R = 1e+06)

I used the following command to generate the model:
model.powell - rq(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9, 
method=fcen, data=data_test)
summary(model.powell, R=100)

I used 100 replications to make sure that the error is triggered

I uploaded the data to www.esbf.de/quantreg/data_test.RData






-Ursprüngliche Nachricht-
Von: Gavin Simpson [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 29. November 2007 11:45
An: Malte Brockmann
Cc: [EMAIL PROTECTED]
Betreff: Re: [R] R crashes using quantreg censored estimation (method fcen)

On Thu, 2007-11-29 at 09:09 +0100, Malte Brockmann wrote:
 Dear List,
 
 my R session crashes if I repeatedly run the summary function on a
 quantreg object generated using the censored estimation method or if I
 set the number of bootstrap repititions reasonably high. Are there any
 known incompabilities between quantreg and Windows Vista  AMD64? The
 error is reproducable using R 2.6.1 and R 2.5.1.

Err, what does this have to do with Jared's reply to Max's posting about
suitable textbooks and R?

Please don't jump on a thread to ask your own question. Start your own
thread.

If you want people to help you with your problem, you are probably going
to have to give a reproducible example - my R session crashes is way
below what is requested in the posting guide. Even the statements about
what you did are not enough - people need to be able to reproduce your
problem on their machines.

Read the posting guide (URL in the footer of this email) and resend a
message to the list - a new one mind, so you start a new thread. And
make sure you include a reproducible example. If you can't send your
data, try it with one of the data sets that come with quantreg and if it
fails with that also, use that data set in your example.

You should also consider contacting the maintainer of quantreg.

HTH

G

 
  sessionInfo()
 R version 2.6.1 (2007-11-26) 
 i386-pc-mingw32 
 
 locale:
 LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252
 
 attached base packages:
 [1] stats graphics  grDevices utils datasets  methods
 base 
 
 other attached packages:
 [1] quantreg_4.10 SparseM_0.74
 
 Thanks,
 Malte 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London  [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R crashes using quantreg censored estimation (method fcen)

2007-11-29 Thread roger koenker
1.  As the posting guide advises,  queries about packages should be  
sent in the first instance
to the package author/maintainer before posting to the list.

2.  As the posting guide also advises, a _minimal_ reproducible  
example is desirable not one
that claims that somewhere in the middle of 1,000,000 bootstrap  
replications something goes
wrong.

I'll try to take a look at this with valgrind, but I can't promise  
any immediate resolution.


url:www.econ.uiuc.edu/~rogerRoger Koenker
email[EMAIL PROTECTED]Department of Economics
vox: 217-333-4558University of Illinois
fax:   217-244-6678Champaign, IL 61820


On Nov 29, 2007, at 6:32 AM, Malte Brockmann wrote:

 Thanks for your advice, Gavin. I hope to comply with the posting  
 guide this time.

 With crashing I meant that the R-session is simply terminated  
 without an error message (Vista, R2.6.1 and R2.5.1 with precompiled  
 packages, sessionInfo see below). I could reproduce the error on a  
 linux machine (R2.5.1-1 for which I have compiled the packages on  
 my own). On the linux machine I at least get the following error  
 message:

 *** caught segfault ***
 address (nil), cause 'unknown'

 Traceback:
  1: .Fortran(xys, as.integer(m), as.integer(n), as.integer 
 (p), as.integer(R), as.integer(m + 5), as.integer(p + 2),  
 as.double(x), as.double(y), as.double(tau), as.double(tol),  
 flag = integer(R), coef = double(p * R), resid = double(m),  
 integer(m), double((m + 5) * (p + 2)), double(m), as.integer 
 (1), sol = double((p + 2)), dsol = double(m), lsol =  
 as.integer(0), xx = double(m * p), yy = double(m),  
 as.integer(s), PACKAGE = quantreg)
  2: boot.rq.xy(x, y, s, tau)
  3: boot.rq(x[s, ], y[s], tau, ...)
  4: summary.fcrq(model.powell, R = r)
  5: summary(model.powell, R = 1e+06)

 I used the following command to generate the model:
 model.powell - rq(y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9,  
 method=fcen, data=data_test)
 summary(model.powell, R=100)

 I used 100 replications to make sure that the error is triggered

 I uploaded the data to www.esbf.de/quantreg/data_test.RData






 -Ursprüngliche Nachricht-
 Von: Gavin Simpson [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 29. November 2007 11:45
 An: Malte Brockmann
 Cc: [EMAIL PROTECTED]
 Betreff: Re: [R] R crashes using quantreg censored estimation  
 (method fcen)

 On Thu, 2007-11-29 at 09:09 +0100, Malte Brockmann wrote:
 Dear List,

 my R session crashes if I repeatedly run the summary function on a
 quantreg object generated using the censored estimation method or  
 if I
 set the number of bootstrap repititions reasonably high. Are there  
 any
 known incompabilities between quantreg and Windows Vista  AMD64? The
 error is reproducable using R 2.6.1 and R 2.5.1.

 Err, what does this have to do with Jared's reply to Max's posting  
 about
 suitable textbooks and R?

 Please don't jump on a thread to ask your own question. Start your own
 thread.

 If you want people to help you with your problem, you are probably  
 going
 to have to give a reproducible example - my R session crashes is way
 below what is requested in the posting guide. Even the statements  
 about
 what you did are not enough - people need to be able to reproduce your
 problem on their machines.

 Read the posting guide (URL in the footer of this email) and resend a
 message to the list - a new one mind, so you start a new thread. And
 make sure you include a reproducible example. If you can't send your
 data, try it with one of the data sets that come with quantreg and  
 if it
 fails with that also, use that data set in your example.

 You should also consider contacting the maintainer of quantreg.

 HTH

 G


 sessionInfo()
 R version 2.6.1 (2007-11-26)
 i386-pc-mingw32

 locale:
 LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany. 
 1252;LC_MONETARY=German_Germany. 
 1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252

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

 other attached packages:
 [1] quantreg_4.10 SparseM_0.74

 Thanks,
 Malte
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting- 
 guide.html
 and provide commented, minimal, self-contained, reproducible code.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting- 
 guide.html
 and provide commented, minimal, self-contained, reproducible code.
 -- 
 %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
  Dr. Gavin Simpson [t] +44 (0)20 7679 0522
  ECRC, UCL Geography,  [f] +44 (0)20 7679 0565
  Pearson Building, [e

[R] R Crashes on certain calls of Adapt

2007-11-14 Thread Omkar Muralidharan
I'm having trouble with adapt. I'm trying to use it in a Bayesian setting,
to integrate the posterior distribution, and to find posterior means. I
tried using the following script, and things went ok:

data = rnorm(100,0.2,1.1)
data = c(data,rnorm(10,3,1))
data = data[abs(data)2*sd(data)]

prior = function(x){
dgamma(x[2],shape=2,scale=1)*dnorm(x[1],0,.5)
}

liklihood = function(x,val){
prod(dnorm(val,m=x[1],sd=sqrt(.5/x[2])))#/(pnorm(2,x[1],x[2])-pnorm(-2,x[1],x[2]))^length(val)
}

unsc.post = function(x,val){
prior(x)*liklihood(x,val)
}

cons = adapt(2,c(-5,0),c(5,10),f=unsc.post,min=1e+04,max=5e+05,val=data)

However, if I try to add a skewness parameter using sn as follows, I get an
error.

data = rnorm(20,0.2,1.1)
data = c(data,rnorm(1,3,1))
data = data[abs(data)2*sd(data)]

prior = function(x){
dgamma(x[2],shape=2,scale=1)*dnorm(x[1],0,.5)*dnorm(x[3],0,.1)
}

liklihood = function(x,val){
prod(dsn(val,loc=x[1],sc=sqrt(.5/x[2]),sh=x[3]))
}

unsc.post = function(x,val){
prior(x)*liklihood(x,val)
}

cons = adapt(2,c(-5,0,-.5),c(5,10,.5),f=unsc.post,max=5e+05,val=data)

This produces the error:

 *** caught segfault ***
address 0x7eaa8580, cause 'memory not mapped'

Traceback:
 1: .C(cadapt, as.integer(ndim), as.double(lower), as.double(upper),
minpts = as.integer(minpts), maxpts = as.integer(maxpts), ff, rho =
environment(), as.double(eps), relerr = double(1), lenwrk =
as.integer(lenwrk),
value = double(1), ifail = integer(1), PACKAGE = adapt)
 2: adapt(2, c(-5, 0, -0.5), c(5, 10, 0.5), f = unsc.post, max = 5e+05,
val = data)

On a perhaps related note, if I increase the length of data to 1000+10 in
the original example, I get a garbage answer and:

Warning message:
Ifail=2, lenwrk was too small. -- fix adapt() !
 Check the returned relerr! in: adapt(2, c(-5, 0), c(5, 10), f = unsc.post,
min = 1, max = 5e+05.

And If I uncomment the line there with data size 100+10, adapt takes forever
and gives me an error saying maxpts is too low (I don't think this is
related to the previous problem, but I thought I'd provide the information
in case it is useful).

Any help would be greatly appreciated.

Thanks,
Omkar Muralidharan

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.