ll 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, capture = TRU
ot;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 Dec 20
://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
À
f 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(){
+
;>
>> 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/download/mac/tcltk/
>>
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
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
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:
>>
>> -
ightly 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 following code, from the examples i
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",
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
Dear Paul,
Here's some information that I prepared for translators of the Rcmdr package,
slightly edited to make it more generic. Perhaps you'll find it useful:
R provides a general facility for translating messages from English to other
languages using the GNU gettext translation tools
Hi Dirk,
> On Oct 3, 2019, at 10:20 AM, Dirk Eddelbuettel wrote:
>
>
> Hi John,
>
> On 3 October 2019 at 13:56, Fox, John wrote:
> | > On Oct 3, 2019, at 9:11 AM, Dirk Eddelbuettel wrote:
> | > On 3 October 2019 at 10:10, Driver, Charles wrote:
> | &
Dear Dirk,
> On Oct 3, 2019, at 9:11 AM, Dirk Eddelbuettel wrote:
>
>
> Charles,
>
> On 3 October 2019 at 10:10, Driver, Charles wrote:
> | I have a function that outputs / compiles some latex. To do this I use
> Sys.which('pdflatex') and if nothing is found, prompt the user whether to
>
x
> 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
n 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 more levels
&
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
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
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
Dear list members,
I noticed that there's a name clash between errorCondition() in the Rcmdr
package and the new function by the same name in the base package in R 3.6.0.
errorCondition() has been in the Rcmdr package for many years and is used
extensively -- literally dozens of times. It's
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
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
> Subject: Re: [Rd] mo
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:
- - - -
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
eorgi Boshnakov
>
>
> -Original Message-
> From: R-package-devel [mailto:r-package-devel-boun...@r-project.org] On
> Behalf Of Fox, John
> Sent: 20 November 2018 01:16
> To: Hadley Wickham
> Cc: R Package Development
> Subject: Re: [R-pkg-devel] creating a link
of
queries in a web search but no solution.
Thanks for this,
John
> -Original Message-
> From: Hadley Wickham [mailto:h.wick...@gmail.com]
> Sent: Monday, November 19, 2018 6:21 PM
> To: Fox, John
> Cc: R Package Development
> Subject: Re: [R-pkg-devel] creating a
Dear r-package-devel list members,
I'd like to create a link to a package vignette from a help file in the same
package, for example to the "partial-residuals" vignette in the effects package
from effect.Rd. I'm able to generate a URL for the vignette as follows:
Hi John,
It's possible that I didn’t follow what you did, but it appears as if you call
globalVariables() *inside* the function. Instead try to do as Richard Heiberger
suggested and place the call outside of the function, e.g., in a source file in
the package R directory named globals.R. (Of
Dear Michael,
You could add a call to globalVariables() in the package sources for cases like
this.
I hope this helps,
John
-
John Fox
Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web:
complete=TRUE) etc -- coef() vs coef()
>
> >>>>> Martin Maechler <maech...@stat.math.ethz.ch>
> >>>>> on Thu, 2 Nov 2017 21:59:00 +0100 writes:
>
> >>>>> Fox, John <j...@mcmaster.ca>
> >>>>> on Thu, 1
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 <j...@mcmaster.ca>
> Cc: Martin Maechler <maech...@stat.math.e
age-
> From: Therneau, Terry M., Ph.D. [mailto:thern...@mayo.edu]
> Sent: Thursday, September 14, 2017 8:41 AM
> To: Martin Maechler <maech...@stat.math.ethz.ch>
> Cc: Fox, John <j...@mcmaster.ca>; Therneau, Terry M., Ph.D.
> <thern...@mayo.edu>; r-devel@r-
tember 14, 2017 4:23 AM
> To: Martin Maechler <maech...@stat.math.ethz.ch>
> Cc: Fox, John <j...@mcmaster.ca>; Therneau, Terry M., Ph.D.
> <thern...@mayo.edu>; r-devel@r-project.org
> Subject: Re: [Rd] vcov and survival
>
> >>>>> Martin Maechler <ma
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 David,
No one at CRAN has responded yet, so I'll take a stab at it.
First, you're right about the resonance of "huxtable" for North Americans, and
if the package were mine, I'd be slightly embarrassed about the name.
CRAN generally will not allow you to rename a package, for several
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),
Dear Paul,
Isn't this really a question for r-help rather than r-package-devel?
In any event, I think that your message is based on (an entirely
understandable) misunderstanding of what the : operator on the right-hand side
of a model formula does. The : operator is equivalent to %in%, and
Dear Martin,
Thanks for following up on this.
Best,
John
> -Original Message-
> From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
> Sent: March 27, 2017 9:26 AM
> To: Fox, John <j...@mcmaster.ca>
> Cc: Martin Maechler <maech...@stat.math.eth
:
- snip -
> Sys.info()
sysname release version nodename
"Windows" "10 x64""build 14393" "JOHN-CARBON-X1"
machinelogin user effective_user
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,
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
Dear list members,
I've noticed that citation(package="pkg") generates both a text citation and a
BiBTeX entry when the CITATION file contains a single call to bibentry() or
citEntry(), but that only text citations are shown if there are multiple calls
to bibentry() or citEntry().
Is this
52 matches
Mail list logo