search for: leyshock

Displaying 9 results from an estimated 9 matches for "leyshock".

2010 Nov 15
1
SEXP and slots
Hello, Since people have whisperred about Rcpp, I'd like to play too. > On 11/15/2010 07:45 AM, Patrick Leyshock wrote: >> Very helpful, thank you. >> >> A couple other questions, please: >> >> 1. I've got a function written in C, named "my_c_function". In my R >> code I call this function, passing to it an INTSXP and a STRSXP, >> respectively: >&gt...
2011 Jan 17
3
R vs. C
A question, please about development of R packages: Are there any guidelines or best practices for deciding when and why to implement an operation in R, vs. implementing it in C? The "Writing R Extensions" recommends "working in interpreted R code . . . this is normally the best option." But we do write C-functions and access them in R - the question is, when/why is this
2010 Nov 19
1
memory profiling
I'm trying to configure Version 2.12.0 or R to do memory profiling. I've reconfigured the code: % ./compile --enable-memory-profiling=YES and verified that it's configured correctly by examining the output. I then rebuild R: % make Then I fire up R and run a script, using Rprof with the memory-profiling switch set to TRUE: Rprof("output", memory.profiling=TRUE); # a
2010 Nov 18
1
Performance monitoring tools
Hello, Are there any good tools available for monitoring the performance of R? I'm wanting to capture things such as time elapsed in evaluating an expression, memory usage over time (or operation), and so on. I could build my own but would like to follow established practice, if there is one. Thank you, Patrick [[alternative HTML version deleted]]
2011 Feb 04
1
matching symbols to objects
Hello, I'm trying to access an object, given only its name as a symbol. I cannot figure out how to proceed. Suppose I call substitute( ) on the expression 'x + 2': > parse.tree <- substitute(x + 2); The constituents of parse.tree are of type symbol and numeric: > str(parse.tree[[1]]) symbol + > str(parse.tree[[2]]) symbol x > str(parse.tree[[3]]) num 2 Suppose
2011 Dec 28
1
external pointers
I have an external pointer object that I'd like to pass from my R code to some C code. Per Section 5.13 of "Writing R Extensions", I've noted that "external pointers should only be used as part of an object with normal semantics, for example an attribute or an element of a list." So I've written up a workable C function as such: SEXP my_c_function(SEXP param)
2010 Nov 12
1
SEXPs and slots
Hello, I've created this class: setClass("example", representation ( size = "numeric", id = "character" ) ) Suppose I create a new instance of this class: > x <- new("example", 4, "id_value") This creates an S4 object with two slots. Am I correct in thinking that slots are "filled" by SEXPs?
2013 May 17
2
formatting column names of data frame
Is there any way to format the headers of data frames, for printing? I am using Sweave to generate formatted reports. In Sweave, I read in a data.frame: result <- read.table(path.to.table); then display it: print.data.frame(result); This gives me what I expect in the eventual final output: Record Average Maximum 1 34
2010 Nov 24
0
4. Rexcel (Luis Felipe Parra)-how to run a code from excel
...running at 100% cpu for one hour ... (Mike Marchywka) 27. hierarchical mixture modelling (Mike Lawrence) 28. Check for is.object (Santosh Srinivas) 29. Fast Two-Dimensional Optimization (Wonsang You) 30. Re: plotting a timeline (?ukasz R?c?awowicz) 31. Re: memory profiling (Patrick Leyshock) 32. Re: ?summaryRprof running at 100% cpu for one hour ... (Kjetil Halvorsen) 33. Re: An empty grey diagram (Martin Maechler) 34. Re: ?summaryRprof running at 100% cpu for one hour ... (Mike Marchywka) 35. Re: Check for is.object (Jonathan P Daily) 36. Re: solve nonlinear equ...