Displaying 20 results from an estimated 26 matches for "ncase".
Did you mean:
case
2008 Aug 01
2
is this a bug (apply and class) ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080801/a1a7c3e9/attachment.pl>
2020 May 22
0
round() and signif() do not check argument names when a single argument is given
...nd
do a source() of the file. Both R 4.0.0 and the changed code correctly
cause errors in case 7/8, to demonstrate that these cases are not impacted
by the change.
##This tests various round/signif argument configurations
## Each of these should succeed/fail the same if used in signif
cat("\nCase 1: round(1.12345): " )
cat(round(1.12345),"\n")
cat("\nCase 2: round(x=1.12345,2): ")
cat(round(x=1.12345,2),"\n")
cat("\nCase 3: round(x=1.12345,digits=2): ")
cat(round(x=1.12345,digits=2),"\n")
cat("\nCase 4: round(digits=2,x=1.12345)...
2005 Apr 09
4
make check-all fails (PR#7784)
...e[1]: Leaving directory `/home/znmeb/R-beta/tests'
make: *** [check-all] Error 2
I looked at "tests/reg-tests-1.Rout.fail"; it's 1427 lines long. The error given
is
> ## Comments:
>
>
> ## PR 796 (aic in binomial models is often wrong)
> ##
> a1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,
+ data = esoph, family = binomial())$aic
> a1
[1] 236.9645
> a2 <- glm(ncases/(ncases+ncontrols) ~ agegp + tobgp * alcgp,
+ data = esoph, family = binomial(), weights=ncases+ncontrols)$aic
> a2
[1] 236.9645
> stopifnot(a1 == a2)
Error: a1...
2008 Feb 20
3
reshaping data frame
Dear all,
I'm having a few problems trying to reshape a data frame. I tried with
reshape{stats} and melt{reshape} but I was missing something. Any help is
very welcome. Please find details below:
#################################
# data in its original shape:
indiv <- rep(c("A","B"),c(10,10))
level.1 <- rpois(20, lambda=3)
covar.1 <- rlnorm(20, 3, 1)
level.2
2010 May 16
1
predict.lda breaks when priors are specified
Dear R help,
What am I doing wrong here? when I don't specify the priors it works
just fine but when I specify the priors it breaks.? Does anyone know
why and how I can fix it?
----
> N=20000
> ncontrol=ncases=50
> X <- as.matrix(rnorm(N,0,1))
> eta <- -5.3 + X * 1.7
> p <- exp(eta)/(1+exp(eta))
> Y <- rbinom(N,1,p)
> controls <- sample(seq_len(N), ncontrol, prob=!Y)
> cases <- sample(seq_len(N), ncases, prob=Y)
> data<-rbind(
+ data.frame(Y = 0, X = cbind(1,X[c...
2002 Aug 13
1
interaction.plot() legend too narrow when mfcol > 2 (PR#1899)
...t;))()
par(mfrow = c(2,2))
## part of example(interaction.plot) _improved_ using with() :
data(OrchardSprays)
with(OrchardSprays, {
interaction.plot(treatment, rowpos, decrease)
interaction.plot(rowpos, treatment, decrease)
})
data(esoph)
with(esoph, {
interaction.plot(agegp, alcgp, ncases/ncontrols)
interaction.plot(agegp, tobgp, ncases/ncontrols, trace.label="tobacco",
fixed=TRUE)
})
-------------------------------
Something that should be easy to fix, but needs some care (and
time).
Volunteers?
Martin Maechler <maechler@stat.math.ethz.ch&...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...union node *n, int flags)
break;
}
loopnest--;
- popstackmark(&smark);
return status;
}
@@ -433,14 +436,12 @@ evalcase(union node *n, int flags)
union node *cp;
union node *patp;
struct arglist arglist;
- struct stackmark smark;
int status = 0;
errlinno = lineno = n->ncase.linno;
if (funcline)
lineno -= funcline - 1;
- setstackmark(&smark);
arglist.lastp = &arglist.list;
expandarg(n->ncase.expr, &arglist, EXP_TILDE);
for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist.next) {
@@ -459,8 +460,6 @@ evalcase(union no...
2010 Sep 09
0
Plotting dates and grid lines on the X-Axis of xyplot
...(theData, theData$Well==theWell)
streams<-levels(pData$Stream)
} else {
pData <- subset(theData, theData$Well==theWell & (theData$Stream %in%
streams))
}
nStreams <- length(streams)
# process cases
pData$Case<-relevel(pData$Case, ref=obs)
theCases <- levels(pData$Case)
nCases <- nlevels(pData$Case)
theObsCase <- which(theCases==obs)[1]
types<-ifelse(1:nCases==theObsCase,"p","l")
theLegendLines <- 1:nCases==theObsCase
myFill.color=c("red","orange","ForestGreen","black","blue","D...
2003 Jan 21
1
[R] proposal: lattice/levelplot: panel.catlevelplot
...ill = col.regions[i.col]
)
}
}
}
}
#------ EXAMPLE -----------------------------------------------------------
data(esoph)
library(lattice)
example1.catlevelplot.esoph <- function( ... ){
ncolors <- nlevels( esoph$alcgp )
print( levelplot( ncases ~ agegp * alcgp | tobgp, data=esoph
, main = 'esoph data set'
, sub = 'tobgp'
, cuts = ncolors
, layout = c( 4, 4 )
, scales=list(
x = list( labels = levels( esoph$agegp ), rot=90, alternating=F )...
2003 Sep 16
2
How does "subset" replace arguments? (PR#4193)
Full_Name: Axel Benz
Version: 1.7.1
OS: Windows
Submission from: (NULL) (137.251.33.43)
Hello,
I guess many people will answer me again that this is a S language feature, but
I am only a stupid computer scientist and I simply do not understand this logic,
despite of reading a lot about S:
> test
field tuckey
4 Kreis2 -1
5 Kreis5 -2
9 Metall -3
17
2019 Apr 05
6
all.equal failure
This arose in testing [.terms and has me confused.
data(esoph)?? # use a standard data set
t0x <- terms(model.frame( ~ tobgp, data=esoph))
t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
t1x <- (delete.response(t1))[-1]
> all.equal(t0x, t1x)
[1] TRUE
# the above is wrong, because they actually are not the same
> all.equal(attr(t0x, 'dataClasses'), attr(t1x, 'dataClasses'))
[1] "Names: 1 string mismatch"
[2] &quo...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...; ~SKIPCONT)
break;
}
loopnest--;
popstackmark(&smark);
+
+ return status;
}
-STATIC void
+STATIC int
evalcase(union node *n, int flags)
{
union node *cp;
union node *patp;
struct arglist arglist;
struct stackmark smark;
+ int status = 0;
errlinno = lineno = n->ncase.linno;
if (funcline)
@@ -444,12 +442,16 @@ evalcase(union node *n, int flags)
setstackmark(&smark);
arglist.lastp = &arglist.list;
expandarg(n->ncase.expr, &arglist, EXP_TILDE);
- exitstatus = 0;
for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...; ~SKIPCONT)
break;
}
loopnest--;
popstackmark(&smark);
+
+ return status;
}
-STATIC void
+STATIC int
evalcase(union node *n, int flags)
{
union node *cp;
union node *patp;
struct arglist arglist;
struct stackmark smark;
+ int status = 0;
errlinno = lineno = n->ncase.linno;
if (funcline)
@@ -444,12 +442,16 @@ evalcase(union node *n, int flags)
setstackmark(&smark);
arglist.lastp = &arglist.list;
expandarg(n->ncase.expr, &arglist, EXP_TILDE);
- exitstatus = 0;
for (cp = n->ncase.cases ; cp && evalskip == 0 ; cp = cp->nclist...
2010 Feb 04
2
help needed using t.test with factors
I am trying to use t.test on the following data:
date type INTERVAL nCASES MTF SDF MTO SDO
nFST MF nOBS MO MB BIASCV BIASEV ME MAE
RMSE CRCF
2001-06-15 avn GE1.00 4385 0.246 0.300 1.502
0.556 1367 1.373 4385 1.502 1.471 0.285 0.164
-1.256 1.266 1.399 0.056
2001-06-15...
2019 Apr 05
0
all.equal failure
On 05/04/2019 9:03 a.m., Therneau, Terry M., Ph.D. via R-devel wrote:
> This arose in testing [.terms and has me confused.
>
> data(esoph)?? # use a standard data set
>
> t0x <- terms(model.frame( ~ tobgp, data=esoph))
> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
> t1x <- (delete.response(t1))[-1]
>
> > all.equal(t0x, t1x)
> [1] TRUE
>
> # the above is wrong, because they actually are not the same
>
> > all.equal(attr(t0x, 'dataClasses'), attr(t1x, 'dataClasses'))
> [1...
2005 Nov 18
1
challenge: using 'subset = <computed>' inside function ..
...##or subset = eval(substitute(Y > 0, list(Y = formula[[2]]))),
##or subset = as.expression(bquote(.(formula[[2]]) > 0)),
##or subset = bquote(.(formula[[2]]) > 0),
na.action = na.action)
mf
}
## never works
tst(ncases ~ agegp + alcgp, data = esoph)
traceback() #--> shows that inside model.frame.default
# eval(substitute(subset, ...)) is called as well
----
Happy quizzing..
Martin Maechler, ETH Zurich
2019 Apr 05
0
[EXTERNAL] Re: all.equal failure
...a.m., Therneau, Terry M., Ph.D. via R-devel wrote:
>>> This arose in testing [.terms and has me confused.
>>>
>>> data(esoph)?? # use a standard data set
>>>
>>> t0x <- terms(model.frame( ~ tobgp, data=esoph))
>>> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
>>> t1x <- (delete.response(t1))[-1]
>>>
>>> ? > all.equal(t0x, t1x)
>>> [1] TRUE
>>>
>>> # the above is wrong, because they actually are not the same
>>>
>>> ? > all.equal(attr(t0x, '...
2023 Mar 30
1
Problems with foreign
Good day
My name is Jos? Oscar, I'm from Mexico and I have some questions about
foreign in your write.foreig( ) function. We know that this function
generates the inputs to be able to run them or execute them in another
program like SPSS, SAS or Stata. In these cases, when creating an example
file, a matrix and using the function to execute the .sps file directly
from SPSS, I don't care or
2019 Apr 05
0
[EXTERNAL] Re: Re: all.equal failure
...te:
>>>>> This arose in testing [.terms and has me confused.
>>>>>
>>>>> data(esoph)?? # use a standard data set
>>>>>
>>>>> t0x <- terms(model.frame( ~ tobgp, data=esoph))
>>>>> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
>>>>> t1x <- (delete.response(t1))[-1]
>>>>>
>>>>> ? > all.equal(t0x, t1x)
>>>>> [1] TRUE
>>>>>
>>>>> # the above is wrong, because they actually are not the same
>>...
2001 Apr 15
1
contingency tables in R
Dear List:
Most of the analysis I do involves contingency tables.
I am migrating to R from Stata and I have a number of
questions about using contingency tables in R. I
suspect that most of the things I want to do are very
short R scripts that people on this list probably
have. I wonder if you would be willing to share them.
First, the presentation of tables by table() is not