similar to: mkString (PR#866)

Displaying 20 results from an estimated 4000 matches similar to: "mkString (PR#866)"

2009 Sep 16
2
I want to get a reference to this time series object
I'm trying to get a reference to this object in C SWX.RET[1:6,c("SBI,"SPI","SII")] While i am able to access and use a plain SWX.RET object, I'm getting confused on how to create an object with the array subscripts like above. Here is what I tried to do. It doesn't work because "[" is obviously not an operation or function on SWX.RET. So how do I
1999 Nov 26
2
compiling R-0.90.0 on alpha-dec-osf4.0
I am compiling R-0.90.0 on alpha-dec-osf4.0 and it stops by giving the following message: cc: Error: ../../../R/src/main/gram.y, line 1365: In this declaration, parameter 1 has a different type than specified in an earlier declaration of this function. SEXP mkString(const char *s) -----^ cc: Error: ../../../R/src/main/gram.y, line 1365: In this declaration, the type of "mkString" is not
1999 Nov 26
2
compiling R-0.90.0 on alpha-dec-osf4.0
I am compiling R-0.90.0 on alpha-dec-osf4.0 and it stops by giving the following message: cc: Error: ../../../R/src/main/gram.y, line 1365: In this declaration, parameter 1 has a different type than specified in an earlier declaration of this function. SEXP mkString(const char *s) -----^ cc: Error: ../../../R/src/main/gram.y, line 1365: In this declaration, the type of "mkString" is not
2002 Jan 29
3
dimnames usage in ts (PR#1288)
Full_Name: Tim Keitt Version: 1.4 OS: Linux Submission from: (NULL) (129.49.19.70) I think this code in 'ts' is incorrect: if (is.matrix(data) || is.data.frame(data)) { nseries <- ncol(data) ndata <- nrow(data) dimnames(data) <- list(NULL, names) } since > x <- data.frame(matrix(rnorm(100),ncol=10)) > names(x) [1] "X1"
1999 Nov 23
1
compile error for mkString on alpha (PR#332)
Full_Name: Albrecht Gebhardt Version: 0.90.0 OS: osf4.0 Submission from: (NULL) (143.205.61.73) I had to apply the following patch to be able to compile on an alpha with DU 4.0E: ############################################### --- ./src/main/gram.y.mkString-patch Tue Nov 23 12:16:29 1999 +++ ./src/main/gram.y Tue Nov 23 12:16:59 1999 @@ -56,7 +56,8 @@ SEXP mkFloat(char *); SEXP
2002 Nov 09
1
Calling function with proto in Rinternals.h
(Tried this query on r-help with no luck, maybe someone here can help?) I would like to call the 'RFinalizerEx' function that appears in Rinternals.h using ".Call". It worked for me in the past, but now I get an error message something like: 'call function name not in call table'. I'm using the 1.6.1 rpm from CRAN. Anyone know what's going on? Thanks. Tim --
2009 Sep 29
3
How do I access class slots from C?
Hi I'm trying to implement something similar to the following R snippet using C. I seem to have hit the wall on accessing class slots using C. library(fPortfolio) lppData <- 100 * LPP2005.RET[, 1:6] ewSpec <- portfolioSpec() nAssets <- ncol(lppData) setWeights(ewSpec) <- rep(1/nAssets, times = nAssets) ewPortfolio <- feasiblePortfolio( data = lppData, spec = ewSpec,
2009 Jun 06
1
Qs on calling R from C
Consider the following simple C program: /*** hello_r.c ***/ #include <Rinternals.h> SEXP hello() { return mkString("Hello, world!\n"); } int main(void) { SEXP x = hello(); return x == NULL; /* i.e. 0 on success */ } This program segfaults: % myR/bin/R CMD LINK gcc -I./R-2.9.0/src/include -L./myR/lib64/R/lib -lR hello_r.c -o hello_r > /dev/null % hello_r zsh:
2016 May 24
2
Suggestion: mkString(NULL) should be NA
On Tue, May 24, 2016 at 9:30 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote: > On Tue, May 24, 2016 at 5:59 PM, Gabriel Becker <gmbecker at ucdavis.edu> > wrote: > > Shouldn't Rf_mkString(NULL) return (the c-level equivalent of) > character() > > rather than the NA_character_? > > No. It should still be safe to assume that mkString() always returns
2007 Apr 07
2
Rf_PrintValue problem with methods::show
Hi, I think this is a bug (even though I can't find documentation explicitly saying that it should work). Basically, Rf_PrintValue(obj) fails when 'obj' is an S4 object that should be printed using show() rather than print(). From the error message I'm guessing that the need to use show is detected correctly but then show is not found. "cbind2" in the code below is just
2016 May 25
2
Suggestion: mkString(NULL) should be NA
On Wed, May 25, 2016 at 12:31 PM, Martin Maechler <maechler at stat.math.ethz.ch> wrote: > Better than segfaulting, yes, but really agree with Bill (and > Gabe), also for Rf_mkChar(NULL): > I think both functions should give an error in such a case > rather than returning NA_character_ > > It is an accident of some kind if they got NULL, no? Not necessarily. A char* of
2002 Apr 10
1
Layout of Fourier frequencies
I'm doing convolutions in the frequency domain and need to know the layout of the Fourier modes returned by fft. (This is leading up to a more involved question about moment generating functions, but I need to know if I've got this part correct first.) I think in 1D the pattern is: 0 1 2 3 -2 1 (even) 0 1 2 3 -3 2 1 (odd) In 2D is it simply (for a square matrix): 0 1 2 -1 (horizontal)
2016 May 24
2
Suggestion: mkString(NULL) should be NA
Shouldn't Rf_mkString(NULL) return (the c-level equivalent of) character() rather than the NA_character_? An empty string and NULL aren't the same. It seems reasonable for Rf_mkChar to give NA_character_ though. ~G On Tue, May 24, 2016 at 8:42 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote: > On Thu, May 12, 2016 at 1:20 PM, Jeroen Ooms <jeroen.ooms at
2016 May 12
3
Suggestion: mkString(NULL) should be NA
I would like to propose that Rf_mkString(NULL) and Rf_mkChar(NULL) return NA rather than segfault. Case: the mkString() and mkChar() functions are convenient to wrap strings returned by e.g. external C libraries into an R vector. However sometimes a library returns NULL instead of a string when the result is unavailable. In some C libraries this can happen unexpectedly or is even undocumented. A
2009 Aug 25
2
Clarifications please.
Hi I think I have asked these questions earlier, but I been able to find answers from the documentation (which I found poorly written in several places). Will someone be kind enough to give me answers and enlighten me? (as in explain with CODE?) I want to embed R in my application and use the fPortfolio package for carrying out risk management computations. Right now I'm reading the Rmetrics
2001 Mar 19
3
generic database access methods
I've been putting together a package that defined generic methods for database access. The packages is called "Rdbi." It borrows as much as possible from existing database packages / proposals. I'd like to start a discussion about the proposed interface. Here's what I've come up with so far: # # Rdbi: connectionMethods.R # dbConnect <- function(dbObj, ...)
2016 May 25
3
Suggestion: mkString(NULL) should be NA
On Wed, May 25, 2016 at 7:22 AM, Michael Lawrence <lawrence.michael at gene.com > wrote: > On Wed, May 25, 2016 at 4:23 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> > wrote: > I'm not disagreeing with what's been said in this thread, but I can't help but recall that I brought up this exact issue probably 15 years ago and was told (by Brian, I believe)
2016 May 25
0
Suggestion: mkString(NULL) should be NA
On Wed, 25 May 2016, Tim Keitt wrote: > On Wed, May 25, 2016 at 7:22 AM, Michael Lawrence <lawrence.michael at gene.com >> wrote: > >> On Wed, May 25, 2016 at 4:23 AM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> >> wrote: >> > > I'm not disagreeing with what's been said in this thread, but I can't help > but recall that I brought up this
1999 Nov 13
0
patches for alpha
Recently I reviewed my RPM spec files for DU 4.0, and noticed that I forgot to post some problems + patches: 1. ./configure fails to choose a PIC flag, I simply removed the AC_MSG_ERROR and it works. There is actually no PIC flag for DEC cc (with DU 4.0E) --- ./configure.in.alpha-patch Mon Aug 23 06:36:28 1999 +++ ./configure.in Sun Sep 12 17:38:27 1999 @@ -541,7 +541,9 @@
2017 Mar 29
2
Transferring ownership of R-managed buffer
http://www.keittlab.org/ On Wed, Mar 29, 2017 at 1:04 PM, Herv? Pag?s <hpages at fredhutch.org> wrote: > Hi Tim, > > On 03/29/2017 08:24 AM, Tim Keitt wrote: > >> I have a use case where I would like to create an SEXP around an existing >> buffer that is managed by R, thus avoiding a copy operation. >> > > What to you mean exactly by "an existing