The R Project SVN R

Rev

Rev 87452 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87452 Rev 88200
Line 684... Line 684...
684
y <- rpois(100, pmax(3*x, 0))
684
y <- rpois(100, pmax(3*x, 0))
685
glm(y ~ x, family = poisson(identity), start = c(1,0))
685
glm(y ~ x, family = poisson(identity), start = c(1,0))
686
summary(warnings())
686
summary(warnings())
687
 
687
 
688
 
688
 
689
## extending char arrrays
689
## extending char arrays
690
x <- y <- LETTERS[1:2]
690
x <- y <- LETTERS[1:2]
691
x[5] <- "C"
691
x[5] <- "C"
692
length(y) <- 5
692
length(y) <- 5
693
x
693
x
694
y
694
y
Line 2448... Line 2448...
2448
 
2448
 
2449
## Printing NA_complex_
2449
## Printing NA_complex_
2450
m22 <- matrix(list(NA_complex_, 3, "A string", NA_complex_), 2,2)
2450
m22 <- matrix(list(NA_complex_, 3, "A string", NA_complex_), 2,2)
2451
print(m22)
2451
print(m22)
2452
print(m22, na.print="<missing value>")
2452
print(m22, na.print="<missing value>")
2453
## used uninitialized variable in C, noticably Windows, for R <= 2.9.0
2453
## used uninitialized variable in C, noticeably Windows, for R <= 2.9.0
2454
 
2454
 
2455
 
2455
 
2456
## non-standard variable names in update etc
2456
## non-standard variable names in update etc
2457
## never guaranteed to work, requested by Sundar Dorai-Raj in
2457
## never guaranteed to work, requested by Sundar Dorai-Raj in
2458
## https://stat.ethz.ch/pipermail/r-devel/2009-July/054184.html
2458
## https://stat.ethz.ch/pipermail/r-devel/2009-July/054184.html
Line 2490... Line 2490...
2490
switch("a", a=, b=, c=, 4)
2490
switch("a", a=, b=, c=, 4)
2491
switch("a", a=, b=, c=, )
2491
switch("a", a=, b=, c=, )
2492
.Last.value
2492
.Last.value
2493
switch("a", a=, b=, c=, invisible(4))
2493
switch("a", a=, b=, c=, invisible(4))
2494
.Last.value
2494
.Last.value
2495
## visiblilty changed in 2.11.0
2495
## visibility changed in 2.11.0
2496
 
2496
 
2497
 
2497
 
2498
## rounding error in aggregate.ts
2498
## rounding error in aggregate.ts
2499
## https://stat.ethz.ch/pipermail/r-devel/2010-April/057225.html
2499
## https://stat.ethz.ch/pipermail/r-devel/2010-April/057225.html
2500
x <- rep(6:10, 1:5)
2500
x <- rep(6:10, 1:5)
Line 3239... Line 3239...
3239
##cm <- summary(lm(c(0,0,0) ~ 1))$coefficients
3239
##cm <- summary(lm(c(0,0,0) ~ 1))$coefficients
3240
cm <- cbind(Estimate = 0, SE = 0, t = NaN, "Pr(>|t|)" = NaN)
3240
cm <- cbind(Estimate = 0, SE = 0, t = NaN, "Pr(>|t|)" = NaN)
3241
printCoefmat(cm)  # NaN's were replaced by NA in R < 4.1.0
3241
printCoefmat(cm)  # NaN's were replaced by NA in R < 4.1.0
3242
 
3242
 
3243
 
3243
 
3244
## deparse() wraps cflow bodies when deeply burried through a LHS (PR#18232)
3244
## deparse() wraps cflow bodies when deeply buried through a LHS (PR#18232)
3245
##
3245
##
3246
## These didn't print the same before fix, the bquote() expression
3246
## These didn't print the same before fix, the bquote() expression
3247
## missed parentheses
3247
## missed parentheses
3248
 quote(1 +        (if (TRUE) 2)  + 3)
3248
 quote(1 +        (if (TRUE) 2)  + 3)
3249
bquote(1 + .(quote(if (TRUE) 2)) + 3)
3249
bquote(1 + .(quote(if (TRUE) 2)) + 3)
Line 3269... Line 3269...
3269
quote(1^-2 + 3)
3269
quote(1^-2 + 3)
3270
## The "formula" case of Adrian Dusa (maintainer of QCA); R-devel ML, Nov.15, 2021
3270
## The "formula" case of Adrian Dusa (maintainer of QCA); R-devel ML, Nov.15, 2021
3271
quote(A + ~B + C ~ D) # no parens
3271
quote(A + ~B + C ~ D) # no parens
3272
## 'simple' binary op
3272
## 'simple' binary op
3273
quote(a$"b")
3273
quote(a$"b")
3274
## When cflow body is burried deeply through the right, don't rewrap
3274
## When cflow body is buried deeply through the right, don't rewrap
3275
## unnecessarily. There should be only one set of parentheses.
3275
## unnecessarily. There should be only one set of parentheses.
3276
## Cases where R-devel 81211 still gave unneeded parens:
3276
## Cases where R-devel 81211 still gave unneeded parens:
3277
quote(`^`(1 + if(L) 2, 3))
3277
quote(`^`(1 + if(L) 2, 3))
3278
quote(`*`(1 - if(L) 2 else 22, 3))
3278
quote(`*`(1 - if(L) 2 else 22, 3))
3279
quote(`^`(1 + repeat 2, 3))
3279
quote(`^`(1 + repeat 2, 3))