the best,
Adrian
On Fri, 3 Dec 2021 at 21:42, Fox, John wrote:
> Dear Adrian,
>
> Here's my slightly modified version of your function, which serves my
> purpose:
>
> --- snip ---
>
> tryCatchWEM <- function (expr, cap
= "output"){
toreturn$output <- capture.output(output$value)
} else if (capture == "value"){
toreturn$value <- output$value
}
. . .
Best,
John
On 2021-12-03, 1:56 PM, "R-devel on behalf of Adrian Dușa"
wrote:
On Fri, 3 D
https://stat.ethz.ch/pipermail/r-help/2010-December/262626.html
[3] https://stat.ethz.ch/pipermail/r-help/2004-June/052092.html
[4] https://stat.ethz.ch/pipermail/r-help/2004-June/052132.html
[5] https://CRAN.R-project.org/package=simsalapar
Hope this helps,
Rui Barradas
À
> $ :List of 2
> ..$ message: chr "warning 2"
> ..$ call : language foo()
> ..- attr(*, "class")= chr [1:3] "simpleWarning" "warning" "condition"
>
> Cheers,
> Simon
>
>
>
Dear R-devel list members,
Is it possible to capture more than one warning message using tryCatch()? The
answer may be in ?conditions, but, if it is, I can't locate it.
For example, in the following only the first warning message is captured and
reported:
> foo <- function(){
+ warning("warn
: 6
>>
>>
>> I don't know whether this is a red herring or not, but the
>> Console fails to boot.
>>
>> John does it work for you?
>>
>> Not sure whether Python has the same trouble. Kind of old info at
>> https://www.python.org/dow
Dear Wayne and Peter,
FWIW, I observe exactly the same problem in Catalina. The error and my session
info:
snip
> tkimage.create("photo", file = fname)
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
[tcl] encountered an unsupported criticial chunk ty
Dear Peter,
Thank you very much for this.
To clarify slightly, the bug affects not just the Rcmdr package but use of the
tcltk package on Windows more generally.
Best,
John
-
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web:
Dear Jeroen,
With the caveat that I've tested only a few of the Rcmdr dialogs (a full test
takes hours and must be done manually), everything seems to be working fine
again.
Thank you for addressing this problem so quickly.
John
-
John Fox, Professor Emeritus
Hi,
Does it make sense to withdraw the Windows R 4.0.1 binary until the issue is
resolved?
Best,
John
> -Original Message-
> From: luke-tier...@uiowa.edu
> Sent: Sunday, June 7, 2020 11:54 AM
> To: peter dalgaard
> Cc: Jeroen Ooms ; Fox, John ; r-
> de...@r-pro
> On Jun 7, 2020, at 10:00 AM, Jeroen Ooms wrote:
>
> On Sun, Jun 7, 2020 at 3:13 AM Fox, John wrote:
>>
>> Hi,
>>
>> The following code, from the examples in ?TkWidgets , immediately crashes R
>> 4.0.1 for Windows:
>>
>>
0.1 CRAN package yet, and no nightly build of 4.0.1 Patched,
>> but the only thing changed in the sources since r78644 is the VERSION file.)
>>
>> -pd
>>
>>> On 7 Jun 2020, at 03:13 , Fox, John wrote:
>>>
>>> Hi,
>>>
>>> The follo
Hi,
The following code, from the examples in ?TkWidgets , immediately crashes R
4.0.1 for Windows:
- snip
library("tcltk")
tt <- tktoplevel()
label.widget <- tklabel(tt, text = "Hello, World!")
button.widget <- tkbutton(tt, text = "Push",
comman
plan to pursue that possibility.
Best,
John
> On May 4, 2020, at 3:01 AM, Jeroen Ooms wrote:
>
> On Sun, May 3, 2020 at 6:15 PM Fox, John wrote:
>>
>> Dear R-devel list members,
>>
>> The Tktable package for Tcl/Tk is apparently missing from the Windows
>&g
Dear R-devel list members,
The Tktable package for Tcl/Tk is apparently missing from the Windows
distribution of R 4.0.0. I (actually a user of the Rcmdr package) discovered
this when trying to use the new-data-set dialog in the Rcmdr package, producing
the error, "Tcl package 'Tktable' must be
gt; On Sep 17, 2019, at 8:29 AM, Fox, John wrote:
>
> Dear Herve,
>
> The brief() generic function in the car package does something very similar
> to that for data frames (and has methods for other classes of objects as
> well).
>
> Best,
> John
>
> -
Dear Herve,
The brief() generic function in the car package does something very similar to
that for data frames (and has methods for other classes of objects as well).
Best,
John
-
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
ntrasts can be applied only to factors with 2 or more levels
>> coef(lm(data=d, Weight ~ Age + factor(Diseased, levels=c(FALSE,TRUE)),
> subset=Age<7))
> Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
> contrasts can be applied only to factors with 2 or mor
Dear Abby,
> On Aug 30, 2019, at 8:20 PM, Abby Spurdle wrote:
>
>> I think that it would be better to handle factors, character predictors, and
>> logical predictors consistently.
>
> "logical predictors" can be regarded as categorical or continuous (i.e. 0 or
> 1).
> And the model matrix sho
Dear R-devel list members,
I've discovered an inconsistency in how lm() and similar functions handle
logical predictors as opposed to factor or character predictors. An "lm" object
for a model that includes factor or character predictors includes the levels of
a factor or unique values of a cha
Dear Iago,
The R S3 object system works as expected here, using the first available method
processing the class vector from left to right. The problem is that the broom
package doesn't export the confint.geeglm() method but rather reserves it for
internal use. I can't think why the package auth
Dear all,
I agree with both Russ and Terry that the significance stars option should
default to FALSE. Here's what Sandy Weisberg and I say about significance
starts in the current edition of the R Companion to Applied Regression:
'If you find the “statistical-significance” asterisks th
to its quoted name) can be an element of the contrasts.arg list.
Best,
John
> -Original Message-
> From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
> Sent: Friday, February 22, 2019 11:50 AM
> To: Ben Bolker
> Cc: Fox, John ; r-devel@r-project.org
> Subje
Dear Thomas,
it is, unfortunately, not that simple. t.test() returns an object of class
"htest" and not all such objects have standard errors. I'm not entirely sure
what the point is since it's easy to compute the standard error of the
difference from the information in the object (adapting an
Dear Ben,
Perhaps I'm missing the point, but contrasts.arg is documented to be a list.
From ?model.matrix: "contrasts.arg: A list, whose entries are values (numeric
matrices or character strings naming functions) to be used as replacement
values for the contrasts replacement function and whose
Dear Martin,
Since no one else has picked up on this, I’ll take a crack at it:
The proposal is to define the S3 class of model-frame objects as
c(“model.frame”, “data.frame”) (not the formal class of these objects, even
though this feature was coincidentally introduced in S4). That’s unlikely
Dear R-devel list members,
This is an observation about how logical variables in models are handled,
followed by questions.
As a general matter, character variables and logical variables are treated as
if they were factors when they appear on the RHS of a model formula; for
example:
- - - - s
my opinion.
Best,
John
>
> regards,
>
> Heinz
>
> ### trivial example
> plotwithline <- function(x, y) {
>plot(x, y)
>abline(lm(y~x)) ## data argument?
> }
>
> set.seed(25)
> df0 <- data.frame(x=rnorm(20), y=rnorm(20))
>
> plotwithli
Dear Steve,
Since this relates as well to the message I posted a couple of minutes before
yours, I agree that it’s possible to phrase “best practices” too categorically.
In the current case, I believe that it’s reasonable to say that specifying the
data argument is “generally” or “usually” the
Dear Martin,
I think that everyone agrees that it’s generally preferable to use the data
argument to lm() and I have nothing significant to add to the substance of the
discussion, but I think that it’s a mistake not to add to the current examples,
for the following reasons:
(1) Relegating exam
- coef() vs coef()
>
> >>>>> Martin Maechler
> >>>>> on Thu, 2 Nov 2017 21:59:00 +0100 writes:
>
> >>>>> Fox, John
> >>>>> on Thu, 14 Sep 2017 13:46:44 + writes:
>
> >> Dear Martin, I m
Dear Martin,
Thank you for taking care of this.
Best,
John
> -Original Message-
> From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
> Sent: Thursday, November 2, 2017 4:59 PM
> To: Fox, John
> Cc: Martin Maechler ; Therneau, Terry M.,
> Ph.D. ; r-devel@r-pro
> -Original Message-
> From: Therneau, Terry M., Ph.D. [mailto:thern...@mayo.edu]
> Sent: Thursday, September 14, 2017 8:41 AM
> To: Martin Maechler
> Cc: Fox, John ; Therneau, Terry M., Ph.D.
> ; r-devel@r-project.org
> Subject: Re: [Rd] vcov and survival
>
>
> Sent: Thursday, September 14, 2017 4:23 AM
> To: Martin Maechler
> Cc: Fox, John ; Therneau, Terry M., Ph.D.
> ; r-devel@r-project.org
> Subject: Re: [Rd] vcov and survival
>
> >>>>> Martin Maechler
> >>>>> on Thu, 14 Sep 2017 10:13:02 +020
Dear Terry,
Even the behaviour of lm() and glm() isn't entirely consistent. In both cases,
singularity results in NA coefficients by default, and these are reported in
the model summary and coefficient vector, but not in the coefficient covariance
matrix:
> mod.lm <-
Dear Nick,
On 2017-05-05, 9:40 AM, "R-devel on behalf of Nick Brown"
wrote:
>>I conjecture that something in the vicinity of
>> res <- lm(DEPRESSION ~ scale(ZMEAN_PA) + scale(ZDIVERSITY_PA) +
>>scale(ZMEAN_PA * ZDIVERSITY_PA), data=dat)
>>summary(res)
>> would reproduce the SPSS Beta values.
>
ssion info:
- snip -
> Sys.info()
sysname release version nodename
"Windows" "10 x64""build 14393" "JOHN-CARBON-X1"
machinelogin user effectiv
Dear Kevin,
As others have mentioned, it's my sense that this kind of error has become more
frequent -- at least I see students who encounter these errors more frequently.
I agree that a less cryptic error message might help.
Best,
John
--
John Fox, Professo
Dear Spencer,
I don't think that the problem of "converting a data frame into a model matrix"
is well-defined, because there isn't a unique mapping from one to the other.
In your example, you build the model matrix for the additive formula ~ a + b
from the data frame matrix containing a and b
39 matches
Mail list logo