Displaying 20 results from an estimated 6000 matches similar to: "parent.frame(1) of a S4 method is not a calling environment."
2011 Sep 03
2
ROCR package question for evaluating two regression models
Hello All,
I have used logistic regression glm in R and I am evaluating two models both learned with glm but with different predictors. model1 <- glm (Y ~ x4+ x5+ x6+ x7, data = dat, family = binomial(link=logit))model2 <- glm (Y~ x1 + x2 +x3 , data = dat, family = binomial(link=logit))
and I would like to compare these two models based on the prediction that I get from each model:
pred1 =
2010 Oct 23
1
Plans for tighter integration of reference classes in R.
Hello Everyone! Here are a couple of thought/questions on refClasses
integration in R core functionality.
First, coexistence with S4:
> X <- setRefClass("classX", fields = c("a", "b"),
+ representation = list(c = "character"))
> x <- X$new()
> x at c <- "sss"
> x
An object of class "classX"
2001 Feb 08
5
kernel freeze after cbq startup
Hello,
I want to ask what am I doing wrong. A few seconds after running this script
my gateway freezes. I use the 2.4.1 kernel compiled on RH 7.0 system using
the kgcc (egcs-1.1.2) compiler.
I have two ethernet cards. The Internet interface eth1 is connected to the
ISP, who shapes out traffic to 128Kbit. I would like to give the high
priority to the e-mail and ssh traffic and to shape others
2019 Apr 01
1
udev rename NIC failed
Hi,
Sometimes, I found one of my Mellanox NIC renamed to rename6, instead
of eth1. The right names of NICs in my system should be:
eth0 Mellanox NIC
eth1 Mellanox NIC
eth2 Intel NIC
eth3 Intel NIC
eth4 Intel NIC
eth5 Intel NIC
eth0 and eth1 will combined as bond1 with mode 4. However, the current
names are:
eth0 Mellanox
2009 Jun 15
1
S4: Bug in group method defenition ("Compare")
Dear UseRs,
Setting methods for groups ("compare" in this case) does not work
properly. Once one method is set ,redefining it or even removing does not
change the behavior:
setClass("foo"
,representation(range="numeric")
)
#[1] "foo"
setMethod("Compare",c(e1="ANY",e2="foo"),
function(e1,e2){
browser()
2003 Sep 22
1
Managing a list with a list
OK. Another amateur question.
I have a list with attributes on pine trees, like the stem's location, a logical value set to T if it's alive, some parameters for growth, diameter, etc. The tree list has another list in it which is a new data type for me.
I want to make a new list that retains all the live trees.
That is where Living == T.
Here's the summary of the list:
>
2010 Sep 23
1
strange behaviour of callNextMethod in S4 methods
Hello,
I experienced a strange behaviour of callNextMethod when used in either
initialize or any other S4 function method definition.
Help says callNextMethod calls the next inherited method for the current
function from where it is called with the same actual (non missing)
arguments. This is OK. The problem appears when some formal arguments
(in particular, S4 objects) of this function are
2009 Oct 22
1
loop vs. apply(): strange behavior with data frame?
Hi everybody,
I noticed a strange behavior when using loops versus apply() on a data frame.
The example below "explicitly" computes a distance matrix given a
dataset. When the dataset is a matrix, everything works fine. But when
the dataset is a data.frame, the dist.for function written using
nested loops will take a lot longer than the dist.apply
######## USING FOR #######
dist.for
2005 Nov 28
1
terms.object documentation bug? (PR#8353)
Full_Name: simon wood
Version: 2.2.0 (and lower)
OS: linux/windows
Submission from: (NULL) (86.135.153.59)
I think that the documentation for the `specials' attribute of a `terms.object'
is not quite right:
specials: If the 'specials' argument was given to 'terms.formula' there
is a 'specials' attribute, a list of vectors indicating the
terms
2010 Nov 15
1
Aggregate on identical link attributes
Hello R community,
I need to do some aggregation based on the test data below. The below
code works ok, but when its applied to my real data which includes over
9,000 records the process runs for over an hour. I know there is a more
efficient way of doing this. I want to Sum the below data's volumes where
FNODE and TNODE match,
i.e. FNODE=1 and TNODE =20 -> Volume=100 ,
2007 Aug 22
3
Help with vector gymnastics
Hello,
What is the best way of solving this problem?
answer <- ifelse(tf=TRUE, i * 5, previous answer)
where as an initial condition
tf[1] <- TRUE
For example if,
tf <- c(T,F,F,F,T,T,F)
over i = 1 to 7
then the output of the function will be
answer = 5 5 5 5 25 30 30
Thank you.
Phil,
2006 Apr 28
2
entries that match a regexp
Hi all,
I am trying to filter the element of a df that start with "TF", like
this:
alfa =
c(123221,"TF13124",41243,"TF1234",32414,"TF13124","TF14333",2134123,"TF1234")
beta =
2013 Jan 09
1
deparse substitute
Hi,
I'm writing a function that needs the input names (as characterstrings) as part of the output.
With deparse(substitute( ) ) that works fine, until I replace all zeros with 0.001 (log is calculated at some time):
tf <- function(input) { input[input==0] <- 0.001 ; deparse(substitute(input)) }
myguess <- 42
tf(myguess) # not "myguess", but "42"
Now when
2009 Nov 17
2
Just what is puppet doing here?
What is puppet doing here?
Nov 17 00:02:01 gumby yum: Installed: tf-starterkit-tfel0-1.0-1.tf.noarch
Nov 17 00:02:01 gumby puppetd[720]:
(//Node[gumby.fr.xxx.com]/Starterkit::Setup[tfel0]/Package[tf-starterkit-tfel0]/ensure)
created
Nov 17 00:02:07 gumby yum: Installed: tf-jboss-server-4.2.3.GA-1.tf.noarch
Nov 17 00:02:07 gumby puppetd[720]:
2018 May 01
1
possible internal (un)tar bug
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 1 May 2018 16:14:43 +0200 writes:
>>>>> G?bor Cs?rdi <csardi.gabor at gmail.com>
>>>>> on Tue, 1 May 2018 12:05:32 +0000 writes:
>> This is a not too old R-devel on Linux, it already fails
>> in R 3.4.4, and on macOS as well.
2005 Aug 03
1
abline and linearity over groups
Dear R users, please can you help me understand the behaviour of abline using function lm.
I'm trying to learn linearity over groups. So I make three groups with 10 values each:
test=data.frame(cbind(
l=c(rnorm(10,0,30),rnorm(10,100,30),rnorm(10,200,30)),
t = c(rep(0,10), rep(1,10), rep(2,10))
))
when I do:
plot(test$l~test$t)
abline(lm(test$l~test$t))
the abline is a straight line
2020 Apr 29
2
[Posible SPAM] Re: Stopwords: Topic modelling con LDA
Hola,
Acabo de calcular tf-idf y me surge una duda. ¿Habría un valor de idf o
tf-idf que se considerara como umbral para establecer que una palabra es
muy común o no? Los valores de idf en mis datos van entre 0 y 3.78 y los
de tf-idf ente 0 y 0.07.
Un saludo
El Mar, 28 de Abril de 2020, 12:53, Carlos Ortega escribió:
> Hola,
> Yo de primeras los quitaría para qué otros topics aparecen.
2015 Feb 22
2
[LLVMdev] Resolving an opaque type in llvm-assembly
According to the Assembly language reference: "In LLVM, opaque types can
eventually be resolved to any type (not just a structure type)." But
the only way I can think of to do so is to give it a type name, then
later redeclare the name. But that gives an error:
%TO = type opaque
%TF = type i32 ( %TO* )
%TO = type %TF
gives:
$ llvm-as types1.ll
llvm-as: types1.ll:3:1: error:
2009 Jun 23
3
subset POSIXct
Hi,
I have a data frame with two columns: dt and tf. The dt column is
datetime and the tf column is a temperature.
dt tf
1 2009-06-20 00:53:00 73
2 2009-06-20 01:08:00 73
3 2009-06-20 01:44:00 72
4 2009-06-20 01:53:00 71
5 2009-06-20 02:07:00 72
...
I need a subset of the rows where the minutes are 53. The hour is
immaterial. I can not find a wildcard
2008 Apr 28
1
[LLVMdev] FoldingSetNodeID operations inefficiency
Hi Chris,
Your were totally right with your suggestion.
I have implemented the code that :
a) does not merge multiple TokenFactor nodes in the DAGCombiner::visitTokenFactor(), if the resulting TF node would contain more than 64 operands.
b) produces a bunch of TokenFactor nodes with at most 64 operands,
instead of one huge TokenFactor in the SelectionDAGLowering::getRoot().
If we have n