> On May 2, 2020, at 5:30 AM, Antoine Fabri wrote:
>
> Dear all,
>
> model.frame behaves in a way I don't expect when both its formula and
> subset argument are passed through a function call.
>
See the help page
?formula
in particular the section headed 'Environments'.
Then look at the
In the case of inherits (at least) this seems intended.
The help page says:
"If the object does not have a class attribute, it has an implicit class..."
which I take to mean that if an object does have a class attribute it does not
also have an implicit class.
The behavior you noted below
When `length( skewed.probs ) > 200' uniform samples are generated in R-devel.
R-3.5.1 behaves as expected.
`epsilon` can be a lot bigger than illustrated and still the uniform
distribution is produced.
Chuck
> set.seed(123)
>
> epsilon <- 1e-10
>
> ## uniform to 200 then small
> p200 <-
> On Aug 4, 2018, at 6:55 AM, David Hugh-Jones wrote:
>
> I'm not sure why this is happening:
>
> tmp <- data.frame(
> a = letters[1:2],
> b=c(TRUE, FALSE),
> stringsAsFactors = FALSE
> )
> idx <- matrix(c(1, 2, 2, 2), 2, byrow = TRUE)
> tmp[idx]
>
> [1] " TRUE" "FALSE"
>
>From
> On Jul 20, 2018, at 3:05 PM, Lenth, Russell V wrote:
>
> Dear R-Devel,
>
> I seem to no longer be able to access the bug-reporting system, so am doing
> this by e-mail.
>
> My report concerns models where variables are explicitly referenced (or is it
> "dereferenced"?), such as:
>
>
> On Jun 27, 2018, at 3:58 PM, Achim Zeileis wrote:
>
> On Thu, 28 Jun 2018, Therneau, Terry M., Ph.D. via R-devel wrote:
>
>> I now understand the issue, which leads to a different and deeper issue
>> which is "how to assign a proper length to Surv objects".
>>
>> > Surv(c(1,2,3),
> On Jun 8, 2018, at 2:15 PM, Hadley Wickham wrote:
>
> On Fri, Jun 8, 2018 at 2:09 PM, Berry, Charles wrote:
>>
>>
>>> On Jun 8, 2018, at 1:49 PM, Hadley Wickham wrote:
>>>
>>> Hmmm, yes, there must be some special case in the C code
> On Jun 8, 2018, at 1:49 PM, Hadley Wickham wrote:
>
> Hmmm, yes, there must be some special case in the C code to avoid
> recycling a length-1 logical vector:
Here is a version that (I think) handles Herve's issue of arrays having one or
more 0 dimensions.
subset_ROW <-
> On Jun 8, 2018, at 11:52 AM, Hadley Wickham wrote:
>
> On Fri, Jun 8, 2018 at 11:38 AM, Berry, Charles wrote:
>>
>>
>>> On Jun 8, 2018, at 10:37 AM, Hervé Pagès wrote:
>>>
>>> Also the TRUEs cause problems if some dimensions are 0:
>
1,length=10,by=100),TRUE))
and with
system.time(for (i in 1:1) subset_ROW4(arr,seq(1,length=10,by=100),FALSE))
Changing the dimensions to c(2^5, 2^7, 4, 4 ) and running something similar
also shows equal times.
Chuck
>> On Fri, Jun 8, 2018 at 10:16 AM, Berry, Ch
> On Jun 8, 2018, at 8:45 AM, Hadley Wickham wrote:
>
> Hi all,
>
> Is there a better to way to subset the ROWs (in the sense of NROW) of
> an vector, matrix, data frame or array than this?
You can use TRUE to fill the subscripts for dimensions 2:nd
>
> subset_ROW <- function(x, i) {
>
> On May 31, 2018, at 8:25 AM, Jason Serviss wrote:
>
> Hello all,
>
> I am trying to get a better understanding of the underlying code for the
> stats::dpois function in R and, specifically, what happens under the hood
> when it is called. I finally managed to track down the C course at:
I would have expected coercion to an integer vector or at least a complaint
that the user did not provide a valid matrix dimension.
> .col(c(1,1))
Error in .col(c(1, 1)) :
a matrix-like object is required as argument to 'col'
> .col(c(1L,1L))
[,1]
[1,]1
> sessionInfo()
R version
> On May 1, 2018, at 1:15 PM, Martin Maechler
> wrote:
>
> What version of R is that ?
Sorry. It was 3.4.2. But it doesn't matter, because my diagnosis was wrong even
there. I think (based on my reading of my outdated version) the problem is a
bit upstream in
Unfortunately, I spoke too soon.
model.frame calls formula <- terms(formula, data = data) if formula does not
inherit from class "terms" as in your case.
And that is where the bad terms.labels attribute comes from.
So, the fix I suggested won't work.
But maybe you can just supply a terms
> On May 1, 2018, at 6:11 AM, Therneau, Terry M., Ph.D. via R-devel
> wrote:
>
> A user sent me an example where coxph fails, and the root of the failure is a
> case where names(mf) is not equal to the term.labels attribute of the formula
> -- the latter has an
> On Mar 16, 2018, at 9:19 AM, Serguei Sokol wrote:
>
> Le 16/03/2018 à 17:10, David Hugh-Jones a écrit :
>> Hi all,
>>
>> I expect I'm getting something wrong, but
>>
>> cat("foo bar baz foo bar baz foo bar baz", fill = 10)
>>
>> should be broken into lines of width
> On Jan 4, 2018, at 1:44 PM, Ben Bolker wrote:
>
> Chuck: I don't see how this example represents
> incomplete/incommensurate recycling.
It doesn't. I took your subject line to be the theme of your posting and
`incommensurate lengths' to be an instance used to emphasize
> On Jan 4, 2018, at 11:56 AM, Ben Bolker wrote:
>
>
> Sorry if this has been covered here somewhere in the past, but ...
>
> Does anyone know why logical vectors are *silently* recycled, even
> when they are incommensurate lengths, when doing logical indexing?
It is
19 matches
Mail list logo