search for: findlinenum

Displaying 15 results from an estimated 15 matches for "findlinenum".

2012 Oct 09
4
Modern Symbolic debugger for R programmes?
I think I am whistling in the wind, but is there a modern symbolic debugger for R programmes? I am working through some one else's code, thousands of lines, that has the occasional bug in it, and a lot in my understanding of it. I cannot make setBreakpoint or findLineNum work. I get "No source refs found.". I am starting to loose my mind! A debugger where I could set breakpoints with a little more granularity than the function level and a little more accessible than the trace function. What I ideally want is GDB for R. Does that exist? cheers Worik
2010 Mar 16
2
Is there a way to edit a specific line in a function (e.g: doing function->text->edit->function) ?
Hello, Let's say we have the following function: foo <- function(x) { line1 <- x line2 <- 0 line3 <- line1 + line2 return(line3) } And that we want to change the second line to be: line2 <- 2 How would you do that? The two ways I know of are either to use fix(foo) And change the function. Or to just write the function again. Is there
2012 Feb 21
2
Debugging using RStudio or any other R editor
Hello, I am using RStudio and have trouble finding out the problematic line in the presence of a bug. Could I view the line NUMBER which contains a bug? Is there any R editor able to do it? Thanks, Miao [[alternative HTML version deleted]]
2023 Feb 18
1
Adding support for S7 to base R
...ts in S7 methods, or a substitute function should be added to > the S7 package. > > RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be > taught how to do that, since it doesn't seem to use setBreakpoint. I took a look at updating setBreakpoint(). I can get findLineNum() to work, but setBreakpoint() doesn't work because trace() doesn't work. debug() doesn't work either: it looks as though it is trying to treat an S7 method as an S4 method. Will the already proposed changes help with debugging, or is that a completely separate issue? Duncan Murd...
2023 Feb 18
1
Adding support for S7 to base R
One more comment: The utils::setBreakpoint() function should be updated to be able to set breakpoints in S7 methods, or a substitute function should be added to the S7 package. RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be taught how to do that, since it doesn't seem to use setBreakpoint. Duncan Murdoch
2011 May 12
1
Recursively parsing srcrefs
Hi all, Is it possible to "recursively" parse srcrefs to match the recursive structure of the underlying code? I'm interested in this because it's the final step in allowing functions to modify other functions while preserving the original source. I've tried to make a bit of demo of what I want to do below, and I think I may uncovered a bug in parse. f <- function(x =
2023 Mar 13
1
Adding support for S7 to base R
...itute function should be added to > > the S7 package. > > > > RStudio 2022.12.0+353 (not sure if that's the latest) also needs to be > > taught how to do that, since it doesn't seem to use setBreakpoint. > > I took a look at updating setBreakpoint(). I can get findLineNum() to > work, but setBreakpoint() doesn't work because trace() doesn't work. > debug() doesn't work either: it looks as though it is trying to treat > an S7 method as an S4 method. > > Will the already proposed changes help with debugging, or is that a > completely sep...
2009 Dec 14
0
R 2.10.1 is released
...ed = TRUE) returned match positions in bytes (not characters) in an MBCS locale if 'pattern' was a single byte. [g]sub(fixed = TRUE) with a single-byte pattern could conceivably have matched part of a multibyte character in a non-UTF-8 MBCS. o findLineNum() and setBreakpoint() would sometimes fail if the specified file was not in the current directory. o Package tcltk's demo(tkdensity) was broken in 2.9.0 when demo() was changed to set par(ask = TRUE). o gsub() with backrefs could fail on extremely long strings...
2009 Dec 14
0
R 2.10.1 is released
...ed = TRUE) returned match positions in bytes (not characters) in an MBCS locale if 'pattern' was a single byte. [g]sub(fixed = TRUE) with a single-byte pattern could conceivably have matched part of a multibyte character in a non-UTF-8 MBCS. o findLineNum() and setBreakpoint() would sometimes fail if the specified file was not in the current directory. o Package tcltk's demo(tkdensity) was broken in 2.9.0 when demo() was changed to set par(ask = TRUE). o gsub() with backrefs could fail on extremely long strings...
2009 Oct 26
0
R 2.9.0 is released
...eated with pairlist elements, but [[<- didn't support assigning them.) o The parser now supports C-preprocessor-like #line directives, so error messages and source references may refer to the original file rather than an intermediate one. o New functions findLineNum() and setBreakpoint() work with the source references to find the location of source lines and set breakpoints (using trace()) at those lines. o Namespace importing is more careful about warning on masked generics, thanks to a patch by Yohan Chalabi. o detach()...
2009 Oct 26
0
R 2.9.0 is released
...eated with pairlist elements, but [[<- didn't support assigning them.) o The parser now supports C-preprocessor-like #line directives, so error messages and source references may refer to the original file rather than an intermediate one. o New functions findLineNum() and setBreakpoint() work with the source references to find the location of source lines and set breakpoints (using trace()) at those lines. o Namespace importing is more careful about warning on masked generics, thanks to a patch by Yohan Chalabi. o detach()...
2009 Oct 26
0
R 2.10.0 is released
...eated with pairlist elements, but [[<- didn't support assigning them.) o The parser now supports C-preprocessor-like #line directives, so error messages and source references may refer to the original file rather than an intermediate one. o New functions findLineNum() and setBreakpoint() work with the source references to find the location of source lines and set breakpoints (using trace()) at those lines. o Namespace importing is more careful about warning on masked generics, thanks to a patch by Yohan Chalabi. o detach()...
2009 Oct 26
0
R 2.10.0 is released
...eated with pairlist elements, but [[<- didn't support assigning them.) o The parser now supports C-preprocessor-like #line directives, so error messages and source references may refer to the original file rather than an intermediate one. o New functions findLineNum() and setBreakpoint() work with the source references to find the location of source lines and set breakpoints (using trace()) at those lines. o Namespace importing is more careful about warning on masked generics, thanks to a patch by Yohan Chalabi. o detach()...
2011 Oct 31
0
R 2.14.0 is released
...espace. (It always did for packages without a namespace.) o Setting the environment variable _R_WARN_ON_LOCKED_BINDINGS_ will give a warning if an attempt is made to change a locked binding. o \SweaveInput is now supported when generating concordances in Sweave(). o findLineNum() and setBreakpoint() now allow the environment to be specified indirectly; the latter gains a clear argument to allow it to call untrace(). o The body of a closure can be one of further types of R objects, including enviroments and external pointers. o The Rd2HTML() fun...
2011 Oct 31
0
R 2.14.0 is released
...espace. (It always did for packages without a namespace.) o Setting the environment variable _R_WARN_ON_LOCKED_BINDINGS_ will give a warning if an attempt is made to change a locked binding. o \SweaveInput is now supported when generating concordances in Sweave(). o findLineNum() and setBreakpoint() now allow the environment to be specified indirectly; the latter gains a clear argument to allow it to call untrace(). o The body of a closure can be one of further types of R objects, including enviroments and external pointers. o The Rd2HTML() fun...