similar to: garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not

Displaying 20 results from an estimated 200 matches similar to: "garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not"

2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from "coverage" to, say, "COVERAGE", the segfault does not occur. /* bug.c */ #include <stdio.h> #include <Rinternals.h> #include
2005 May 10
1
Fwd: Re: Implementation of the names attribute of attribute lists
Hi Martin, Thanks for your reply. I am responding on r-devel to provide some examples of outputs of the function that I had list in the post-scriptum of my previous email (BTW, did my post went through the list? I subscribed only after mailing it). You wrote: >Just to ask the obvious: > > Why is using str() not sufficient for you and instead, > you use 'print.object'
2010 Sep 01
2
invert order
Dear R-help list users, I have a huge vector of numbers, how I can invert orden? For example x <- 1:10000000 I would like to obtain x_r <- 10000000:1 Thanks, Sebastian.
2013 Aug 27
1
Error in simulation. NAN
Hi all, im triyng to implement a bayesian model with R and c++. I have a strange problem. I can't reproduce the error with a small script and then i post the original one. The problem is after the line for(MCMC_iter2=0;MCMC_iter2<thin;MCMC_iter2++) For the first 34 iterations all work fine, after, all the simulations of mu_acc_P return an "nan". If i delete the line
2017 May 31
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Le 31/05/2017 ? 17:30, Serguei Sokol a ?crit : > > More thorough reading revealed that I have overlooked this phrase in the > line's doc: "left and right /thirds/ of the data" (emphasis is mine). Oops. I have read the first ref returned by google and it happened to be tibco's doc, not the R's one. The layout is very similar hence my mistake. The latter does not
2017 May 31
0
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
>>>>> Serguei Sokol <sokol at insa-toulouse.fr> >>>>> on Wed, 31 May 2017 18:46:34 +0200 writes: > Le 31/05/2017 ? 17:30, Serguei Sokol a ?crit : >> >> More thorough reading revealed that I have overlooked this phrase in the >> line's doc: "left and right /thirds/ of the data" (emphasis is mine). >
2006 Feb 09
0
(no subject)
Hi, Can you help me please. I must developp an application with the logiciel R. It 's an application for pricing. So I see it uses the langage C and I see on the net taht it 's possible in c++. Use C++ it 's better than C , we know it. However It says to use c++ with R , we must : " You need to do two things: (a) Write a wrapper to export the symbols you
2019 Mar 29
1
Discrepancy between is.list() and is(x, "list")
I know I said that I had no further comments on object oriented semantics. However, I found a contradiction in the R documentation. Gabriel Becker wrote: > So, there are implicit classes, but *only when the data object is NOT an "R object" In the R Language Definition: > The R specific function typeof returns the type of an R object. > Lists have elements, each of which can
2017 Aug 06
0
data frame question
Your specification is a bit unclear to me, so I'm not sure the below is really what you want. For example, your example seems to imply that a and b must be of the same length, but I do not see that your description requires this. So the following may not be what you want exactly, but one way to do this(there may be cleverer ones!) is to make use of ?rep. Everything else is just fussy detail.
2017 Aug 06
1
data frame question
Hi Andreas, assuming that the increment is always indicated by the same value (in your example 0), this could work: df$a <- cumsum(seq_along(df$b) %in% which(df$b == 0)) df HTH, Ulrik On Sun, 6 Aug 2017 at 18:06 Bert Gunter <bgunter.4567 at gmail.com> wrote: > Your specification is a bit unclear to me, so I'm not sure the below > is really what you want. For example, your
2017 Aug 06
2
data frame question
Dear All, wonder if you have thoughts on the following: let us say we have: df<-data.frame(a=c(1,2,3,4,5,1,2,3,4,5,6,7,8),b=c(0,1,2,3,4,0,1,2,3,4,5,6,7)) I would like to rewrite values in column name "a" based on values in column name "b", where based on a certain value of column "b" the next value of column 'a' is prompted, in other words would like
2010 Jan 02
1
R_PreserveObject, R_ReleaseObject : reference counting needed ?
Hello, We are currently making lots of changes to Rcpp (see the open Rcpp mailing list if interested [1] in the details). We are now using [2] R_PreserveObject and R_ReleaseObject to manage garbage collection instead of the PROTECT/UNPROTECT dance. This seems to work well, but I was wondering if there was documentation about it. In particular, if we preserve the same SEXP twice (or more),
2010 Jan 02
3
R-devel Digest, Vol 83, Issue 2
[Disclaimer: what is below reflects my understanding from reading the R source, others will correct where deemed necessary] On 1/2/10 12:00 PM, r-devel-request at r-project.org wrote: > > Hello, > > We are currently making lots of changes to Rcpp (see the open Rcpp > mailing list if interested [1] in the details). > > We are now using [2] R_PreserveObject and R_ReleaseObject
2014 Mar 06
2
A question about multiple(?) out of order ReleaseObject
Hello, This is a question that probably reveals my lack of understanding. In a C function (call it cfunc), i created a SEXP, called S, and then called R_PreserveObject on S. I returned the SEXP to the calling R function (call it rfunc). Note, I didn't call R_ReleaseObject on S. v <- .Call("cfunc") So, are the following statements correct 1. S is 'doubly' protected
2017 Sep 21
2
calling R API functions after engine shutdown
Hi! We?ve recently come across an example where a package (minqa) creates an Rcpp Function object in a static variable. This causes R_ReleaseObject to be called by the destructor at a very late point in time - as part of the system exit function: static Function cf("c"); I?m wondering if that is considered to be ?safe?? Is the R engine supposed to stay in a state where calls to API
2011 Jun 28
0
Weighted Least Square Model for a Binary Outcome
Dear R Users, I would like to use R to fit a Weighted Least Square model for a binary outcome, say Y. The model is the one widely used for a binary dependent variable when the logistic model has not been proposed. Does anyone know how to specify the weight as the square root of 1/(E(Y)(1-E(Y)) in lm() or any other regression functions? I know that varPower() in the package of gls() can provide
2003 May 11
1
NLME - multilevel model using binary outcome - logistic regression
Hi! I'm pretty raw when working with the R models (linear or not). I'm wondering has anybody worked with the NLME library and dichotomous outcomes. I have a binary outcome variable that I woul like to model in a nested (multilevel) model. I started to fit a logistic model to a NLS function, but could not suceed. I know there are better ways to do it in R with either the LRM or GLM wih
2010 Jan 03
1
Interpreting coefficient in selection and outcome Heckman models in sampleSelection
Hi there Within sampleSelection, I'm trying to calculate the marginal effects for variables that are present in both the selection and outcome models. For example, age might have a positive effect on probability of selection, but then a negative effect on the outcome variable. i.e. Model<-selection(participation~age, frequency~age, ...) Documentation elsewhere describes one method for
2002 Oct 11
1
Odd outcome of attr with environments (PR#2148)
Hi everyone, I think the following error is slightly odd: > fred <- new.env() > happy <- function() fred > happy() <environment: 0x8a425b8> > attr(happy(), "foo") <- 1:10 Error: invalid (NULL) left side of assignment But naturally this works > attr(fred, "foo") <- 1:10 > fred <environment: 0x8a425b8> attr(,"foo") [1] 1
2008 Mar 11
0
"Longitudinal" with binary covariates and outcome
Hi Folks, I'd be grateful for suggestions about approaching the following kind of data. I'm not sure what general class of models it is best situated in (that's just my ignorance), and in particular if anyone could point me to case studies associated with an R approach that would be most useful. Suppose I have data of the following kind. Each "subject" is observed at say 4