Displaying 20 results from an estimated 200 matches similar to: "Feature request: put NewEnvironment and R_NewhashedEnv into API"
2010 Aug 29
1
Feature request: put NewEnvironment and R_NewhashedEnv into API
Hi,
as Seth Falcon in 2006, I also need to create new environments from package C code. Unfortunately, both NewEnvironment and R_NewHashedEnv are not yet part of the public API, if I understand correctly.
Is it planned to add at least one of these functions to the public API in the near future? May I submit a patch? Otherwise I would need to re-implement much of the functionality of R
2009 Oct 01
2
creating environments in package's C code
Dear developers,
is it possible to create environments in C code of packages?
Simply using
SEXP env;
PROTECT (env = allocSExp(ENVSXP));
and assigning the enclosing environment with SET_ENCLOS seems to be
insufficient.
Best wishes,
Martin
--
Dr. Martin Becker
Statistics and Econometrics
Saarland University
Campus C3 1, Room 206
66123 Saarbruecken
Germany
2023 Feb 08
1
On optimizing `R_NewEnv()`
Hi all,
I really like the addition of `R_NewEnv()` back in 4.1.0
https://github.com/wch/r-source/blob/625ab8d45f86f65561e53627e1f0c220bdc5f752/src/main/envir.c#L3619-L3630
I have a use case where I'm likely to call this function a large
number of times to generate many small hashed environments, so I'd
like to optimize it as far as possible.
I noticed that it takes `int size`, converts
2024 Jul 15
1
Minor inconsistencies in tools:::funAPI()
Hi all,
I've noticed some peculiarities in the tools:::funAPI output that
complicate its programmatic use a bit.
- Is it for remapped symbol names (with Rf_ or the Fortran
underscore), or for unmapped names (without Rf_ or the underscore)?
I see that the functions marked in WRE are almost all (except
Rf_installChar and Rf_installTrChar) unmapped. This makes a lot of
sense because some
2013 Sep 27
1
LENGTH function causing name conflict
I am attempting to bring R-3.0.2 functionality into a project with a very
large C++ codebase. The existing codebase already has a LENGTH function
defined. R also defines a LENGTH function.
I first compiled R as a shared library and linked it into this existing
codebase, along with RInside. When I run a parseEvalQ with a linear model
command it will stack dump. Looking at the backtrace, what is
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks,
When I run the document below through sweave, rgui.exe/rsession.exe
leaves a file handle open to the sweave-001.pdf graphic (as verified by
process explorer). Pdflatex.exe then crashes (with a Permission Denied
error) because the graphic file is locked.
This only seems to happen when there is an error in the sweave document.
When there are no errors, no file handles are left open.
2009 Nov 01
2
Internal error in 'ls' for pathological environments (PR#14035)
nchar(with(list(2),ls())) gives an internal error. This is of course
a peculiar call (no names in the list), but the error is not caught
cleanly.
It is not clear from the documentation whether with(list(2)...) is
allowable; if it is not, it should presumably give an error. If it is, then
ls
shouldn't have problems with the resulting environment.
> qq <- with(list(2),ls())
2009 Nov 01
0
Internal error in 'ls' for pathological environments (PR#14036)
On Sun, Nov 1, 2009 at 6:02 AM, Peter Dalgaard <p.dalgaard at biostat.ku.dk> w=
rote:
> macrakis at alum.mit.edu wrote:
>>
>> nchar(with(list(2),ls())) gives an internal error. This is of course
>> a peculiar call (no names in the list), but the error is not caught
>> cleanly.
>>
>> It is not clear from the documentation whether with(list(2)...) is
2013 Oct 04
2
Again about encoding speed of different compiles
I downloaded current version of FLAC sources and compiled it with:
* GCC 4.8.1 (MSYS from http://xhmikosr.1f0.de/tools/)
* Intel C++ Composer XE 2013 update 5
* MSVS 2010 SP1
* MSVS 2012 update 3
(SSSE3 and SSE4.1 code was disabled for all compilers)
Stereo 24-bit WAV file was encoded with -8 preset.
Encoding time, in seconds:
GCC 32-bit: 209
ICC 32-bit: 130
VS10 32-bit: 116
VS12 32-bit: 114
2002 Nov 13
1
Package documentation and rd.sty
Hi all,
I've got a basic question regarding package documentation and rd.sty. I
wrote my first own package, and now I would like to place the documentation
into the appendix of another LaTex document. Seemingly I cannot simply
\usepackage{Rd}, as this will modify the page-settings of my document. Is
there a minimum style file which will just define the environments and
commands needed for
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all,
I am using Sweave to produce a document. Unfortunately, I have to print
several copies and I can't print them in color. So I would like to
change the way of printing the code. I would like to print the code in a
box with a black borderline and a grey background (quite classic). Is it
possible to do it by changing some Schunk options?
Christophe
2012 Feb 19
2
include <R.h>
I am trying to add
#include <R.h>
to a .c file in one of my package, so I can call error() without a
complaint about implicit defined function. The src/ has a Makefile, to
build some exec/ files that are needed. Without the include, my Makefile
target
OBJS = $(SRC:.c=.o)
$(PKGNAME).so: $(OBJS) rpcx.h
$(R_HOME)/bin/R CMD SHLIB $(OBJS)
seems to work fine, and I do not need a target
2009 Jun 14
1
Centering graphics by default in Sweave
Is there an elegant way to get Sweave to center graphics by default?
I'd like to use \centerline{\includegraphics{}} etc. to save some
vertical space that \begin{center} ... \end{center} uses, and I'd like
to avoid centering with each <<fig=T>>=
Thanks
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of
2024 Jul 29
1
Minor inconsistencies in tools:::funAPI()
Hi Ivan
Can you please clarify what input files should be used with your
proposed function? I tried a few files in r-svn/src/include and one of
them gave me an error.
> getdecl("~/R/r-svn/src/include/R.h")
[1] "R_FlushConsole" "R_ProcessEvents" "R_WaitEvent"
> getdecl("~/R/r-svn/src/include/Rdefines.h")
Error in regmatches(lines,
2008 Jul 27
2
Colors in Sweave
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}
2010 Apr 04
1
Make check failure
Hi all,
I've just grabbed a copy of SVN head for libogg and 'make check'
is failing:
./test_framing
testing single page encoding... 0, (0), granule:0 ok.
testing basic page encoding... 0, (0), granule:0 1, (1), granule:6151 ok.
testing basic nil packets... 0, (0), granule:0 1, (1), granule:10247 ok.
testing initial-packet lacing > 4k... 0, (0), granule:0
2005 Mar 18
4
Sweave/margin
Hi!
I am currently using Sweave for writing my bachelor thesis - and I have a
problem:
I am using a LaTeX style (report) with quite big margin spaces. The Sweave
generated LaTeX code "floats" into the margin - and it looks ugly. The text
is blocked and fine... then there comes some flattering code running over
the margin... and blocked text again.
Considering the LaTeX output, I guess
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
Dear Colleagues:
In an attempt to have things like # See page \pageref{this} inside
comments in R code chunks I have modified Sweave.sty as below. I have
followed fancyvrb's manual with regard to the use of the commandchars
argument. But when compiling with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname
2020 Jun 02
0
R standalone Rmath library - missing log1pexp(), rnbeta()
>>>>> William Birkett
>>>>> on Mon, 1 Jun 2020 15:16:07 -0400 writes:
> I built the the standalone Rmath library,
> https://cran.r-project.org/doc/manuals/r-release/R-admin.html#The-standalone-Rmath-library
> <https://cran.r-project.org/doc/manuals/r-release/R-admin.html#The-standalone-Rmath-library>
> The build process went
2024 Jul 20
0
Proposal: C API documentation - API index by category
Hello R Core team,
As someone who working on bindings to the API, having an index of the public API is a very welcome change.
In order to improve the ability for users to explore the API, I would like to propose adding a section of the API Index by category.
You already have the functions and variables categorized by section, so I would suggest to use sections as the categories, and inside