similar to: duplicate STRSXP : shallow copy ?

Displaying 20 results from an estimated 1000 matches similar to: "duplicate STRSXP : shallow copy ?"

2010 Apr 02
1
inject html code into Rd file
Hello, I'm trying to inject html code into an Rd file. For example : \name{test} \alias{test} \title{test} \description{ \if{html}{ \Sexpr[stage=render,results=text,echo=FALSE]{ "<b>hello</b>" } } } when this file is rendered, instead of having "hello" in bold, I get <b>hello</b>, i.e. characters < and > are replaced with html entities :
2010 Apr 21
2
suggestion how to use memcpy in duplicate.c
>From copyVector in duplicate.c : void copyVector(SEXP s, SEXP t) { int i, ns, nt; nt = LENGTH(t); ns = LENGTH(s); switch (TYPEOF(s)) { ... case INTSXP: for (i = 0; i < ns; i++) INTEGER(s)[i] = INTEGER(t)[i % nt]; break; ... could that be replaced with : case INTSXP: for (i=0; i<ns/nt; i++) memcpy((char *)DATAPTR(s)+i*nt*sizeof(int),
2020 Jun 16
2
How to fixup source paths during objdump disassembly?
Hi folks, As part of our build, the Tock project uses remap-path-prefix [1] to create a reproducible build. This means that the paths inside of built artifacts are not full source paths. When we later attempt to produce a listings file, the source mapping fails. The result is many copies of this recently merged warning [2]: llvm-objdump: warning:
2010 Feb 20
1
how to create a SEXP which could be accessed in embedded R
Hi all, I am not familiar with writing R extensions. In a C program, I want to create a SEXP and access it in embedded R. How to let the embedded engine know there's a new vector? For example, after creating a SEXP, parsing 'ls()' in embedded R and then evaluating, STRSXP returned will contain the name of the SEXP. Any help would be appreciated. Regards, Spiral [[alternative HTML
2010 Mar 18
1
Creating Rcpp RcppDatetime from string with millisecond
Hi, I was trying to generate RcppDatetime from a string. The main problem for me is that my string contains millisecond. I saw that RcppDatetime takes in double of seconds since epoch. I try to generate a double using boost but has no success. I'm wondering if you have any sample snippet? The string looks like: "2010-03-18 15:50:51.232" Secondly, what time zone RcppDatetime is
2010 Mar 03
1
Mentor for GSOC '10: Symbolic Regression in R
Hi all, I am looking to extend the regression and data analysis capabilities of R through Symbolic Regression that can potentially find implicit equation relationships in the input data. You can find my project proposal at: http://rwiki.sciviews.org/doku.php?id=developers:projects:gsoc2010:syrfr I am looking for a mentor to guide me through the summer on the project under the Google Summer Of
2010 Mar 30
2
Trouble in using rJava
Hello, I'm using rJava and JRI to call R scripts from my Java code, but my scripts are sometimes executed, and very often they don't run throwing a Java exception. I'm using a 2.7 version of R, with rJava 0.8.4 and Java Sun 1.6. Somebody can help me please ?? Thank you very much, Nabila
2010 Mar 02
1
Double Colors in Main
Dear All, Consider the following trivial code snippet rm(list=ls()) name_vec <- c("color1", "color2") pdf("test_color.pdf") plot(seq(5), seq(5), main=paste(name_vec[1]," and ",name_vec[2], sep="")) dev.off() What I would like to achieve is rather simple to explain, but it is giving me a headache: how can I have two colors in main? Let us
2004 Mar 17
1
best methods for strings and structures?
I'm trying to generate an R interface for a library that's commonly used and I'm currently writing wrapper functions for file i/o and return an object (list?) that contains the elements of the C structure. For example, reading a file that contains: struct CONFIG_RECORD { char coeffs_filename[256]; char species_filename[256]; unsigned long
2010 Mar 19
1
Can't setup rJava under ubuntu
When I try to install rJava, I get the following error: > install.packages('rJava') ... checking whether siglongjmp is declared... yes checking Java support in R... present: interpreter : '/usr/bin/java' archiver : '/usr/bin/jar' compiler : '/usr/bin/javac' header prep.: '/usr/bin/javah' cpp flags :
2010 Apr 30
2
RInside & child threads
Hi Folks, I am creating a multi-threaded C++ application that initializes RInside in one of the child thread. I would also like to access support interfaces like Rcpp::Environment in the remaining child threads, so that I could access any "R" function associated with the environment initialized. When I run my program, I always get "C Stack limit too huge" errors. I looked
2005 Jul 25
1
removing (hopefully) unneeded access to $HOME
Hi, Thanks for dovecot. It's the best IMAP server ever. Okay, here's my problem: I use mbox INBOXes from /var/spool/mail/%u, and the INDEX lies in /var/spool/mail/dovecot/%d/%u. Users' other folders are found in /%h/mail. Now, I notice that when a user is accessing her INBOX, the imap process cwd's to the user's home, which I'd like to prevent as much as possible.
2010 Mar 22
3
Embed R code in C++
Hi, Can anyone tell me how to embed R code in a C++ file. I am actually using a mac running on the OSX 10.6.2 and the IDE Xcode Version 3.2 and I would like to embed the basic function like geometric, binomial, normal and hyper geometric distributions in a sample cpp file. I heard about the library RInside and i have downloaded the source code for mac but i do not know how to build it in
2010 Mar 25
1
Error using Rcpp
Hi, Im not sure if this is the right place to post this. I am using Xubuntu Karmic Koala and am trying to use the Rcpp package. I am testing it using a simple code that takes in a vector and adds 1 to each element: #include <Rcpp.h> // This file takes in a vector and adds one to each entry RcppExport SEXP addone(SEXP vec){ // create a local copy of vec Rcpp::NumericVector
2010 May 08
1
Error in RImageJ
Hello everybody, I'm running R under Mac OS 10.6.3 on a MacBook 2.16 GHz Intel Core 2 Duo. I've recently installed R 2.11.0 and the RImageJ library v. 0.1-142. When trying to follow the example given in the package manual and I get the following error: download.file( "http://www.google.fr/intl/en_en/images/logo.gif", dest = "google.gif" ) trying URL
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, >>
2020 Jan 09
6
Get memory address of an R data frame
Hello, I would like for my C function to be able to manipulate some values stored in an R data frame. To achieve this, a need the (real) memory address where the R data frame stores its data (hopefully in a contiguous way). Then, from R, I call the C function and passing this memory address as a parameter. The question: how can we get the memory address of the R data frame? Thank you! L.
2014 Mar 17
1
Deep copy of factor levels?
Hi It seems that selecting an element of a factor will copy its levels (Ubuntu 13.04, R 3.0.2). Below is the output of a script that creates a factor with 10000 elements and then calls as.list() on it. The new object seems to use more than 700 MB, and inspection of the levels of the individual elements of the list suggest that they are distinct objects. Perhaps some performance gain could
2009 Jun 23
3
V2.9.0 changes [Sec=Unclassified]
Hi all, Prefix: I am a frustrated Java coder in R. I am coding a medium sized ecosystem modelling program in R. I have changed to using S4 objects and it has cost me an order of magnitude in execution speed over the functional model. I cannot afford this penalty and have found that it is the result of all the passing-by-value of objects. I see that you can now safely inherit from
2019 Jul 17
2
ALTREP wrappers and factors
Hello, I?m experimenting with ALTREP and was wondering if there is a preferred way to create an ALTREP wrapper vector without using .Internal(wrap_meta(?)), which R CMD check doesn?t like since it uses an .Internal() function. I was trying to create a factor that used an ALTREP integer, but attempting to set the class and levels attributes always ended up duplicating and materializing the