[Rd] debug/recover/.Internal

2016-04-04 Thread Mick Jordan
I was surprised by difference between using options(error=browser) and 
options(error=recover) when handling an error from sys.frame that I 
assume is related to the fact that the error is thrown from the 
.Internal and the 'which' parameter to the closure isn't available.


> options(error=browser)
> f <- function() sys.frame(-3)
> f()
Error in sys.frame(-3) : not that many frames on the stack
Called from: sys.frame(-3)
Browse[1]> where
where 1 at #1: sys.frame(-3)
where 2: f()

Browse[1]> print(which)
function (x, arr.ind = FALSE, useNames = TRUE)
{
wh <- .Internal(which(x))
if (arr.ind && !is.null(d <- dim(x)))
arrayInd(wh, d, dimnames(x), useNames = useNames)
else wh
}



Whereas:

> options(error=recover)
> f()
Error in sys.frame(-3) : not that many frames on the stack

Enter a frame number, or 0 to exit

1: f()
2: #1: sys.frame(-3)

Selection: 2
Called from: top level
Browse[1]> print(which)
[1] -3
Browse[1]>

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


Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-18 Thread Duncan Murdoch
On 17/09/2014, 11:52 PM, Andre Mikulec wrote:
> Help,
> 
> My Rgui.exe, main.f, main.o, and main.dll are all in the same directory.
> When I try to set a breakpoint, I get this response
> 
> (gdb) b main.f:3   
> No source file named main.f
> 
> I tried the -gdwarf-2 requirement in both the compiling and linking 
> statements.  This did not fix the problem.
> The cygwin site recommended the -g option.  I tried this.  This did not fix 
> the problem.


This is getting to be a question about gdb, and I'm no expert on that.
I do remember there's a command "dir" which says where to find source;
perhaps that is necessary even when the working directory holds the source.


> I did not use R CMD SHLIB ( I ran the statements manually ).

I don't recommend that.  You can add options to R CMD SHLIB, but you are
likely to run into problems with R if you leave any out.

DUncan Murdoch

> 
> Andre Mikulec
> andre_miku...@hotmail.com
> 
> 
> 
>> From: r-devel-requ...@r-project.org
>> Subject: R-devel Digest, Vol 139, Issue 15
>> To: r-devel@r-project.org
>> Date: Tue, 16 Sep 2014 12:00:06 +0200
>>
>> Send R-devel mailing list submissions to
>> r-devel@r-project.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> or, via email, send a message with subject or body 'help' to
>> r-devel-requ...@r-project.org
>>
>> You can reach the person managing the list at
>> r-devel-ow...@r-project.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of R-devel digest..."
>>
>>
>> Today's Topics:
>>
>> 1. Debug an R windows (Fortran) DLL within R with gdb?
>> (Andre Mikulec)
>> 2. Re: Debug an R windows (Fortran) DLL within R with gdb?
>> (Duncan Murdoch)
>>
>>
>> --
>>
>> Message: 1
>> Date: Mon, 15 Sep 2014 17:25:49 -0400
>> From: Andre Mikulec 
>> To: "r-devel@r-project.org" 
>> Subject: [Rd] Debug an R windows (Fortran) DLL within R with gdb?
>> Message-ID: 
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>>
>> Hi,?
>> I have a Fortran 77 subroutine (dll).
>>
>> On windows XP, how ?would I 'debug it(Fortran) within R' using gdb?
>>
>> This is how I made it.
>> --
>>
>> R CMD SHLIB main.f
>>
>> gfortran -m32 ? ? -O3 ?-mtune=core2 -c main.f -o main.o
>>
>> gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
>> -LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR
>>
>>
>> Here is the contents of the file ?main.f
>> -
>>
>> ? ? ? SUBROUTINE NGCD(NA, NB, NGCDO)?
>> ? ? ? ? IA = NA
>> ? ? ? ? IB = NB
>> ? ? 1 ? IF (IB.NE.0) THEN
>> ? ? ? ? ? ITEMP = IA
>> ? ? ? ? ? IA = IB
>> ? ? ? ? ? IB = MOD(ITEMP, IB)
>> ? ? ? ? ? GOTO 1
>> ? ? ? ? END IF
>> ? ? ? ? NGCDO = IA ?
>> ? ? ? ? RETURN
>> ? ? ? END
>>
>> Thank you,
>> Andre Mikulec
>> andre_miku...@hotmail.com
>>
>>
>>
>>
>>
>> --
>>
>> Message: 2
>> Date: Mon, 15 Sep 2014 18:05:36 -0400
>> From: Duncan Murdoch 
>> To: Andre Mikulec , "r-devel@r-project.org"
>> 
>> Subject: Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?
>> Message-ID: <541762b0.1050...@gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> On 15/09/2014, 5:25 PM, Andre Mikulec wrote:
>>>
>>> Hi,
>>> I have a Fortran 77 subroutine (dll).
>>>
>>> On windows XP, how would I 'debug it(Fortran) within R' using gdb?
>>>
>>> This is how I made it.
>>> --
>>>
>>> R CMD SHLIB main.f
>>>
>>> gfortran -m32 -O3 -mtune=core2 -c main.f -o main.o
>>>
>>> gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
>>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
>>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
>>> -LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR
>>>
>>>
>>> Here is the contents of the file main.f
>>> -

Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-17 Thread Andre Mikulec
Help,

My Rgui.exe, main.f, main.o, and main.dll are all in the same directory.
When I try to set a breakpoint, I get this response

(gdb) b main.f:3               
No source file named main.f

I tried the -gdwarf-2 requirement in both the compiling and linking statements. 
 This did not fix the problem.
The cygwin site recommended the -g option.  I tried this.  This did not fix the 
problem.
I did not use R CMD SHLIB ( I ran the statements manually ).

Andre Mikulec
andre_miku...@hotmail.com



> From: r-devel-requ...@r-project.org
> Subject: R-devel Digest, Vol 139, Issue 15
> To: r-devel@r-project.org
> Date: Tue, 16 Sep 2014 12:00:06 +0200
>
> Send R-devel mailing list submissions to
> r-devel@r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://stat.ethz.ch/mailman/listinfo/r-devel
> or, via email, send a message with subject or body 'help' to
> r-devel-requ...@r-project.org
>
> You can reach the person managing the list at
> r-devel-ow...@r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-devel digest..."
>
>
> Today's Topics:
>
> 1. Debug an R windows (Fortran) DLL within R with gdb?
> (Andre Mikulec)
> 2. Re: Debug an R windows (Fortran) DLL within R with gdb?
> (Duncan Murdoch)
>
>
> --
>
> Message: 1
> Date: Mon, 15 Sep 2014 17:25:49 -0400
> From: Andre Mikulec 
> To: "r-devel@r-project.org" 
> Subject: [Rd] Debug an R windows (Fortran) DLL within R with gdb?
> Message-ID: 
> Content-Type: text/plain; charset="iso-8859-1"
>
>
> Hi,?
> I have a Fortran 77 subroutine (dll).
>
> On windows XP, how ?would I 'debug it(Fortran) within R' using gdb?
>
> This is how I made it.
> --
>
> R CMD SHLIB main.f
>
> gfortran -m32 ? ? -O3 ?-mtune=core2 -c main.f -o main.o
>
> gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
> -LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR
>
>
> Here is the contents of the file ?main.f
> -
>
> ? ? ? SUBROUTINE NGCD(NA, NB, NGCDO)?
> ? ? ? ? IA = NA
> ? ? ? ? IB = NB
> ? ? 1 ? IF (IB.NE.0) THEN
> ? ? ? ? ? ITEMP = IA
> ? ? ? ? ? IA = IB
> ? ? ? ? ? IB = MOD(ITEMP, IB)
> ? ? ? ? ? GOTO 1
> ? ? ? ? END IF
> ? ? ? ? NGCDO = IA ?
> ? ? ? ? RETURN
> ? ? ? END
>
> Thank you,
> Andre Mikulec
> andre_miku...@hotmail.com
>
>
>
>
>
> --
>
> Message: 2
> Date: Mon, 15 Sep 2014 18:05:36 -0400
> From: Duncan Murdoch 
> To: Andre Mikulec , "r-devel@r-project.org"
> 
> Subject: Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?
> Message-ID: <541762b0.1050...@gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 15/09/2014, 5:25 PM, Andre Mikulec wrote:
>>
>> Hi,
>> I have a Fortran 77 subroutine (dll).
>>
>> On windows XP, how would I 'debug it(Fortran) within R' using gdb?
>>
>> This is how I made it.
>> --
>>
>> R CMD SHLIB main.f
>>
>> gfortran -m32 -O3 -mtune=core2 -c main.f -o main.o
>>
>> gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
>> -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
>> -LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR
>>
>>
>> Here is the contents of the file main.f
>> -
>>
>> SUBROUTINE NGCD(NA, NB, NGCDO)
>> IA = NA
>> IB = NB
>> 1 IF (IB.NE.0) THEN
>> ITEMP = IA
>> IA = IB
>> IB = MOD(ITEMP, IB)
>> GOTO 1
>> END IF
>> NGCDO = IA
>> RETURN
>> END
>
> I don't think you put in any compile options to include symbolic
> information. You need to do that. I think the option you want is
> -gdwarf-2, but I rarely use Fortran, and never use SHLIB, so I could be
> wrong. I'll assume you can figure out how to do that.
>
> Run R under gdb using
>
> gdb Rgui
>
> Load your DLL.
>
> Break to gdb using the menu entry "Misc | Break to debugger".
>
> Set a breakpoint, e.g.
>
> b main.f:3
>
> to set it on line 3. Then use c to let R continue, and make a call to
> your code. Then the usual gdb commands will work after it breaks.
>
> Duncan Murdoch
>
>
>
> --
>
> ___
> R-devel@r-project.org mailing list DIGESTED
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
> End of R-devel Digest, Vol 139, Issue 15
> 
  
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-15 Thread Duncan Murdoch
On 15/09/2014, 5:25 PM, Andre Mikulec wrote:
> 
> Hi, 
> I have a Fortran 77 subroutine (dll).
> 
> On windows XP, how  would I 'debug it(Fortran) within R' using gdb?
> 
> This is how I made it.
> --
> 
> R CMD SHLIB main.f
> 
> gfortran -m32 -O3  -mtune=core2 -c main.f -o main.o
> 
> gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
> -LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR
> 
> 
> Here is the contents of the file  main.f
> -
> 
>   SUBROUTINE NGCD(NA, NB, NGCDO) 
> IA = NA
> IB = NB
> 1   IF (IB.NE.0) THEN
>   ITEMP = IA
>   IA = IB
>   IB = MOD(ITEMP, IB)
>   GOTO 1
> END IF
> NGCDO = IA  
> RETURN
>   END

I don't think you put in any compile options to include symbolic
information.  You need to do that.  I think the option you want is
-gdwarf-2, but I rarely use Fortran, and never use SHLIB, so I could be
wrong.  I'll assume you can figure out how to do that.

Run R under gdb using

gdb Rgui

Load your DLL.

Break to gdb using the menu entry "Misc | Break to debugger".

Set a breakpoint, e.g.

b main.f:3

to set it on line 3.  Then use c to let R continue, and make a call to
your code.  Then the usual gdb commands will work after it breaks.

Duncan Murdoch

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


[Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-15 Thread Andre Mikulec

Hi, 
I have a Fortran 77 subroutine (dll).

On windows XP, how  would I 'debug it(Fortran) within R' using gdb?

This is how I made it.
--

R CMD SHLIB main.f

gfortran -m32     -O3  -mtune=core2 -c main.f -o main.o

gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o 
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 
-Ld:/RCompile/CRANpkg/extralibs64/local/lib -lgfortran 
-LF:/ProgramFiles/R/R-3.1.1/bin/i386 -lR


Here is the contents of the file  main.f
-

      SUBROUTINE NGCD(NA, NB, NGCDO) 
        IA = NA
        IB = NB
    1   IF (IB.NE.0) THEN
          ITEMP = IA
          IA = IB
          IB = MOD(ITEMP, IB)
          GOTO 1
        END IF
        NGCDO = IA  
        RETURN
      END

Thank you,
Andre Mikulec
andre_miku...@hotmail.com


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


[Rd] debug()/trace() to standard error?

2014-06-24 Thread Henrik Bengtsson
Does anyone know of a simple/neat way to make debug() and/or trace()
send output to the standard error stream (not standard output)?

Thanks,

Henrik

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


[Rd] debug package calling C++ code using valgrind

2013-01-14 Thread mullahmohammedomar
Hi,

I am trying to debug a package which I helped to develop since we were
notified by CRAN that our package randomly fails to run its examples. Hence,
I reinstalled R with "with-valgrind-instrumentation=2" and installed our
package with 

MAKEFLAGS="CFLAGS='-O0 -g3' CXXFLAGS='-O0 -g3'" R CMD INSTALL --build hsmm

Then, I ran the examples of our package with

R -d "valgrind --tool=memcheck" --vanilla < hsmm.Rcheck/hsmm-Ex.R

and got the following output:  out.txt
  

Unfortunately, this does not match the error messages from valgrind we were
provided by CRAN:  hsmm-Ex.Rout
  

In particular, the run by CRAN yielded lots of accesses to uninitialized
variables within the C++ code of the package, whereas I do not get any error
message with regards to the C++ code.

Does anyone know what I am doing wrong?




--
View this message in context: 
http://r.789695.n4.nabble.com/debug-package-calling-C-code-using-valgrind-tp4655507.html
Sent from the R devel mailing list archive at Nabble.com.

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


Re: [Rd] debug R objects at C level

2012-06-21 Thread Adrian Duşa
On Thu, Jun 21, 2012 at 3:02 PM, Duncan Murdoch
 wrote:
> On 12-06-21 7:38 AM, Adrian Duşa wrote:
>>[...]
>
> You seeing the value, not a pointer, but you are using an integer format to
> display a real.  You need the %f or related format.
>
> I would also recommend using Rprintf() rather than printf().  The latter
> will only work on some platforms, while Rprintf() should work everywhere.

Oh... so that was a printing issue... indeed very basic (starting to
learn C and slowly catching up with various data formats).
Thanks as well for the tip with Rprintf(), that also helps.

Best wishes,
Adrian

-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd.
050025 Bucharest sector 5
Romania
Tel.:+40 21 3126618 \
       +40 21 3120210 / int.101
Fax: +40 21 3158391

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


Re: [Rd] debug R objects at C level

2012-06-21 Thread Duncan Murdoch

On 12-06-21 7:38 AM, Adrian Duşa wrote:

Dear R-devel,

I am now at a debugging phase, and would like to inspect the
(individual) values in an arbitrary R vector. It should be simple, but
after hours of reading I am simply unable to find the right
information.

A possible C code is:
±
# include
# include
# include

SEXP foo(SEXP x) // where x is a vector passed by an R function
 double *px;
 int i;
 px = REAL(x);

 for (i = 0; i<  length(x); i++) {
 printf("%d\n", px[i]);// not good
 }
}
±

That doesn't do the trick, because it only prints the pointer itself.
What I'd like to do is to inspect is the actual vector value in the
position i, that the pointer px[i] points to.

I read about PrintVector() in Rinternals.h, but that prints the whole
R vector, while for debugging purposes I need to inspect individual
values, one at at time.


You seeing the value, not a pointer, but you are using an integer format 
to display a real.  You need the %f or related format.


I would also recommend using Rprintf() rather than printf().  The latter 
will only work on some platforms, while Rprintf() should work everywhere.


Duncan Murdoch

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


[Rd] debug R objects at C level

2012-06-21 Thread Adrian Duşa
Dear R-devel,

I am now at a debugging phase, and would like to inspect the
(individual) values in an arbitrary R vector. It should be simple, but
after hours of reading I am simply unable to find the right
information.

A possible C code is:
±
# include 
# include 
# include 

SEXP foo(SEXP x) // where x is a vector passed by an R function
double *px;
int i;
px = REAL(x);

for (i = 0; i < length(x); i++) {
printf("%d\n", px[i]);// not good
}
}
±

That doesn't do the trick, because it only prints the pointer itself.
What I'd like to do is to inspect is the actual vector value in the
position i, that the pointer px[i] points to.

I read about PrintVector() in Rinternals.h, but that prints the whole
R vector, while for debugging purposes I need to inspect individual
values, one at at time.

Thanks in advance,
Adrian

-- 
Adrian Dusa
Romanian Social Data Archive
1, Schitu Magureanu Bd.
050025 Bucharest sector 5
Romania
Tel.:+40 21 3126618 \
       +40 21 3120210 / int.101
Fax: +40 21 3158391

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


[Rd] debug: mtrace(fun, FALSE) doesn't work for me

2009-08-03 Thread Rune Schjellerup Philosof
Hi

tmp <- function(t=1) t+1
mtrace(tmp)
mtrace(tmp)
#Re-applying trace...
#Error in `[[<-`(`*tmp*`, 1, value = list(t + 1)) :
#  incompatible types (from list to expression) in [[ assignment

I think this used to work on my computer.
A month ago I upgraded R from r-base (2.9.0-4intrepid0) to 2.9.1-2intrepid.

Apparently it would be fixed if unmtrace is changed from
body(f) <- list(body(f)[[3]])
to
body(f) <- body(f)[[3]]

-- 
Regards
Rune Schjellerup Philosof
Ph.d.-studerende, Statistik, IST, SDU

Telefon:  6550 3607
E-mail:   rphilo...@health.sdu.dk
Adresse:  J.B. Winsløwsvej 9, 5000 Odense C

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


[Rd] debug

2009-07-27 Thread Robert Gentleman

Hi,
  I just committed a change to R-devel so that if debug is called on an 
S3 generic function, all methods will also automatically have debug 
turned on for them (if they are dispatched to from the generic).


  I hope to be able to extend this to S4 and a few other cases that are 
currently not being handled over the the next few weeks.


  Please let me know if you have problems, or suggested improvements.

 Robert
--
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgent...@fhcrc.org

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


Re: [Rd] Debug with set.seed()

2007-06-02 Thread Patrick Burns
I think you will find that 'set.seed' does give you the same
random state each time.  That you don't get the same result
each time implies a bug in your code.  Looking for uninitialized
variables would probably be a good start.  Using valgrind
under Linux would most likely find the error quickly.

Also, using '<<-' is generally a bad idea.

Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

Tong Wang wrote:

>HI, all
>I am debugging an R code with dynamically loaded function in it.  It seems 
> set.seed(n) does not give me the same 
>random draws every time.  Could somebody tell me what I should do to get the 
>same outcome verytime ?
>I am not sure what infomation is relevent to this question , the following 
> is a really scatchy description of the code I wrote.I am using the R-2.4.1 
> built under Cygwin. OS is WinXP.
>
>Thanks a lot  for any help.  
>  
>Myfunction<-function(...) {
>...
>drawsomething<-function(){  out<- .C( "drawit"...)  
> var <<- out$var  
> # assign the outputs}
>...
>for( i in 1 : iter) { .
>drawsomething()
>.. }
>
>   reture( var.stor ) #return stored result
>}
>
>__
>R-devel@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>  
>

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


[Rd] Debug with set.seed()

2007-06-01 Thread Tong Wang
HI, all
I am debugging an R code with dynamically loaded function in it.  It seems 
set.seed(n) does not give me the same 
random draws every time.  Could somebody tell me what I should do to get the 
same outcome verytime ?
I am not sure what infomation is relevent to this question , the following 
is a really scatchy description of the code I wrote.I am using the R-2.4.1 
built under Cygwin. OS is WinXP.

Thanks a lot  for any help.  
  
Myfunction<-function(...) {
...
drawsomething<-function(){  out<- .C( "drawit"...)  
 var <<- out$var  # 
assign the outputs}
...
for( i in 1 : iter) { .
drawsomething()
.. }

   reture( var.stor ) #return stored result
}

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


Re: [Rd] [debug] package - Error in all.levs (PR#9638)

2007-04-30 Thread Prof Brian Ripley
>From the FAQ:

   Finally, check carefully whether the bug is with R, or a contributed
   package.  Bug reports on contributed packages should be sent first to
   the package maintainer, and only submitted to the R-bugs repository by
   package maintainers, mentioning the package in the subject line.

'debug' is a contributed package, and does not name you as the maintainer.

Please do as we ask.


On Sun, 29 Apr 2007, [EMAIL PROTECTED] wrote:

> Dear All,
>
> I encountered the following problem:
>
> fun1 <- function(x){
> 2*cos(x)
> }
>
>> library(debug)
>> mtrace(fun1)
>> fun1(0.1)
> Error in all.levs[[j]] : subscript out of bounds
>
>> sessionInfo()
> R version 2.5.0 (2007-04-23)
> i386-pc-mingw32
>
> locale:
> LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250;
> LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250
>
> attached base packages:
> [1] "tcltk" "stats" "graphics"  "grDevices" "utils" "datasets"
> "methods"   "base"
>
> other attached packages:
>   debug mvbutils waveslim  polynom
> "1.1.0"  "1.1.1""1.6"  "1.3-2"
>
>
> OS: WinXPSP1
>
> Regards
>
> Piotrek Z
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] [debug] package - Error in all.levs (PR#9638)

2007-04-30 Thread Piotr . Zuraniewski
Dear All,

I encountered the following problem:

fun1 <- function(x){
2*cos(x)
}

>library(debug)
> mtrace(fun1)
> fun1(0.1)
Error in all.levs[[j]] : subscript out of bounds

> sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32

locale:
LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1250;
LC_MONETARY=Polish_Poland.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250

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

other attached packages:
   debug mvbutils waveslim  polynom
 "1.1.0"  "1.1.1""1.6"  "1.3-2"


OS: WinXPSP1

Regards

Piotrek Z

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