Displaying 20 results from an estimated 400 matches similar to: "cloning a graphics window"
2024 Sep 20
1
model.matrix() may be misleading for "lme" models
Dear r-devel list members,
I'm posting this message here because it concerns the nlme package,
which is maintained by R-core. The problem I'm about to describe is
somewhere between a bug and a feature request, and so I thought it a
good idea to ask here rather posting a bug report to the R bugzilla.
I was made aware (by Ben Bolker) that the car::Anova() method for "lme"
2024 Sep 21
1
model.matrix() may be misleading for "lme" models
Dear list members,
After further testing, I found that the following simplified version of
model.matrix.lme(), which omits passing xlev to the default method, is
more robust. The previous version generated spurious warnings in some
circumstances.
model.matrix.lme <- function(object, ...){
data <- object$data
if (is.null(data)){
NextMethod(formula(object),
2023 Jan 28
1
lines through points in lattice legend
On Sat, Jan 28, 2023 at 2:49 PM Kenneth Knoblauch
<ken.knoblauch at inserm.fr> wrote:
>
> Hi,
>
> I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key. Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping:
>
> library(lattice)
2023 Jan 28
2
lines through points in lattice legend
Hi,
I'm struggling to find if there is a simple way to make the lines and points overlap in a legend for a lattice plot using auto.key. ?Here is a toy example of what doesn't work (for me) as the lines and points are adjacent rather than overlapping:
library(lattice)
d <- data.frame(x = 1:2, y = 1:4, f = factor(letters[1:2]))
xyplot(y ~ x, d, groups = f, type = "b",?
pch =
2024 Jul 12
1
xftrm is more than 100x slower for AsIs than for character vectors
Good evening,
I recently have observed slow merges when combining multiple data frames
derived from DataFrame and base::data.frame. I observed that the index
column of intermediate tables was of class <AsIs> (automatically
converted from character). The problem occurred mainly when using the
sorted = T option in base::merge.
This can be traced to xtfrm.AsIs being more than 100 times slower
2023 Apr 08
1
Error message for infinite probability parameters in rbinom() and rmultinom()
Dear all,
Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability.
Maybe, a more precise message will be helpful when debugging.
> rmultinom(1, 3:5, c(1/2, 1/3, Inf))
Error in rmultinom(1, 3:5, c(1/2, 1/3, Inf)) : NA in probability vector
> rmultinom(1, 3:5, c(1/2, 1/3, NA))
Error in rmultinom(1,
2024 Feb 20
2
Tcl socket server (tcltk) does not work any more on R 4.3.2
Dear list,
It seems that something changed between R 4.2.3 and R 4.3 (tested with 4.3.2) that broke the Tcl socket server. Here is a reproducible example:
- R process #1 (Tcl socket server):
library(tcltk)
cmd <- r"(
proc accept {chan addr port} { ;# Make a proc to accept connections
puts "$addr:$port says [gets $chan]" ;# Receive a string
puts $chan goodbye
2023 Apr 08
1
Error message for infinite probability parameters in rbinom() and rmultinom()
>>>>> Christophe Dutang
>>>>> on Sat, 8 Apr 2023 14:21:53 +0200 writes:
> Dear all,
> Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability.
> Maybe, a more precise message will be helpful when debugging.
>> rmultinom(1, 3:5, c(1/2, 1/3,
2023 Apr 08
1
Error message for infinite probability parameters in rbinom() and rmultinom()
On 08/04/2023 5:53 p.m., Martin Maechler wrote:
>>>>>> Christophe Dutang
>>>>>> on Sat, 8 Apr 2023 14:21:53 +0200 writes:
>
> > Dear all,
>
> > Using rmultinom() in a stochastic model, I found this function returns an error message 'NA in probability' for an infinite probability.
>
> > Maybe, a more
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
tl;dr: R_CheckUserInterrupt() can be a performance bottleneck
within GUIs. This also affects functions in the 'stats'
package, which could be improved by changing the position
of calls to R_CheckUserInterrupt().
Dear all,
Recently I was puzzled because some code in a package under development,
which consisted almost entirely of a .Call() to a function written in
2024 Jun 09
2
head.ts, tail.ts loses time
Hello, All:
The 'head' and 'tail' functions strip the time from a 'ts' object.
Example:
> head(presidents)
[1] NA 87 82 75 63 50
> window(presidents, 1945, 1946.25)
Qtr1 Qtr2 Qtr3 Qtr4
1945 NA 87 82 75
1946 63 50
Below please find code for 'head.ts' and 'tail.ts' that matches
'window'.
Comments?
2024 Jun 10
1
head.ts, tail.ts loses time
zoo overcomes many of the limitations of ts:
library(zoo)
as.ts(head(as.zoo(presidents)))
## Qtr1 Qtr2 Qtr3 Qtr4
## 1945 NA 87 82 75
## 1946 63 50
xts also works here.
On Sun, Jun 9, 2024 at 12:04?PM Spencer Graves
<spencer.graves at prodsyse.com> wrote:
>
> Hello, All:
>
>
> The 'head' and 'tail' functions strip the time
2010 Mar 06
0
thin grid lines, again (FAQ 7.36), a proposal
Hi,
I'm raising the issue, again, of those pesky thin lines that show up
with a pdf graphics device, otherwise known as FAQ 7.36. I have read
the FAQ and understand that I can eliminate them by adjusting the
anti-aliasing
option for viewing them on the screen, but this doesn't necessarily
eliminate them for a print device or for transferring them into a powerpoint
or similar type of
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Gabor et al.:
Thanks for this. I should change my current application to use either
zoo or xts, as Gabor suggests.
However, I was surprised to learn that "[.ts" does NOT return an
object of class "ts". I see that "head.default" and "head.matrix" both
call "[", so "head" cannot return a ts object, because "["
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
A more generic solution would be for R to throttle calls to
R_CheckUserInterrupt(), because it makes no sense to check 1000 times
per second if a user has interrupted, but it is difficult for the
caller to know when R_CheckUserInterrupt() has been last called, or do
it regularly without over-doing it.
Here is a simple patch: https://github.com/r-devel/r-svn/pull/125
See also:
2009 Aug 20
0
Sweave truncation
Peter
Thank you for the information. I accidentally deleted Ken's post without
having read it.
Ken' s thought is great but as you said awful to implement
I thought that capture.output would come in handy some time when I first
saw it on an unrelated reply.
Just thought :- the latex listings package may have alternatives
If I remember correctly it has wrapping and other goodies but I
2024 Dec 17
1
R_CheckUserInterrupt() can be a performance bottleneck within GUIs
This seems like a great idea. Would it help to escalate this to a
post on R-bugzilla, so it is less likely to fall through the cracks?
On 12/17/24 09:51, Jeroen Ooms wrote:
> A more generic solution would be for R to throttle calls to
> R_CheckUserInterrupt(), because it makes no sense to check 1000 times
> per second if a user has interrupted, but it is difficult for the
> caller to
2024 Jul 18
1
Printing digits.secs on data.frame?
Is there a way to have printing data.frames with POSIXct to display
milliseconds if digits.secs is set as a default?
You can use the digits argument in print, such as print(df, digits = 3) to
get the intended output, but I assumed it was done with the option
digits.secs set. Tibbles by default do this printing, which is shown
below, but I was unsure if digits.secs should affect printing
2024 Jun 11
1
head.ts, tail.ts loses time
It isn't really clear that it can't work. This does work by inserting NA's.
library(zoo)
as.ts(as.zoo(lynx)[ c(1:3, 7) ] )
## Time Series:
## Start = 1821
## End = 1827
## Frequency = 1
## [1] 269 321 585 NA NA NA 3928
On Mon, Jun 10, 2024 at 10:32?AM Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>
> >>>>> Spencer Graves
2024 Jun 10
1
head.ts, tail.ts loses time
Hi, Martin et al.:
On 6/10/24 9:32 AM, Martin Maechler wrote:
>>>>>> Spencer Graves
>>>>>> on Mon, 10 Jun 2024 07:50:13 -0500 writes:
>
> > Hi, Gabor et al.: Thanks for this. I should change my
> > current application to use either zoo or xts, as Gabor
> > suggests.
>
>
> > However, I was