Displaying 20 results from an estimated 1900 matches similar to: "bug: sticky symbol refs? (PR#9555)"
2007 Feb 08
2
obscure error with subsetting as.list() of a function then assigning that a (PR#9500)
Hello. I was writing some code that computes on the language and came across
this. I can work around it, but thought you might like to know about it.
> f <- function(x) { NULL }
> a <- as.list(f)[[1]]
> a # ie print(a)
Error: argument "a" is missing, with no default
Note it says *argument* "a", which is strange. In fact, and unsurprisingly, the bug lies
with
2007 Feb 23
2
Functions that write functions in R packages
Dear all,
Another question related to my ggplot package: I have made some
substantial changes to the backend of my package so that plot objects
can now describe themselves much better. A consequence of this is
that a number of convenience functions that previously I wrote by
hand, can now be written automatically. What is the best practice for
creating these functions for bundling in a
2004 Mar 23
3
how to modify variables of another frame (but not global)
Hello!
Maybe "frame" is not the right term in this context.
I explain my problem by example code:
fun2 <- function(objName, add) {
## the object "objName" should be increased by "add",
## but the evaluation should be done in the calling function (here:
fun1)
## ...... what's the right code??
}
fun1 <- function() {
x <- 1
fun2("x",
2012 Jan 21
1
Enumerate the class of objects
ls() gives me the vector of objects in the workspace
class(objName) gives me the class of objName
class(ls()) just returns character as many times as there are objects.
How do I get a vector of all objects in the workspace?
[[alternative HTML version deleted]]
2013 Mar 20
1
S4 Reference Classes: undesired behavior when calling method '$field()'
Dear list,
I came across a behavior that IMHO is somewhat undesired when calling
'$field()':
If the field name whose value you're trying to get is *not* a valid
field of the Reference Class, then R doesn't stop there with an error,
but scans through all enclosing environments/frames. The result is
something similar to calling '|get(<objname>, inherits=TRUE)|'
2008 Aug 28
2
Tidying up code - Warning message: deparse may be incomplete
Dear R users,
I am currently writing a R package and to do so I am following the
guidelines in manual 'Writing R extensions'.
In Section 3.1, it is suggested to tidy up the code using a file
containing the following:
options(keep.source = FALSE)
source("myfuns..R")
dump(ls(all = TRUE), file = new.myfuns.R")
I have done this for my own packages and although it runs, I get
2012 Apr 24
2
load only one object from a .RData file
Hi list,
Is there a way to load one specific object from a .RData file which contains multiple data objects?? Thanks,
...Tao
2015 Feb 16
4
[LLVMdev] Segfault when using llvm-3.6 and OpenGL at the same time on Linux (with mesa, which uses llvm-3.4)
Hello there,
tl;dr:
Is it a known behaviour that using llvm-3.4 and llvm-3.6 at the same time
in the same process (while llvm-3.6 is used from a linked shared library
and llvm-3.4 is dlopen'ed - with a strange detail: Especially if -rdynamic
is used when linking the program).
If so, is there a workaround?
If not, can it be fixed in llvm-3.6?
Long story:
I am writing a program that creates
2012 Jun 13
3
How to plot linear, cubic and quadratic fitting curve in a figure?
Hi R experts,
Could you please help me to fit a linear, cubic and quadratic curve in a figure? I was trying to show all these three fitting curves with different colour in one figure.
I spent substantial time to figure it out, but I could not.
I have given here a example and what I did for linear, but no idea for cubic and quadratic fitting curve
> dput(test)
structure(list(sp = c(4L, 5L,
2007 Feb 08
0
obscure error with subsetting as.list() of a function then (PR#9504)
peter-m.schumacher at db.com writes:
> Hello. I was writing some code that computes on the language and came acr=
oss
> this. I can work around it, but thought you might like to know about it.
>
>> f <- function(x) { NULL }
>> a <- as.list(f)[[1]]
>> a # ie print(a)
> Error: argument "a" is missing, with no default
>
> Note it says *argument*
2006 Dec 21
1
A problem with "copy()" in the svIO package
Hi R-users:
When I type the following code in R, using
the svIO package I got a problem only with
the "latex" type option.(With "raw", "ascii" and
"html" options, it works fine).
x<-1:50
copy('x', type='latex', objname='x')
Erro en file.info(fn <- c(...)) : argumento del nombre de archivo inv?lido
Thank you for your help.
2010 Nov 24
1
diverting output from nested loops
Dear List,
I have a series of nested loops with the structure shown below, and I am
struggling to figure out how to divert output to folders created with
dir.create() within the loops.
What I need is for the output to end up as topNameK/subNameL/objNameM.pdf;
what I get instead is a series of directories topNameK/, directories
subNameL/, and files objNameM.pdf, all in the working directory. Any
2007 Feb 09
0
obscure error with subsetting as.list() of a function then (PR#9506)
Ok, thanks for clearing it up. But:
> It's not a bug things work in ways that confuse users when they pry
> into things they were not expected to pry into.... Do you have a good=
> reason to call this a bug?
Well if it's intended to work that way then it's not a bug.
As I said, I was computing on the language, in particular writing code =
that
processes the parse tree of a
2008 Mar 07
3
merging environments
Despite the spirited arguments of various R-core folks
who feel that mle() doesn't need a "data" argument, and
that users would be better off learning to deal with function
closures, I am *still* trying to make such things work
in a reasonably smooth fashion ...
Is there a standard idiom for "merging" environments?
i.e., suppose a function has an environment that I want
2007 Oct 24
3
scoping problem
I would like to write a function that computes Tukey's 1 df for
nonadditivity. Here is a simplified version of the function I'd like to
write: (m is an object created by lm):
tukey.test <- function(m) {
m1 <- update(m, ~.+I(predict(m)^2))
summary(m1)$coef
}
The t-test for the added variable is Tukey's test. This won't work:
data(BOD)
m1 <- lm(demand~Time,BOD)
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
2018 Feb 25
0
segfault calling SDL_Init with FFI/ MCJIT
I'm getting a segfault when I call `SDL_Init( SDL_INIT_VIDEO )` within
the MCJIT. If I compile the same program to an EXE I don't have a problem.
Are there any general restrictions, or known issues, with loading a
library like SDL2 via the MCJIT? (LLVM-3.8 still)
The stack trace, from GDB, is below. I noticed the error actually
happens deep inside a transitively loaded GL drive module,
2007 Jun 30
1
"R CMD INSTALL in R 2.5.1 (2007-06-27)"
Hello,
I'm moving from R 2.2.1 (Winows XP) to R 2.5.1 and have problems with
installing "myfuncs", which worked OK in 2.2.1
R CMD INSTALL myfuns
# gives
installing to ''
---------- Making package myfuncs ------------
adding build stamp to DESCRIPTION
installing R files
installing man source files
installing indices
installing help
>>>
2011 Aug 26
2
eRm/raschsampler error message
Hi, I am running the non-parametric rasch model tests using eRm. I have a
reasonably large dataset for this type of exercise (110 items, 248 persons).
I run:
> allb2=as.matrix(allb)
> rsample <- rsampler(allb2, ctr)
> t102<-NPtest(rsample, method="T10") #global test, subgroup inv
and receive error message as follows.
"Error in m[idx1, idx2] <- 1 : subscript out
2011 Jul 11
4
Save generic plot to file (before rendering to device)
I am looking for a way to save a plot (graphics contents) to a file after the
plot has been calculated but before it has been rendered. More specifically,
assume that I made a plot that took a very long time to produce, I would
like to save this plot to a generic file that I can later, on a different
machine, render to either PDF, PNG, SVG using the usual R graphics devices,
without recalculating