Re: [R] .Internal(La_rs(x, FALSE)) crashes R after long (reproducible) script on windows only

2016-02-23 Thread Anthony Damico
hi, thank you,

at the point that the corruption exists, the line
`.Internal(La_rs(x,FALSE))` actually breaks without needing `eigen`

i have provided a reproducible example but agree it might not be minimal --
i did try removing various sections, each time the bug unfortunately
vanished.  note the february 22nd edit: even interspersing the script with
the line that triggers the crash prevents the crash in the first place!

i think this occurs in C and not R, and would appreciate pointers about how
one might do that?  the only advice i've have is rebuilding R with a debug
build and gdb, but this seems like a huge lift --  are there any shortcuts
here for someone mostly unfamiliar with C code and even setup?  general
advice on this thread might also help me crack this case  :)

stackoverflow.com/questions/35455135/general-suggestions-on-debugging-internal-in-r

thanks for your time

On Tue, Feb 23, 2016 at 8:22 AM, Duncan Murdoch 
wrote:

> On 23/02/2016 7:49 AM, Anthony Damico wrote:
>
>> hi, does anybody have a clue why .Internal(La_rs(x,FALSE)) is getting
>> corrupted (actual detonation occurs within La_solve_cmplx within Lapack.c)
>> on windows but not mac/unix?
>>
>> i have provided two (long) scripts that reproduce the problem and a third
>> script modified to trigger the crash that unfortunately does not reproduce
>> the problem
>>
>>
>> http://stackoverflow.com/questions/35447971/internalla-rsx-false-crashes-r-after-long-reproducible-script-on-windows
>>
>
> Just two comments:
>
>  - Your post suggests you're calling .Internal() yourself, but that's not
> the case.  So your question should be about why eigen() crashes R.
>
>  - If you need a long script to trigger the error, I'd assume there's
> something wrong in that script. Your script uses several contributed
> packages, so the problem could be there. Shorten it to a minimal
> reproducible example that doesn't use any contributed packages.  If you
> can't leave out the packages, try to reduce it to just one, and ask the
> maintainer of that package about it.
>
> Duncan Murdoch
>

[[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] .Internal(La_rs(x, FALSE)) crashes R after long (reproducible) script on windows only

2016-02-23 Thread Duncan Murdoch

On 23/02/2016 7:49 AM, Anthony Damico wrote:

hi, does anybody have a clue why .Internal(La_rs(x,FALSE)) is getting
corrupted (actual detonation occurs within La_solve_cmplx within Lapack.c)
on windows but not mac/unix?

i have provided two (long) scripts that reproduce the problem and a third
script modified to trigger the crash that unfortunately does not reproduce
the problem

http://stackoverflow.com/questions/35447971/internalla-rsx-false-crashes-r-after-long-reproducible-script-on-windows


Just two comments:

 - Your post suggests you're calling .Internal() yourself, but that's 
not the case.  So your question should be about why eigen() crashes R.


 - If you need a long script to trigger the error, I'd assume there's 
something wrong in that script. Your script uses several contributed 
packages, so the problem could be there. Shorten it to a minimal 
reproducible example that doesn't use any contributed packages.  If you 
can't leave out the packages, try to reduce it to just one, and ask the 
maintainer of that package about it.


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.


[R] .Internal(La_rs(x, FALSE)) crashes R after long (reproducible) script on windows only

2016-02-23 Thread Anthony Damico
hi, does anybody have a clue why .Internal(La_rs(x,FALSE)) is getting
corrupted (actual detonation occurs within La_solve_cmplx within Lapack.c)
on windows but not mac/unix?

i have provided two (long) scripts that reproduce the problem and a third
script modified to trigger the crash that unfortunately does not reproduce
the problem

http://stackoverflow.com/questions/35447971/internalla-rsx-false-crashes-r-after-long-reproducible-script-on-windows

thanks

[[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] .Internal(filledcontour()) - ancient history or just plain wrong?

2014-06-14 Thread Raphael Päbst
Hello everyone!
In my ongoing odyssey through badly dokumented and sparingly commented
R-code, I've come across something that baffles me.
The following line of code

.Internal(filledcontour(as.double(x), as.double(y), z,
as.double(levels), col = col))
 not surprisingly results in an error, telling me that there is no
such function as filledcontour().
The code this comes from has been written for an older version of R,
probably 2.5.x so I was wondering, if the error results from me using
a current version (3.1.0) or if the author wanted to use
filled.contour() and forgot the '.'.

Would that in fact help or was there something called filledcontour()
that has changed into something else nowadays?

I've tried to contact the author, but he hasn't used R for at least
five years and hasn't replied so far, so I'm hoping soeone here can
give me a hint to the solution of this problem.

Many thanks in advance!

Raphael

__
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] .Internal(filledcontour()) - ancient history or just plain wrong?

2014-06-14 Thread Prof Brian Ripley

On 14/06/2014 10:04, Raphael Päbst wrote:

Hello everyone!
In my ongoing odyssey through badly dokumented and sparingly commented
R-code, I've come across something that baffles me.
The following line of code

.Internal(filledcontour(as.double(x), as.double(y), z,
as.double(levels), col = col))
  not surprisingly results in an error, telling me that there is no
such function as filledcontour().


But that passes a call to .Internal: it does not say what you say it 
does.  I suspect you saw


  there is no .Internal function 'filledcontour'

which is quite a different matter.


The code this comes from has been written for an older version of R,
probably 2.5.x so I was wondering, if the error results from me using
a current version (3.1.0) or if the author wanted to use
filled.contour() and forgot the '.'.

Would that in fact help or was there something called filledcontour()
that has changed into something else nowadays?


It has.  But it was never in the API, so should never have been used in 
user code and was never documented in R itself.


You should be able to rewrite this using .filled.contour in package 
graphics: it might be a drop-in replacement.




I've tried to contact the author, but he hasn't used R for at least
five years and hasn't replied so far, so I'm hoping soeone here can
give me a hint to the solution of this problem.

Many thanks in advance!

Raphael




--
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] .Internal(filledcontour()) - ancient history or just plain wrong?

2014-06-14 Thread Raphael Päbst
You are right, it was
  there is no .Internal function 'filledcontour'


and changing it to .filled.contour() removed the problem.

Just out of curiosity, would the old version with
.Internal(filledcontour()) have worked on older R-Versions?

Not that I fully understand how .Internal() works and should (or
should not) be used, but I'm always willing to understand more about
the code I'm working with.

Thanks again!

Raphael

On 6/14/14, Prof Brian Ripley rip...@stats.ox.ac.uk wrote:
 On 14/06/2014 10:04, Raphael Päbst wrote:
 Hello everyone!
 In my ongoing odyssey through badly dokumented and sparingly commented
 R-code, I've come across something that baffles me.
 The following line of code

 .Internal(filledcontour(as.double(x), as.double(y), z,
 as.double(levels), col = col))
   not surprisingly results in an error, telling me that there is no
 such function as filledcontour().

 But that passes a call to .Internal: it does not say what you say it
 does.  I suspect you saw

there is no .Internal function 'filledcontour'

 which is quite a different matter.

 The code this comes from has been written for an older version of R,
 probably 2.5.x so I was wondering, if the error results from me using
 a current version (3.1.0) or if the author wanted to use
 filled.contour() and forgot the '.'.

 Would that in fact help or was there something called filledcontour()
 that has changed into something else nowadays?

 It has.  But it was never in the API, so should never have been used in
 user code and was never documented in R itself.

 You should be able to rewrite this using .filled.contour in package
 graphics: it might be a drop-in replacement.


 I've tried to contact the author, but he hasn't used R for at least
 five years and hasn't replied so far, so I'm hoping soeone here can
 give me a hint to the solution of this problem.

 Many thanks in advance!

 Raphael



 --
 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.


__
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] .Internal(filledcontour()) - ancient history or just plain wrong?

2014-06-14 Thread Prof Brian Ripley

On 14/06/2014 10:30, Raphael Päbst wrote:

You are right, it was
   there is no .Internal function 'filledcontour'


and changing it to .filled.contour() removed the problem.

Just out of curiosity, would the old version with
.Internal(filledcontour()) have worked on older R-Versions?


Possibly.  Note that the internals of that undocumented .Internal did 
change over the years.




Not that I fully understand how .Internal() works and should (or
should not) be used, but I'm always willing to understand more about
the code I'm working with.

Thanks again!

Raphael

On 6/14/14, Prof Brian Ripley rip...@stats.ox.ac.uk wrote:

On 14/06/2014 10:04, Raphael Päbst wrote:

Hello everyone!
In my ongoing odyssey through badly dokumented and sparingly commented
R-code, I've come across something that baffles me.
The following line of code

.Internal(filledcontour(as.double(x), as.double(y), z,
as.double(levels), col = col))
   not surprisingly results in an error, telling me that there is no
such function as filledcontour().


But that passes a call to .Internal: it does not say what you say it
does.  I suspect you saw

there is no .Internal function 'filledcontour'

which is quite a different matter.


The code this comes from has been written for an older version of R,
probably 2.5.x so I was wondering, if the error results from me using
a current version (3.1.0) or if the author wanted to use
filled.contour() and forgot the '.'.

Would that in fact help or was there something called filledcontour()
that has changed into something else nowadays?


It has.  But it was never in the API, so should never have been used in
user code and was never documented in R itself.

You should be able to rewrite this using .filled.contour in package
graphics: it might be a drop-in replacement.



I've tried to contact the author, but he hasn't used R for at least
five years and hasn't replied so far, so I'm hoping soeone here can
give me a hint to the solution of this problem.

Many thanks in advance!

Raphael




--
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.




--
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.


[R] internal error -3 in R_decompress1

2013-08-13 Thread Jannis

Dear r users,


what could cause such an error:

internal error -3 in R_decompress1


unfortunately the error kills all my usual error catching mechanisms an 
appears on a remote cluster so I can not really tell you which command 
etc is causing it.



Thanks for any hints on where to dig for the solution (or even the just 
cause).


Jannis



R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-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=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C LC_NAME=C
 [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
 [1] snowfall_1.84-4snow_0.3-12
 [3] DistributionUtils_0.5-1RUnit_0.4.26
 [5] RColorBrewer_1.0-5 plotrix_3.5
 [7] doMC_1.3.0 iterators_1.0.6
 [9] multicore_0.1-7plyr_1.8
[11] raster_2.1-49  sp_1.0-11
[13] abind_1.4-0foreach_1.4.1
[15] RNetCDF_1.6.1-2Rssa_0.9.10
[17] forecast_4.06  svd_0.3.2-1

loaded via a namespace (and not attached):
 [1] codetools_0.2-8  colorspace_1.2-2 compiler_3.0.0 fracdiff_1.4-2
 [5] grid_3.0.0   lattice_0.20-15  nnet_7.3-7 quadprog_1.5-5
 [9] tools_3.0.0  tseries_0.10-32  zoo_1.7-10

__
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] internal error -3 in R_decompress1

2013-08-13 Thread Prof Brian Ripley

On 13/08/2013 18:47, Jannis wrote:

Dear r users,


what could cause such an error:

internal error -3 in R_decompress1


unfortunately the error kills all my usual error catching mechanisms an
appears on a remote cluster so I can not really tell you which command
etc is causing it.


It is a corrupt package installation, so re-install.




Thanks for any hints on where to dig for the solution (or even the just
cause).

Jannis



R version 3.0.0 (2013-04-03)
Platform: x86_64-unknown-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=en_US.UTF-8LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=C LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
  [1] snowfall_1.84-4snow_0.3-12
  [3] DistributionUtils_0.5-1RUnit_0.4.26
  [5] RColorBrewer_1.0-5 plotrix_3.5
  [7] doMC_1.3.0 iterators_1.0.6
  [9] multicore_0.1-7plyr_1.8
[11] raster_2.1-49  sp_1.0-11
[13] abind_1.4-0foreach_1.4.1
[15] RNetCDF_1.6.1-2Rssa_0.9.10
[17] forecast_4.06  svd_0.3.2-1

loaded via a namespace (and not attached):
  [1] codetools_0.2-8  colorspace_1.2-2 compiler_3.0.0 fracdiff_1.4-2
  [5] grid_3.0.0   lattice_0.20-15  nnet_7.3-7 quadprog_1.5-5
  [9] tools_3.0.0  tseries_0.10-32  zoo_1.7-10

__
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.


[R] internal validation_logistic regression results

2012-12-03 Thread martina CHITTANI

Hi,I'm developing a case-control study on genotyping data.I have fitted a 
logistic regression with covariates on this dataset, to pinpoint association 
between some SNPs and response to a drug treatment.  
I do not have a sample for confirmation of results, so I would perform a 
internal validation, with random subsampling of dataset.I believed that DAAG 
package might be right for me, but I found that this package perform a 
cross-validation to select best suitable model.Contact me for any questions.
Thank you in advance.Best regards,Martina   
  
[[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] internal cluster quality indexes

2012-11-19 Thread eliza botto

Dear useRs,
 
I wanted to know something about the Index.G2 and Index.G3 which Calculate G2 
and G2 internal cluster quality indexes. 
i tried to find material from internet but it seems that the file have been 
removed. Is it good to have higher values of these indexes or lower?
 
thanks in advance
eliza 
[[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] internal error -3 in R_decompress1

2012-07-25 Thread Jannis

Dear R community,

i ran into a quite cryptic error message while running some non 
interactive calculations. The error message reads:


Error in formals(FilterTSeriesSSA) : internal error -3 in R_decompress1


This FilterTseriesSSA is a function I wrote. Where could such an error 
originate from? What is the best place to start digging for the cause of 
the error? Running the same line of code interactively or using the 
output of dump.frames also does not reproduce the error.



Cheers
jannis

__
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] internal error -3 in R_decompress1

2012-07-25 Thread Jeff Newmiller
try

options (error= recover)

and examine the stack frames.
---
Jeff NewmillerThe .   .  Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
--- 
Sent from my phone. Please excuse my brevity.

Jannis bt_jan...@yahoo.de wrote:

Dear R community,

i ran into a quite cryptic error message while running some non 
interactive calculations. The error message reads:

Error in formals(FilterTSeriesSSA) : internal error -3 in R_decompress1


This FilterTseriesSSA is a function I wrote. Where could such an error 
originate from? What is the best place to start digging for the cause
of 
the error? Running the same line of code interactively or using the 
output of dump.frames also does not reproduce the error.


Cheers
jannis

__
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] .Internal(download())

2010-12-01 Thread Koray Kaya
Hello,

I tried to use GEOQuery package of BioC. It does not download GSE. 
I investigated problem, understood that the problem was about internal function 
download.
Reccomendations about it mostly suggest switching any proxy off in R. I did, 
and nothing changed.

I use Ubuntu Lucid 64 bit

Thanks

[[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] .Internal(download())

2010-12-01 Thread Koray Kaya
Hello, I tried to use GEOQuery package of BioC. It does not download GSE. I 
investigated problem, understood that the problem was about internal function 
download. Reccomendations about it mostly suggest switching any proxy off in 
R. I did, and nothing changed. 
I use Ubuntu Lucid 64 bit
Thanks

[[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] .Internal(download())

2010-12-01 Thread Duncan Murdoch

On 01/12/2010 5:12 AM, Koray Kaya wrote:

Hello, I tried to use GEOQuery package of BioC. It does not download GSE. I investigated 
problem, understood that the problem was about internal function download. 
Reccomendations about it mostly suggest switching any proxy off in R. I did, and nothing 
changed.
I use Ubuntu Lucid 64 bit
Thanks


You posted this twice, but in neither case did you post anything usable 
to answer the question.  Please read the posting guide.  (But you might 
want to post this question to a Bioconductor list:  it looks like a 
problem with GEOQuery, not a general R problem.  Packages shouldn't 
normally call .Internal() functions.)


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 Internal Web Server Loopback Interface Limit

2010-04-12 Thread D. Dashcle

Is there a setting or easy way I can remove the code that makes R only listen 
for web traffic on 127.0.0.1? I've noticed it seems to reject traffic to both 
the regular help files (i.e. what starts up when I do ?function), as well as 
if I try to connect to pages I've made for the R.rsp package. We could live 
without the help files, but it would be neat to allow others to access the 
small web-based R scripts for R.rsp since it already has a web-server built-in. 

I setup a reverse proxy on the same box that shuffles inbound traffic to 
127.0.0.1:port number, but this is an extremely hokey solution :)

-D
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 

PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5
[[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] .Internal

2009-03-23 Thread rkevinburton
Sorry to be so dense but the article that you suggest does not give any 
information on how the arguments are packed up. I look at the call:

val - .Internal(fmin(function(arg) -f(arg, ...), lower, upper, tol))

and then with the help of this article I find do_fmin in optimize.c:

SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)

Again there doesn't seem to be any coorespondance between lower, upper, tol and 
the arguments to do_fmin. So I am missing a step.

Thank you.

Kevin


 Berwin A Turlach ber...@maths.uwa.edu.au wrote: 
 G'day Kevin,
 
 On Wed, 18 Mar 2009 21:46:51 -0700
 rkevinbur...@charter.net wrote:
 
  I was trying to find source for optimize and I ran across
  
  function (f, interval, ..., lower = min(interval), upper =
  max(interval), maximum = FALSE, tol = .Machine$double.eps^0.25) 
  {
  if (maximum) {
  val - .Internal(fmin(function(arg) -f(arg, ...), lower, 
  upper, tol))
  list(maximum = val, objective = f(val, ...))
  }
  else {
  val - .Internal(fmin(function(arg) f(arg, ...), lower, 
  upper, tol))
  list(minimum = val, objective = f(val, ...))
  }
  }
  
  Then I did a search for fmin and i came up with:
  
  /* fmin(f, xmin, xmax tol) */
  SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
  
  
  So my question is where do I find the intermediary step between 
  
  .Internal(fmin(function(arg) f(arg, ...), lower,  upper, tol))
  
  and
  
  SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 @Article{Rnews:Ligges:2006,
   author   = {Uwe Ligges},
   title= {{R} {H}elp {D}esk: {Accessing} the Sources},
   journal  = {R News},
   year = 2006,
   volume   = 6,
   number   = 4,
   pages= {43--45},
   month= {October},
   url  = http,
   pdf= Rnews2006-4
 }
 
 http://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf
 
  The number of arguments doesn't match up. I am guessing that lower
  and upper somehow get merged into the args. And rho is 'tol'. Right?
 
 Unlikely.  In Writing R Extensions (and the functions I looked up),
 'rho' usually denotes an environment that is used to evaluate
 expressions in.  Typically (i.e. in cases that I had need to look at),
 all arguments are rolled into the SEXP arg for internal functions.
 
 HTH.
 
 Cheers,
 
   Berwin

__
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] .Internal

2009-03-23 Thread Berwin A Turlach
G'day Kevin,

On Mon, 23 Mar 2009 18:48:16 -0400
rkevinbur...@charter.net wrote:

 Sorry to be so dense but the article that you suggest does not give
 any information on how the arguments are packed up. I look at the
 call:
 
 val - .Internal(fmin(function(arg) -f(arg, ...), lower, upper, tol))
 
 and then with the help of this article I find do_fmin in optimize.c:
 
 SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)

Sorry for not being clear enough.  Yes, the article tells you how to
find out that do_fmin is (eventually) called when you call optimize on
the command line.  I thought that this was one of your questions.

 Again there doesn't seem to be any coorespondance between lower,
 upper, tol and the arguments to do_fmin. So I am missing a step.

As far as I know, .Internal has the same interface as .External.  So a
study of Writing R Extensions should give insight regarding this
step.  In particular Chapter 5 (System and foreign language interfaces)
- Section 5.10 (Interface functions .Call and .External) - Section
5.10.2 (Calling .External).

Essentially, all arguments to a C function called via .Internal
or .External are passed as a single SEXP; this allows to pass an
unlimited number of arguments to a C function as all other interfaces
to native routines (.C, .Call, .Fortran) have some limit, albeit a
rather generous one, on the number of arguments that can be passed to
the native routine.

I believe you can think of that single SEXP as a list containing the
individual arguments.  Accessing those arguments one by one involves
macros with names like CDR, CAR, CADR, CADDR, CADDDR, CAD4R and so
forth.  As I understand it, if you are fluent in Lisp (Scheme?) and how
components of a list are referred to in that language, then you have no
problems with understanding the names of those macros.  Since I never
became comfortable with those languages, I restrict myself to .C
and .Call; YMMV.

HTH.

Cheers,

Berwin

=== Full address =
Berwin A TurlachTel.: +65 6516 4416 (secr)
Dept of Statistics and Applied Probability+65 6516 6650 (self)
Faculty of Science  FAX : +65 6872 3919   
National University of Singapore 
6 Science Drive 2, Blk S16, Level 7  e-mail: sta...@nus.edu.sg
Singapore 117546http://www.stat.nus.edu.sg/~statba

__
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] .Internal

2009-03-18 Thread rkevinburton
I was trying to find source for optimize and I ran across

function (f, interval, ..., lower = min(interval), upper = max(interval), 
maximum = FALSE, tol = .Machine$double.eps^0.25) 
{
if (maximum) {
val - .Internal(fmin(function(arg) -f(arg, ...), lower, 
upper, tol))
list(maximum = val, objective = f(val, ...))
}
else {
val - .Internal(fmin(function(arg) f(arg, ...), lower, 
upper, tol))
list(minimum = val, objective = f(val, ...))
}
}

Then I did a search for fmin and i came up with:

/* fmin(f, xmin, xmax tol) */
SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)


So my question is where do I find the intermediary step between 

.Internal(fmin(function(arg) f(arg, ...), lower,  upper, tol))

and

SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)

The number of arguments doesn't match up. I am guessing that lower and upper 
somehow get merged into the args. And rho is 'tol'. Right?

Thank you for your comments.

Kevin

__
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] .Internal

2009-03-18 Thread Berwin A Turlach
G'day Kevin,

On Wed, 18 Mar 2009 21:46:51 -0700
rkevinbur...@charter.net wrote:

 I was trying to find source for optimize and I ran across
 
 function (f, interval, ..., lower = min(interval), upper =
 max(interval), maximum = FALSE, tol = .Machine$double.eps^0.25) 
 {
 if (maximum) {
 val - .Internal(fmin(function(arg) -f(arg, ...), lower, 
 upper, tol))
 list(maximum = val, objective = f(val, ...))
 }
 else {
 val - .Internal(fmin(function(arg) f(arg, ...), lower, 
 upper, tol))
 list(minimum = val, objective = f(val, ...))
 }
 }
 
 Then I did a search for fmin and i came up with:
 
 /* fmin(f, xmin, xmax tol) */
 SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 
 So my question is where do I find the intermediary step between 
 
 .Internal(fmin(function(arg) f(arg, ...), lower,  upper, tol))
 
 and
 
 SEXP attribute_hidden do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)

@Article{Rnews:Ligges:2006,
  author   = {Uwe Ligges},
  title= {{R} {H}elp {D}esk: {Accessing} the Sources},
  journal  = {R News},
  year = 2006,
  volume   = 6,
  number   = 4,
  pages= {43--45},
  month= {October},
  url  = http,
  pdf  = Rnews2006-4
}

http://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf

 The number of arguments doesn't match up. I am guessing that lower
 and upper somehow get merged into the args. And rho is 'tol'. Right?

Unlikely.  In Writing R Extensions (and the functions I looked up),
'rho' usually denotes an environment that is used to evaluate
expressions in.  Typically (i.e. in cases that I had need to look at),
all arguments are rolled into the SEXP arg for internal functions.

HTH.

Cheers,

Berwin

__
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] Internal Memory Limit in R

2008-12-27 Thread Gundala Viswanath
Hi all,

What's the limit of memory size that can be handled by R?

The reason I ask this is because I want to perform
tag counts using 'table' function.
And there are around 4~5GB of such tags to be counted.

I wonder if R can handle such large datasets.

- Gundala Viswanath
Jakarta - Indonesia

__
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] Internal Memory Limit in R

2008-12-27 Thread Prof Brian Ripley
Once again you are asking questions that the help system can tell you the 
answer to.  Try


help.search(memory limit)

and also learn about RSiteSearch.

On Sat, 27 Dec 2008, Gundala Viswanath wrote:


Hi all,

What's the limit of memory size that can be handled by R?

The reason I ask this is because I want to perform
tag counts using 'table' function.
And there are around 4~5GB of such tags to be counted.

I wonder if R can handle such large datasets.

- Gundala Viswanath
Jakarta - Indonesia


--
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.


[R] Internal and displayed precision of numbers

2008-11-05 Thread Oliver Bandel
Hello,

can the displayed and/or used precision of numbers be
configured? And if... how?


Ciao,
   Oliver

__
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] Internal and displayed precision of numbers

2008-11-05 Thread Uwe Ligges



Oliver Bandel wrote:

Hello,

can the displayed and/or used precision of numbers be
configured? And if... how?



See ?.Machine for the internally used precision.
See ?options and ?format/?formatC/?print for the printed precision.

Uwe Ligges






Ciao,
   Oliver

__
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] Internal and displayed precision of numbers

2008-11-05 Thread John Kane
sprintf() for displayed numbers perhaps.  

--- On Wed, 11/5/08, Oliver Bandel [EMAIL PROTECTED] wrote:

 From: Oliver Bandel [EMAIL PROTECTED]
 Subject: [R] Internal and displayed precision of numbers
 To: r-help@r-project.org
 Received: Wednesday, November 5, 2008, 8:38 AM
 Hello,
 
 can the displayed and/or used precision of numbers be
 configured? And if... how?
 
 
 Ciao,
Oliver
 
 __
 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] Internal and displayed precision of numbers

2008-11-05 Thread Oliver Bandel
Hello,

many thanks!

BTW: I read your book. :)
It's quite good.

But I didn'tfoud the precision-stuff in it.
Adding information about this topic in the next
edition might be a good idea.

Nevertheless it explains crucial points very good,
and from that starting point, it's easier to understand the
manuals/help-pages.

Ciao,
   Oliver








Zitat von Uwe Ligges [EMAIL PROTECTED]:



 Oliver Bandel wrote:
  Hello,
 
  can the displayed and/or used precision of numbers be
  configured? And if... how?


 See ?.Machine for the internally used precision.
 See ?options and ?format/?formatC/?print for the printed precision.

 Uwe Ligges



 
 
  Ciao,
 Oliver
 
  __
  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] Internal and displayed precision of numbers

2008-11-05 Thread Uwe Ligges



Oliver Bandel wrote:

Hello,

many thanks!

BTW: I read your book. :)
It's quite good.


Thank you.



But I didn'tfoud the precision-stuff in it.
Adding information about this topic in the next
edition might be a good idea.


These numeric things are an interesting and important topic, of cours. 
Question is how much to add, since it can be a whole book of its own. I 
am teaching Computergetützte Statistik (i.e. something like numerics 
for applied statisticians) this term anyway.


Best,
Uwe






Nevertheless it explains crucial points very good,
and from that starting point, it's easier to understand the
manuals/help-pages.

Ciao,
   Oliver








Zitat von Uwe Ligges [EMAIL PROTECTED]:



Oliver Bandel wrote:

Hello,

can the displayed and/or used precision of numbers be
configured? And if... how?


See ?.Machine for the internally used precision.
See ?options and ?format/?formatC/?print for the printed precision.

Uwe Ligges





Ciao,
   Oliver

__
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] Internal functions

2007-12-07 Thread Charles C. Berry



See

?body

HTH,

Chuck


On Fri, 7 Dec 2007, piotr iksiński wrote:


I've complex problem and this's idealization of it:

v=1:10

fx-function(x){
v[x]=v[x]*2}

fy-function(y){
fx(y)}

for(i in 1:10){
fy(i)}

How to modife expresion (and only that):
{v[x]=v[x]^2}

to achive the redefinetion of the values of vector v, the result should
be: v=(1:10)*2. I think, that could be done with using of internal
functions, but I'm not the programmer.
Thanks for help
pg


Płyta CD i kartka pocztowa Pocztówka do Św.Mikołaja 2007 już
w sprzedaży. Kupując tę płytę pomagasz dzieciom
z domów dziecka. wwW.pocztowkadoswietegomikolaja.pl
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fpocztowka.htmlsid=122

__
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.



Charles C. Berry(858) 534-2098
Dept of Family/Preventive Medicine
E mailto:[EMAIL PROTECTED]  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

__
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] Internal functions

2007-12-07 Thread piotr iksiński
I've complex problem and this's idealization of it:

v=1:10

fx-function(x){
v[x]=v[x]*2}

fy-function(y){
fx(y)}

for(i in 1:10){
fy(i)}

How to modife expresion (and only that):
{v[x]=v[x]^2}

to achive the redefinetion of the values of vector v, the result should 
be: v=(1:10)*2. I think, that could be done with using of internal 
functions, but I'm not the programmer.
Thanks for help
pg


Płyta CD i kartka pocztowa Pocztówka do Św.Mikołaja 2007 już 
w sprzedaży. Kupując tę płytę pomagasz dzieciom 
z domów dziecka. wwW.pocztowkadoswietegomikolaja.pl
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fpocztowka.htmlsid=122

__
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.