Displaying 20 results from an estimated 20000 matches similar to: "Putting an object in a data farme"
2015 Jan 29
3
[Q] Get formal arguments of my implemented S4 method
On Jan 28, 2015, at 6:37 PM, Michael Lawrence <lawrence.michael at gene.com> wrote:
> At this point I would just due:
>
> formals(body(method)[[2L]])
>
> At some point we need to figure out what to do with this .local() confusion.
Agreed, definitely. The current hack is to avoid re-matching arguments on method dispatch, so a fix would need to be fairly deep in the
2016 Sep 22
1
as.character.factor and S4 object containing factor
Do I mess up something or is this a bug? If I define an S4 object
that contains "factor", all the tests indicate that it is a factor but
as.character.factor() complains of it being a non-factor...
> setClass("Foo", contains="factor")
> a <- new("Foo", factor(1:3))
> a
Object of class "Foo"
[1] 1 2 3
Levels: 1 2 3
> class(a)
[1]
2015 Jan 29
2
[Q] Get formal arguments of my implemented S4 method
I wish it didn't have to depend on the name '.local'.
Back when I wrote a lot of S4 methods I avoided the auto-generated .local
and named the local function something that made sense so that is was easier
for a user to track down the source of an error.
E.g., define the generic QQQ with numeric and integer methods:
setGeneric("QQQ",
function(x, ...)NULL)
2003 May 30
2
Creating a vector class
I'm trying to create a package for working on orientation data, i.e.
data where the observations are 3D rotations.
There are several different representations of orientations in common
use: SO(3) matrices, Euler angles, unit quaternions, etc. One thing
I'd like is to make it convenient to work in any representation, and
have conversions to others done as needed.
I'm trying to do
2017 Oct 06
2
[PATCH] lib: Pick up qemu-img path at build time.
The main purpose of this change is two-fold:
(1) Ensure that we run the same version of qemu-img that we are
built against.
(2) Allow the qemu-img path to be overridden at build time in case
it's on a nonstandard path or (like RHV) has a nonstandard name.
---
docs/guestfs-building.pod | 6 ++++++
lib/command.c | 4 ++--
lib/create.c | 4 ++--
lib/info.c
2004 Nov 22
1
Rcmdr -> doItAndPrint -> summary method of S4-class object not in Rcmdr window but R Console
Dear list member,
John Fox proposed to me posting this problem to R-Help:
I have written a function suited for Rcmdr and included this in a R-file
located in Rcmdr/etc as well as an augmented `Rcmdr-menus.txt'.
Now, I am faced with the following problem:
method show() of a S4-class object works flawlessly, that is `doItAndPrint'
works flawlessly and its output is returned correctly into
2015 Jan 29
1
[Q] Get formal arguments of my implemented S4 method
Would we really need the special class or would simply checking the formals
of the method against those of the generic be simple and fast enough?
On Thu, Jan 29, 2015 at 9:41 AM, John Chambers <jmc at r-project.org> wrote:
> I wouldn't want to add more to the current approach; if someone would like
> to devote some time, the much preferable idea IMO would be to replace the
>
2006 Sep 14
1
attributes of S4 objects
I am having a bit of a struggle deciding when to use attributes with
S4 objects. Clearly the 'class' attribute will always be present.
But it is not clear to me whether the architects of the methods
package intend that other attributes, such as 'names', will still be
used when the S4 implementation is complete.
I notice that, when you create a formal object from an
2011 Jan 13
1
s3 methods on S4 objects
I have J Chambers wonderful text ( Software for data Analysis) and I've been
trying
my hand at some very routine S4 OOP development.
One of the things I was trying to do was to create some very basic S4
classes. The first
was simply a class that had a data.frame as part of its representation.
setClass("df",representation(dirframe="data.frame"))
The object basically
2018 May 16
1
Dispatch mechanism seems to alter object before calling method on it
On 05/16/2018 01:24 PM, Michael Lawrence wrote:
> On Wed, May 16, 2018 at 12:23 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:
>> On 05/16/2018 10:22 AM, Michael Lawrence wrote:
>>>
>>> Factors and data.frames are not structures, because they must have a
>>> class attribute. Just call them "objects". They are higher level than
>>>
2009 Oct 19
1
Defining S3-methods for S4-objects: cannot coerce type 'S4' to vector of type 'integer'
In the 'doBy' package there is an esticon() function for calculating linear contrasts for various model types. I have defined an S3-method 'esticon.mer()' for 'mer' objects from the lme4 package. Building the package and invoking the method gives:
> esticon(fm1, c(1,1))
Confidence interval ( WALD ) level = 0.95
Error in as.integer(x) :
cannot coerce type 'S4'
2009 Jun 23
1
Accessing an object from the function in its .Data slot?
I have an S4 object extending "function". Is it there a good way to
access the object (resp. its slots) from within the function in .Data?
If I'm reading help files correctly, it is not possible to overload
'(' (which would be the most elegant solution, I suppose). I can
enclose the slotted data in the function when it is created, but that
obviously doesn't work when
2015 Jun 30
1
Tar CentOS installation and transfer it to new server
On Jun 29, 2015, at 6:50 PM, Mike <1100100 at gmail.com> wrote:
>
> rsync -aAXHx -e 'ssh?
-e ssh has been the default in rsync for a very long time. I believe the newest CentOS where -e defaults to rsh instead is CentOS 3.
You only need to give -e nowadays when you need nonstandard ssh options, and you don?t want to put them in your ~/.ssh/config file. A common example is a
2018 May 16
2
Dispatch mechanism seems to alter object before calling method on it
On 05/16/2018 10:22 AM, Michael Lawrence wrote:
> Factors and data.frames are not structures, because they must have a
> class attribute. Just call them "objects". They are higher level than
> structures, which in practice just shape data without adding a lot of
> semantics. Compare getClass("matrix") and getClass("factor").
>
> I agree that
2015 Dec 12
2
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Fri, 11 Dec 2015 10:11:05 -0800 writes:
> Somehow, the most obvious fixes are always back-incompatible these days.
> The example intrigued me, so I looked into it a bit (should have been doing something else, but ....)
> You're right that this is the proverbial
2015 Dec 11
3
For integer vectors, `as(x, "numeric")` has no effect.
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 8 Dec 2015 15:25:21 +0100 writes:
>>>>> John Chambers <jmc at r-project.org>
>>>>> on Mon, 7 Dec 2015 16:05:59 -0800 writes:
>> We do need an explicit method here, I think.
>> The issue is that as() uses methods for the generic
2015 Dec 19
2
For integer vectors, `as(x, "numeric")` has no effect.
As I tried to say on Dec. 11, there are two levels of "fix":
1. The fix to the complaint in the OP's subject heading is to conform to the default third argument, strict=TRUE: as(1L, "numeric") == 1.0
This generates some incompatibilities, as for classes that extend "numeric". But still leaves class(1.0) "numeric" and typeof(1.0) "double".
2016 Jan 05
2
For integer vectors, `as(x, "numeric")` has no effect.
On Dec 19, 2015, at 3:32 AM, Martin Maechler <maechler at
stat.math.ethz.ch> wrote:
>>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>>> on Sat, 12 Dec 2015 10:32:51 +0100 writes:
>
>>>>>> John Chambers <jmc at r-project.org>
>>>>>> on Fri, 11 Dec 2015 10:11:05 -0800 writes:
>
2017 May 03
2
stopifnot() does not stop at first non-TRUE argument
Not sure why the performance penalty of nonstandard evaluation would
be more of a concern here than for something like switch().
If that can't/won't be fixed, what about fixing the man page so it's
in sync with the current behavior?
Thanks,
H.
On 05/03/2017 02:26 AM, peter dalgaard wrote:
> The first line of stopifnot is
>
> n <- length(ll <- list(...))
>
>
2006 Jul 15
3
names() function and lmer()
Hello All,
I would like to retrieve some of the results from the lmer(...)
function in library lme4. If I run a model, say
fm.1 <- lmer(y ~ 1 + (1 | x), data = dog)
and try names(fm.1), I get NULL. Is there anyway to retrieve the information?
Thanks