similar to: help! what's wrong with setBreakpoint

Displaying 20 results from an estimated 20000 matches similar to: "help! what's wrong with setBreakpoint"

2024 Apr 12
1
Debugging functions defined (locally) inside another functions
On 12/04/2024 8:15 a.m., Iago Gin? V?zquez wrote: > Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. > So I have > > f <- function(whatever){ > ... > g <- function(whatever2){ > ... > } > ... > } > > If I wanted to debug some thing directly inside f I would do debug(f).
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
2023 Feb 18
1
Adding support for S7 to base R
On 18/02/2023 9:51 a.m., Duncan Murdoch wrote: > 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
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 Apr 06
1
executing from .R source file in the src package
Can I run R code straight from R src (.R) file instead of .rdb/.rdx? I of course tried simply unzipping tar.gz in the R_LIBS directory but R complains with "not a valid installed package". Real issue: I am very new to R and all, so this could be something basic. I'm trying to use ess-tracebug (Emacs front-end to trace/browser et al). It works great when I trace functions in .R
2024 Apr 12
3
Debugging functions defined (locally) inside another functions
Hi all, I am trying to debug an error of a function g defined and used inside another function f of a package. So I have f <- function(whatever){ ... g <- function(whatever2){ ... } ... } If I wanted to debug some thing directly inside f I would do debug(f). But this does not go inside g code. On the other hand, debug(g) does not work as g is not a defined function in the
2014 Oct 02
3
debuggingState() analogous to tracingState() ?
We have had some conversation within R core, lead by Duncan Murdoch and me, about a proposal to extend the current tracingState() functionality by something tentatively called debuggingState(). Duncan has allowed me to copy the previous conversation (after very minor editing): The following is quite technical and assumes you know more about R's debug()ing and trace()ing than an estimated
2010 Oct 29
2
how to debug (mtrace) a function defined inside a function?
Hi, everyone. I am using a fair amount of closures in my code. Problem i am experiencing is i cannot figure out how to mtrace functions defined within a function. There must be some way to name such function for mtrace to see it and let me step into it. For example, say i have code mymodel<-function(){ data<-numeric(0) build<-function(){ data<<-1 } m<-list()
2009 Dec 07
4
Announce: edtdbg, integrating R's debug() with your text editor
I've just developed edtdbg, a small package that integrates R's debug() with one's text editor. Excerpt from the README file: Goal The debug() function in R is primitive. My goal was to make it more usable by integrating it with one's text editor. Hence I wrote the package here, edtdbg. Its features include: * As one steps from line to line of code
2010 Mar 29
1
single quotes and double quotes in a system() command. What to do?
Hi all, I would like to run the following from within R: awk '{$3=$4="";gsub(" ","");print}' myfile > outfile However, this obviously won't work: system("awk '{$3=$4="";gsub(" ","");print}' myfile > outfile") and this won't either: system("awk '{$3=$4='';gsub('
2015 Oct 28
4
RFC: Supporting macros in LLVM debug info
Hi, I would like to implement macro debug info support in LLVM. Below you will find 4 parts: 1. Background on what does it mean to debug macros. 2. A brief explanation on how to represent macro debug info in DWARF 4.0. 3. The suggested design. 4. A full example: Source -> AST -> LLVM IR -> DWARF. Feel free to skip first two parts if you think you know the background.
2009 Mar 23
1
Confusion regarding environments invoked by "source" command
Colleagues, R version 2.8.1 in OS X Within a function (which is already within a function), I am sourcing a file. The syntax of the command is something like (this is just an example; the actual code is much more complicated): BIGFUNCTION <- function() { DATAFRAME <- [some commands to create a dataframe] MYFUNCTION(DATAFRAME) } MYFUNCTION <- function(DATAFRAME) { print(ls())
2007 Aug 11
1
Replace NAs in dataframe: what am I doing wrong
Dear R-users, My script imports a dataset from a csv file, in which missing values are represented by ".". This importation is done into a dataframe using the read.table function with na.strings = "." Then I want to replace the NAs in the first column of the dataframe by "Missing data". I am using the following code to do so :
2006 Jan 25
7
reducing learning curves?
Hi all, I am really new to the R language. I am a long time Matlab and C++ user and I was "forced" to learn R because I am taking a statistics class. I am seeking to reduce the learning curve to as smooth as possible. Are there any addon/plug-in features that can reduce the learning curve, for example, the following features can be very helpful for new learners: 1. Matlab-like
2009 Oct 01
1
debugging S4 methods
Hi all, Does anyone know how to debug S4 methods? In my case I want to find an error in the specc-function of the kernlab-package. As this seems to be a S4-method the normal S3 debugging can't be applied apparently (e.g. debug(s3function.someclass)). So in my case > debug(specc:kernlab) seems only to debug the generic-function: > specc:kernlab function (x, ...)
2003 Apr 25
2
Open an r+b file connection on Windows
I am trying to open an existing binary file, seek to a position in the middle, and then write one byte, while keeping the already existing data after that byte. It seems to me that I am unable to open a connection to a binary file in both read and write mode. I can open the "r+b" binary file connection and seek around, but I can't write to the file. And looking at the function
2013 Jan 29
1
points rejected as lying outside the specified window
Hello, I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I have been unable to fix by searching them online: library(spatstat) library(maps) library(maptools) NYC2<-readShapePoly("nybb.shp") # this is a map of the NYC boroughs without waterways and no census tract divisions (but it does include lines separating
2018 Feb 02
2
command line fails
I don't think it's the path or the slashes. I run other files in this same manner, with the same path to the script itself, and they go off without a hitch. Although this is the first time I am using 3.4.3, and the only script I am using that version of R for at the moment. Having said that, I did TRY reversing the slashes and got the same result. :-) Michael Ashton, CFA Managing
2018 Feb 02
0
command line fails
On 02/02/2018 7:52 AM, Michael Ashton wrote: > Hi - Think this is quick help. Not sure how to trap what is causing my simple script to run fine in R, but fail immediately when called from rscript. I can put all sorts of traps in the script itself, but when called from the command line the r window simply flashes and closes. > > There's probably a way to find out why rscript is
2003 Nov 10
3
Reading an upper triangular matrix
Hola! I have data in the form of a symmetric distance matrix, in the file I have recorded only the upper triangular part, with diagonal. The matrix is 21x21, and the file have row and col names, and some other information. I am trying to read with the following code (I tried many variations on it, but all give the same error). The items in the data file is delimited by white space. (Part