Displaying 20 results from an estimated 9000 matches similar to: "difficulties with setMethod("[" and ..."
2011 Mar 10
1
getting percentiles by factor
Hello,
I'm trying to get percentiles (PERCENTRANK for excel users) by factor in the
following data.frame:
myExample <- data.frame(Ret=seq(-2, 2.5,
by=0.5),PE=seq(10,19),Sectors=rep(c("Financial","Industrial"),5))
myExample <- na.omit(myExample)
Thanks to Patrick I I managed to put together the following lines which does
it for the "Ret" column:
myecdf
2006 May 26
1
R.oo question
This is a simple R.oo question but I, thankfully, hope that someone
would explain it to me so I would better understand this work frame.
I create this class:
setConstructorS3("MyExample", function(param=0) {
print(paste("called with param=", param))
extend(Object(), "MyExample",
.param = param
);
})
>From what is printed out, who made the second call to
2012 Jun 26
5
Next Problem: Puppet 2.7 + Passenger won't connect
OK. What did I booger up this time ?
agent.myexample.org and puppetmaster.myexample.org are the same server.
----------------------------------------------------------------------------
# puppetd --no-daemonize --onetime --debug --noop
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not
2009 Feb 20
2
importing data to SQLite database with sqldf
Hi all,
I am attempting to learn SQL through sqldf...
One task I am particularly interested in is merging separate
(presumably large) files into a single table without loading these
files into R as an intermediate step (by loading them into SQLite and
merging them there).
Taking a step back, I've considered these alternatives:
1) I know if I use straight SQLite commands I might use the
2006 Jan 03
2
Looping Problem With Call Forwards - Do you have comments on my solution?
I use IP Kall to forward my missed cell phone calls to. This way, if my
phone is off, or out of a service area, calls will go to my * box.
Concurrently, all incoming calls to my * box cause it to dial my local
extensions at home, my extension at work, and my cell phone via NuFone.
Problem: A loop can be created if my cell phone is not on. Say a call comes
into my * box, it uses NuFone to call my
2007 Jul 17
1
difficulties with "setMethod"
Dear all!
I do definetley have some difficulties. Here is my code:
> setMethod("write",
+ signature(object = "KMatrix", path = "character"),
+ function(object,path){
+ write.table(object at data,path,row.names=FALSE, sep = "\t")
+ }
+ )
error in match.call(fun, fcall) : unused
2013 Nov 04
1
ggplot2: Add '+' operator for aes (uneval) objects
Dear all,
Is there a reason, why there is no +-operator for aes (i.e. uneval) objects (as there is for themes and gg objects)? I had a couple of cases where such an operator would be useful, for instance to combine the result of aes and aes_string in functions. Any flaws with the following proposition:
`+.uneval` <- function(e1, e2) {
dup <- names(e1) %in% names(e2)
if (any(dup)) {
2003 Nov 05
1
smbusers and wildcards
It is my understanding that if you have a wildcard in smbusers, it
should only apply this if the particular users is not in your
/etc/password file. Is this true? It appears like samba is rolling
down the smbusers file and everything gets mapped to my wildcard user.
Eg.
smbusers:
root = administrator admin
nobody = guest pcguest smbguest
myunixlogin = mysmblogin
www-users = *
If I map a
2005 Dec 02
1
Time series influenced by half-time, intake and treatment...
Hi!
First of all: I'm a newbie to both statistics and R, so please be
patient with me... I do however, like R because I've been programming
(pascal, IDL, perl, C etc) and designing models since -92, but never
related to statistics.
Ok, here we go:
I've got a set of 15 people, all of them observed over 10 weeks (10
analysed blood samples) with - let us kall it the A-value - influenced
2007 Nov 15
3
kalman filter estimation
Hi,
Following convention below:
y(t) = Ax(t)+Bu(t)+eps(t) # observation eq
x(t) = Cx(t-1)+Du(t)+eta(t) # state eq
I modified the following routine (which I copied from: http://www.stat.pitt.edu/stoffer/tsa2/Rcode/Kall.R) to accommodate u(t), an exogenous input to the system.
for (i in 2:N){
xp[[i]]=C%*%xf[[i-1]]
Pp[[i]]=C%*%Pf[[i-1]]%*%t(C)+Q
siginv=A[[i]]%*%Pp[[i]]%*%t(A[[i]])+R
2010 May 05
1
[LLVMdev] Size of packed struct type <{<3 x i32>, i32}>
I have a packed struct <{<3 x i32>, i32}> type that LLVM determines to be 20 bytes.
Is this the expected size for this type?
I wrote a small example to illustrate:
; ModuleID = 'myexample.bc'
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple =
2010 Feb 11
0
IP Kall One-Way Audio
I've scoured the web for hints, and find a lot of chatter about one-way
audio with IP Kall, but no definitive explanation. I have the default range
(5000-31000) of UDP RTP ports forwarded right to my asterisk box, and have
no other difficulties with one-way audio on any other peers. Does anyone
know of a special setting or issue with IP Kall?
--Brent
-------------- next part
2005 Jul 20
1
Default arguments for setMethod() (PR#8021)
Full_Name: Bert Gunter
Version: 2.1.1
OS: Windows 2000
Submission from: (NULL) (192.12.78.250)
There appears to be either a bug or documentation problem in
setMethod/setGeneric with how default arguments are handled. The setMethod Help
says:
******
Method definitions can have default expressions for arguments. If those
arguments are then missing in the call to the generic function, the default
2010 Jun 03
1
setMethod does not work in Window 7??
I am developing a S4 class but have had trouble to make setMethod work
in Window 7. I tested an example found in the setMethod manual:
> require(graphics)
> setMethod("plot", signature(x="track", y="missing"),
+ function(x, y, ...) plot(slot(x, "x"), slot(x, "y"), ...)
+ )
It gave me:
Error in setMethod("plot",
2006 Mar 22
1
setting argument defaults in setMethod
Hi,
I want to set a default value in a method of a generic function. This seems
as though it should be possible. From R help on setMethod...
Method definitions can have default expressions for arguments. If
those arguments are then missing in the call to the generic
function, the default expression in the method is used. If the
method definition has no default for the
2006 Sep 01
1
setMethod("Logic", ...)
Hi
In V&R the "polynomial" class is explicitly specified to have no
logical operators:
setMethod("Logic", signature(e1="polynomial"), function(e1,e2){stop
("...")})
I too have a class of objects for which I want to
specify that Logic operators do not work, but executing
setClass("brob",
representation = representation
2010 Feb 08
1
using setMethod or setGeneric to change S4 accessor symbol from @ to $
I created some S4 objects that are essentially data frame objects. The S4
object definitions were necessary to verify data integrity and force a
standardized data format. I am, however, finding myself redefining all the
typical generic functions so that I can still manipulate my S4 objects as if
they were data frames ... I have used setMethod to set methods for "subset",
2010 May 21
1
S4 method defined but not used
Dear R developers,
I am having a slightly weird issue with a S4 method defined in my package adegenet 1.2-4, with R 2.11.0. As far as I know, the problem is new, and the code implementing the method has not changed for more than a year and worked well so far.
The problem is the following. I define, in the package, a method "[" for the S4 class 'genind'. The method's
2006 Mar 14
1
setMethod confusion
Hello I've checked through previous postings but don't see a fully
equivalent problem-just a few hints.
I have been trying to set a new method for the existing function "table"
or "as.data.frame.table" for my class "tfSites".
Taking out all the useful code and just returning the input class I get
the error
setMethod("table",
2006 Mar 17
0
setMethod bug
Hi,
I define a generic function that has many parameters (~20). I then want to
define methods for the generic function with setMethod. The default behavior
for setGeneric is to allow dispatching on any argument in the def function,
expect ...
For example,
# define a generic function
setGeneric("test",
useAsDefault=FALSE,