similar to: Question about CHARSXP and garbage collection

Displaying 20 results from an estimated 10000 matches similar to: "Question about CHARSXP and garbage collection"

2015 Feb 18
4
Different serialization of functions in interactive vs. batch mode
Hi Luke, Ah - I see - thank you! This at least points me to a way on how to "fix" this. I tried setting the srcref attribute to NULL, but the hash value is still different and so is the serialization. So this looks like it is one difference, but not all of them Even if all differences were identified - it still leaves me with different behavior between interactive and batch-mode,
2015 Feb 18
1
Different serialization of functions in interactive vs. batch mode
Hi Gabriel, thanks for your reply - it does solve the problem of my toy function, but does come with some other problems though. a) as.list(f)[[1]] yields an expression, not a function. In order to go the route you are suggesting, I would more likely use "deparse" in order to get the original back b) and more seriously - as.list strips the environment of the function (and thus
2019 May 10
2
ALTREP: Design concept of alternative string
Hi Gabriel, Thanks for your explanation, I totally understand that it is almost impossible to change the data structure of STRSXP. However, what I'm proposing is not about changing the internal representation, but rather about how we design and use the ALTREP API. I might do not state the workarounds clearly as English is not my first language. Please let me explain them again in detail.
2017 Feb 20
1
another fix for R crashes under enable-strict-barrier, lto, trunk@72156
On 2nd thought, I think a better fix to the segfault is something like this: --- a/src/main/memory.c +++ b/src/main/memory.c @@ -3444,6 +3444,8 @@ R_xlen_t (XTRUELENGTH)(SEXP x) { return XTRUELENGTH(CHK2(x)); } int (IS_LONG_VEC)(SEXP x) { return IS_LONG_VEC(CHK2(x)); } const char *(R_CHAR)(SEXP x) { + if(!x) + error("de-referncing null. Check the validity of your data.");
2015 Feb 18
2
Different serialization of functions in interactive vs. batch mode
Hi, I posted this question to the regular help list, but it seems to be this is probably a question that is better addressed on r-devel. Sorry for the double posting. I am using hash-values to cache certain results in R. This caching also depends on the hash-value of the function that is being cached (calculated using the digest package). I noticed that computations that should already be cached
2010 Dec 16
3
Reset R to a vanilla state
Hi all, I need some help with R. I am looking for a function that puts R back into a vanilla state (exactly the same when I just started it). Specifically I want all objects in the workspace removed and all non-base packages detached and unloaded; all base packages that are loaded on startup should remain loaded (and preferably a .Rprofile executed as well). It would also be good if all the
2020 May 24
1
Surpising behavior when using an active binding as loop index in R 4.0.0
A shorter reproducible example: example(makeActiveBinding) for (fred in 1:3) { 0 } ls() Both problems go away if you first do compiler::enableJIT(2) So looks like a bug in compiling the for loop. -Deepayan On Sat, May 23, 2020 at 5:45 PM Thomas Friedrichsmeier via R-devel <r-devel at r-project.org> wrote: > > Possibly just a symptom of the earlier behavior, but I'll amend my
2019 Jul 19
2
ALTREP wrappers and factors
Hi Jiefei and Kylie, Great to see people engaging with the ALTREP framework and identifying places we may need more tooling. Comments inline. On Thu, Jul 18, 2019 at 12:22 PM King Jiefei <szwjf08 at gmail.com> wrote: > > If that is the case and you are 100% sure the reference number should be 1 > for your variable *y*, my solution is to call *SET_NAMED *in C++ to reset > the
2015 Jan 09
1
Cost of garbage collection seems excessive
When doing repeated regressions on large data sets, I'm finding that the time spent on garbage collection often exceeds the time spent on the regression itself. Consider this test program which I'm running on an Intel Haswell i7-4470 processor under Linux 3.13 using R 3.1.2 compiled with ICPC 14.1: nate at haswell:~$ cat > gc.R library(speedglm) createData <- function(n) {
2024 Feb 04
3
Advice debugging M1Mac check errors
Hi, I wanted to ask if people have good advice on how to debug M1Mac package check errors when you don?t have a Mac? Is a cloud machine the best option or is there something else? Thanks Holger [[alternative HTML version deleted]]
2019 Nov 01
4
[External] R C api for 'inherits' S3 and S4 objects
Thank you Luke. That is why I don't use Rf_inherits but INHERITS which does not allocate, provided in the email body. I cannot do similarly for S4 classes, thus asking for some API for that. On Fri, Nov 1, 2019 at 5:56 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > > On Fri, 1 Nov 2019, Jan Gorecki wrote: > > > Dear R developers, > > > > Motivated by
2020 Jul 22
3
Invisible names problem
I ran into strange behavior when removing names. Two ways of removing names: i <- rep(1:4, length.out=20000) k <- c(a=1, b=2, c=3, d=4) x1 <- unname(k[i]) x2 <- k[i] x2 <- unname(x2) Are they identical? identical(x1,x2) # TRUE but no identical(serialize(x1,NULL),serialize(x2,NULL)) # FALSE But problem is with serialization type 3, cause:
2012 Feb 16
1
Unstable reproduce for potential issue with CHARSXP creation
I stumbled across one of those intermittent bugs where the code sometimes works and sometimes doesn't. Below is an example run showing a failure where a CHARSXP object was not properly created (by the sub function?). I was able to reproduce this error on three different R builds in fresh R sessions, but it sometimes takes a few start up R -> run code -> close R iterations for the
2009 Oct 01
1
Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character' & 'getEncChar' must be called on a CHARSXP
Hello, I have list of 600K lists, each sublist a list of two elements, the first a character, the second a list of six named elements, some characters some numrics. LISTA (600K) (:= h) |__ List of two elements |__ Character |__ Named List of 6 elements (characters and numerics) This works, sip <- lapply(h,function(r) r[[2]][['sip']]) but I wish to unlist this
2017 Aug 23
2
Error "translateCharUTF8' must be called on a CHARSXP Execution halted"
Dear list, I installed R 3.3.2 on a Red Hat Linux Enterprise 7.3 machine by adding the EPEL-repository and then installing it via yum. R starts up and seems to be doing fine at first sight. However, when I try to list the files in a directory with the command files <- list.files(path="/home/username/directory_name/", pattern="*.Rda",, full.names=T, recursive=FALSE) I get
2011 Dec 20
1
RODBC Error: 'getCharCE' must be called on a CHARSXP
I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code: channel <-odbcConnect("some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQuery(channel, cat(txt,"\n"),errors=TRUE,) close(channel) However, I get the
2016 Apr 06
3
HTML help -- as a single document for the entire package
Hi, I was wondering if there was an equivalent to the pdf-manual for R-packages, but rendered as a single html page? I am looking for this as it would make reading easier as - no restriction to the standard paper width, but flowing to the browser window size - no page breaks - full text search across the entire manual. Thanks Holger [[alternative HTML version deleted]]
2016 Apr 06
0
HTML help -- as a single document for the entire package
On 06/04/2016 4:17 AM, Holger Hoefling wrote: > Hi, > > I was wondering if there was an equivalent to the pdf-manual for > R-packages, but rendered as a single html page? I am looking for this as it > would make reading easier as > - no restriction to the standard paper width, but flowing to the browser > window size > - no page breaks > - full text search across the
2016 Apr 06
2
HTML help -- as a single document for the entire package
> On Apr 6, 2016, at 2:37 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 06/04/2016 4:17 AM, Holger Hoefling wrote: >> Hi, >> >> I was wondering if there was an equivalent to the pdf-manual for >> R-packages, but rendered as a single html page? I am looking for this as it >> would make reading easier as >> - no restriction to the
2019 Sep 15
2
[External] REprintf could be caught by tryCatch(message)
Thank you Luke for prompt reply. Is it possible then to request a new function to R C API "message" that would equivalent to R "message" function? Similarly as we now have C "warning" and C "error" functions. Best, Jan On Sun, Sep 15, 2019 at 5:25 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > > On Sun, 15 Sep 2019, Jan Gorecki wrote: