Displaying 20 results from an estimated 7000 matches similar to: "bug in methods' 'initialize' (or the functions called in turn) ?"
2007 Oct 30
1
include a class file for access to an object
hello all
Im new to ruby and im just trying to see how i can instanciate an
object that is defined in a class file like myclass.rb then in another
file like start.rb i just call it like so newObj = myclass.new do i need
the include statement at the top? like include myclass.rb or mayby the
require statement? Thanks
--
Posted via http://www.ruby-forum.com/.
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
For documentation we use a system that generates Rd files from special
comments in the code. (inlinedocs).
It is crucial to be able to get the defining source code for objects like
methods to extract the comments from it.
Here is an R session that shows how this works for several kinds of methods
and (at the end of the session) how if fails for methods of "initialize"
>
2019 Nov 30
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi again,
Beside R_ParseVector()'s possible inconsistent behavior, R's handling of
zero-length named elements does not seem consistent either:
```
> lst <- list()
> lst[[""]] <- 1
> names(lst)
[1] ""
> list("" = 1)
Error: attempt to use zero-length variable name
```
Should the parser be made to accept as valid what is otherwise possible
2011 Oct 31
1
Question about copying reference objects using the initialize method
Dears,
I have a question about copying reference objects using the initialize method.
1) If the latter has no arguments, there is no problem to copy an object.
myClass = setRefClass("myClass", fields = list(value = "numeric") )
myClass$methods(initialize = function(...){
? value <<- 1
? callSuper(...)
})
newObject = myClass$new()
newObject$value = 2
copyObject =
2019 Dec 07
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Thanks for the quick response Tomas.
The same error is indeed happening when trying to have a zero-length
variable name in an environment. The surprising bit is then "why is this
happening during parsing" (that is why are variables assigned to an
environment) ?
We are otherwise aware that the error is not occurring in the R console,
but can be traced to a call to R_ParseVector() in
2018 Oct 07
4
Warning when calling formals() for `[`.
Hello,
I don't see why you say that the documentation seems to be wrong:
class(args(`+`))
#[1] "function"
args() on a primitive does return a closure. At least in this case it does.
Rui Barradas
?s 14:05 de 07/10/2018, Peter Dalgaard escreveu:
> There is more "fun" afoot here, but I don't recall what the point may be:
>
>> args(get("+"))
2015 May 04
2
C-API: check whether R has been initialized ?
rPython appears to provide an interface from R to Python by embedding
Python and I'd think that it can safely assume that R has been initialized,
but might not be the point here.
The issue is that a Python package embedding itself R (here rpy2) appears
to have no way to know that earlier in the life of the process R was
initialized.
2015-05-03 19:48 GMT-04:00 Duncan Murdoch
2019 Dec 14
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Le lun. 9 d?c. 2019 ? 09:57, Tomas Kalibera <tomas.kalibera at gmail.com> a
?crit :
> On 12/9/19 2:54 PM, Laurent Gautier wrote:
>
>
>
> Le lun. 9 d?c. 2019 ? 05:43, Tomas Kalibera <tomas.kalibera at gmail.com> a
> ?crit :
>
>> On 12/7/19 10:32 PM, Laurent Gautier wrote:
>>
>> Thanks for the quick response Tomas.
>>
>> The same error
2006 May 23
0
where to initialize a variable in an AJAX based application
Hello All,
I am getting confused with best practices. I posted a topic earlier but
realized how confusing it was. Thus I will do my best to be as clear as
possible.
I am a bit confused on best practice for instanciate a variable that
will be used accross several methods within the same controller. I need
this because of AJAX, here is a description of what I intend to do:
(all this in done
2019 Dec 14
1
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi Simon,
Widespread errors would have caught my earlier as the way that code is
using only one initialization of the embedded R, is used quite a bit, and
is covered by quite a few unit tests. This is the only situation I am aware
of in which an error occurs.
What is a "correct context", or initial context, the code should from ?
Searching for "context" in the R-exts manual
2019 Nov 30
2
Inconsistent behavior for the C AP's R_ParseVector() ?
Hi,
The behavior of
```
SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP);
```
defined in `src/include/R_ext/Parse.h` appears to be inconsistent depending
on the string to be parsed.
Trying to parse a string such as `"list(''=1+"` sets the
`ParseStatus` to incomplete parsing error but trying to parse
`"list(''=123"` will result in R sending a message to the
2019 Dec 09
3
Inconsistent behavior for the C AP's R_ParseVector() ?
Le lun. 9 d?c. 2019 ? 05:43, Tomas Kalibera <tomas.kalibera at gmail.com> a
?crit :
> On 12/7/19 10:32 PM, Laurent Gautier wrote:
>
> Thanks for the quick response Tomas.
>
> The same error is indeed happening when trying to have a zero-length
> variable name in an environment. The surprising bit is then "why is this
> happening during parsing" (that is why
2016 Mar 27
2
PHP5 - Query Parsing Bug
I'm replying to a very old thread (9 years ago) here
http://grokbase.com/t/xapian/xapian-discuss/072tprmr6h/php5-query-parsing-bug
So not sure if that's going to end up being more or less readable...
I have this error :
Fatal error: No matching function for overloaded 'new_Query' in
/usr/share/php/xapian.php on line 2607
Line 2607 (and surrounding) looks like this and are in
2018 Oct 06
5
Warning when calling formals() for `[`.
Hi,
A short code example showing the warning might the only thing needed here:
```
> formals(args(`[`))
NULL
*Warning message:In formals(fun) : argument is not a function*
> is.function(`[`)
[1] TRUE
> is.primitive(`[`)
[1] TRUE
```
Now with an other primitive:
```
> formals(args(`sum`))
$...
$na.rm
[1] FALSE
> is.function(`sum`)
[1] TRUE
> is.primitive(`sum`)
[1] TRUE
2011 Jun 29
1
Ref Classes: bug with using '.self' within initialize methods?
Dear list,
I'm wondering if the following error I'm getting is a small bug in the
Reference Class paradigm or if it makes perfect sense.
When you write an explicit initialize method for a Ref Class, can you
then make use of '.self' WITHIN this initialize method just as you would
once an object of the class has actually been initialized?
Because it seems to me that you can not.
2017 Jan 02
1
Definition of uintptr_t in Rinterface.h
> On Jan 1, 2017, at 5:12 PM, Laurent Gautier <lgautier at gmail.com> wrote:
>
>
>
> 2017-01-01 8:28 GMT-05:00 Prof Brian Ripley <ripley at stats.ox.ac.uk>:
> On 29/12/2016 15:55, Simon Urbanek wrote:
> The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h. Should be now
2016 Dec 27
3
Definition of uintptr_t in Rinterface.h
Hi,
I was recently pointed out that a definition in Rinterface.h can be conflicting
with a definition in stdint.h:
/usr/include/R/Rinterface.h has:
typedef unsigned long uintptr_t;
/usr/include/stdint.h has:
typedef unsigned int uintptr_t;
(when 32bit platform complete definition is:
#if __WORDSIZE == 64
# ifndef __intptr_t_defined
typedef long int intptr_t;
# define
2017 Jan 01
3
Definition of uintptr_t in Rinterface.h
On 29/12/2016 15:55, Simon Urbanek wrote:
> The problem is elsewhere - Rinterface.h guards the ultima-ratio fallback with HAVE_UINTPTR_T but that config flag is not exported in Rconfig.h. Should be now fixed in R-devel - please check if that works for you.
Rconfig.h would be appropriate if Rinterface.h is being included from C
code using the same compiler as used for R. But as Rinterface.h
2015 Apr 17
3
[PATCH 1/6] platform: specify the IOMMU physical translation bit
On Thu, Apr 16, 2015 at 8:06 PM, Vince Hsu <vinceh at nvidia.com> wrote:
> The IOMMU physical translation bit might vary with different SoCs. So add
> a variable to specify this bit for GK20A.
>
> Signed-off-by: Vince Hsu <vinceh at nvidia.com>
> ---
> drm/nouveau/nouveau_platform.c | 19 +++++++++++++++++++
> drm/nouveau/nouveau_platform.h | 1 +
> 2 files
2019 Sep 08
6
Error: package or namespace load failed for ‘utils
Hi,
When starting an embedded R I encounter the following issue under certain
conditions:
```
Error: package or namespace load failed for ?utils? in if (.identC(class1,
class2) || .identC(class2, "ANY")) TRUE else {:
missing value where TRUE/FALSE needed
```
(more such errors for grDevices, graphics, and stats)
And in the end:
```
Warning messages:
1: package ?utils? in