similar to: How to debug C code running in R

Displaying 20 results from an estimated 50000 matches similar to: "How to debug C code running in R"

2007 Jan 09
4
A question about R environment
Hi all, I created environment "mytoolbox" by : mytoolbox <- new.env(parent=baseenv()) Is there anyway I put it in the search path ? If you need some background : In a project, I often write some small functions, and load them into my workspace directly, so when I list the objects with ls(), it looks pretty messy. So I am wondering if it is possible to creat an
2007 Apr 02
2
Compiling C codes in Windows
Hi All, I have been struggling to figure out how to compile c codes for R use. I am using Win XP + Cygwin + R binaries. After I followed all the instructions in " Building R for Windows" from Murdoch's website, I tried to Run something like : R CMD SHLIB C:\R\test.c , but still didn't get any output. My first question is, does this mean I already did
2007 Apr 02
2
Compiling C codes in Windows
Hi All, I have been struggling to figure out how to compile c codes for R use. I am using Win XP + Cygwin + R binaries. After I followed all the instructions in " Building R for Windows" from Murdoch's website, I tried to Run something like : R CMD SHLIB C:\R\test.c , but still didn't get any output. My first question is, does this mean I already did
2004 Oct 26
2
need help debugging on Windows
Dear R-devel, Apologies for bothering y'all with this seemingly perennial question. A user reported problem with my most recent version of randomForest (4.4-1), and I was able to reproduce it with his data with R-2.0.0 patched (2004-10-24) on WinXP Pro. The problem is that it crashes R on Windows. However, it does not happen on Linux (tried SUSE ES8 on our Opterons and Quantian on my
2007 Feb 01
2
Calling C code from R
Hi! Thanks in advance. I am using R-2.4.0 on Windows XP. I am trying to create dll file. My C code: /* useC1.c */ void useC(int *i) { i[6] = 100; } I have tried to create useC1.dll. C:\R-2.4.0\bin>R CMD SHLIB useC1.c 'perl' is not recognized as an internal or external command, operable program or batch file. Then I have tried:
2006 Sep 27
2
How to pass expression as an argument
Hi, I am writing a function and need to pass a function expression as an argument, for instance, myfun <- function( express) { x<- c(1,2,3) y<-express } if I call the above function by myfun( x*2 ), I get 2 as the result, instead of 2,4,6 , could someone help me to fix this problem ? Furthermore, is that
2007 Jan 04
1
need help with debug package
Hi all, I met a problem while using the debug package, I have the following program: mainfun<- function(){ beta<-1 result<-subfun(beta+x) } subfun<-function(expr){ y <- eval(expr, envir=list(x=c(1,2)),enclos = parent.frame()) return(y) } I have no problem using this program without calling the debug
2007 Feb 02
2
A question about dput
Hi, I am trying to output a R data set for use in WinBugs, I used dput(list(x=rnorm(100),N=100),file="bug.dat") But I can't get the intended format: list(x=c(.......),N=100), instead, I got something like this (copied the first two lines): [00000000]???73?74?72?75??63?74?75?72??65?28?6C?69??73?74?28?78???? structure(list(x
2010 Jan 07
2
Debugging issues encountered during the "R CMD check" process
I read through the "Writing R Extensions" and the "Debugging in R" website (http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/), looking for some hints about how to solve the issue of debugging problems encountered during the "R CMD check" process, but nothing seems to be mentioned about addressing issues encountered. Specifically, I am working with the R
2005 Jun 28
2
How to import data as numeric array?
Did some search but couldn't find useful result. I am trying to read a n*m dimension data with read.table, what i need is a numeric array, is there any efficient way to allow me get this array directly instead of a list? I tried to use as.array() to change the mode, but seems it doesn't work and i got this error message: "Error in "dimnames<-.data.frame"(`*tmp*`,
2007 Feb 04
1
Fwd: Re: Calling C code from R
Hi! Thanks in advance. Thanks to all of you who have responded to me on above. This is one of the responses I received on above. I have installed perl (with path C:\Perl\bin\;) an MinGW (with path C:\MinGW\bin; C:\MinGW;). At the Command Prompt (C:\R-2.4.0\bin) I have typed: C:\R-2.4.0\bin>Rcmd SHLIB useC1.c (No error and useC1.dll file has not been created)
2007 Jan 14
1
Questions about paste and assign
Hi, I would like to assign a value to a member b of the list a in position 3, by calling: assign( target, 2.34, 3) My question is what the "target" should be. I tried target <- paste("a", $, "b") and something else, but haven't got the right answer yet. BTW, if I attached a list named
2007 Apr 01
1
Keep R packages in the R installation
Hi, I just got a quick question here, when I install a new version of R , is there an easy to keep the installed R packages ? Thanks a lot for any help. tong
2009 Feb 16
1
Newbie - how do I debug a crash of RGUI.EXE
Hi- I'm running Vista64 Business and trying to use a package called RGraphViz. Unfortunately, when I try to plot a graph using this package it causes RGUI.EXE to crash. This package has no problem working in WinXP 32-bit. Is there any way to get useful information as to why it crashes? Here's my commands: > library(Rgraphviz) Loading required package: graph Loading required
2010 Jul 30
2
finding a function or a line while debugging?
guRus Is there a way by which I can search for a particular function or a particular line of code within the maze of all the R codes that are interlinked? Say for instance I am running a code using quantstrat package and on a particular line I get the error saying x is missing in is.array(x). I want to figure out where is.array is in all the codes that my code refers to? How do I do this? Is
2006 Mar 17
1
How to change the label in plot.ts ?
Hi you guys: I have been wondering if there is any way to change the labeling in plot.ts( ), for example , if I plot two sequences, i always got y labels as "series1", "series2", I tried to use ylab=c((expression(mu_1)),(expression(mu_2))), but it doesn't work. thanks in advance for any help best.
2006 Oct 28
1
A quesiton on data manipulation
Hi, I have a data set (data frame) describing some features of the students in a high school in the following format: Stu ID Year feature 1 feature 2 ............. 1001 1990 1001 1991 1001 1992 1002 1990 1002 1991 1002 1992 Some features of a few of these students are missing, I would like to
2007 Dec 27
1
Efficiency of for-loop in R
Hi, I just realized that in Matlab, as long as memory is pre-allocated, doing for-loop doesn't cost more time than doing things in vector form. But it seems in R, it still cost a lot to do for-loop. Is there any improvement in R that I missed. Thanks a lot. Merry Xmas Everyone !
2005 Sep 09
2
Debugging R/Fortran in Windows
Hi, I'm trying to debug an R interface to a Fortran subroutine from Windows. (Yes, I know I should try Unix/Linux as well, but a quick attempt suggested that the (MinGW g77) Fortran compiler I have installed on my Windows laptop works better on this Fortran code.) I'm trying to follow the instructions in the "Writing R Extensions" Manual: Start R under the debugger after
2005 Sep 09
2
Debugging R/Fortran in Windows
Hi, I'm trying to debug an R interface to a Fortran subroutine from Windows. (Yes, I know I should try Unix/Linux as well, but a quick attempt suggested that the (MinGW g77) Fortran compiler I have installed on my Windows laptop works better on this Fortran code.) I'm trying to follow the instructions in the "Writing R Extensions" Manual: Start R under the debugger after