"ANY", "list"))
Method Definition:
function (from, to, strict = TRUE)
{
value <- as.list(from)
if (strict)
attributes(value) <- NULL
value
}
Signatures:
from to
target "ANY" "lis
On 4/25/24 07:04, Kurt Hornik wrote:
...
> Sure, I'll look into adding something. (Too late for 4.4.0, of course.)
>
> Best
> -k
Great. Thanks!
H.
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTM
On 4/24/24 23:07, Kurt Hornik wrote:
>>>>>> Hervé Pagès writes:
>> Hi Kurt,
>> Is it intended that numeric_version() returns an error by default on
>> non-character input in R 4.4.0?
> Dear Herve, yes, that's the intention.
>
>> It
peof(x))
>>> if(tolower(Sys.getenv("_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_"))
>>> != "false")
>>> stop(msg, domain = NA)
>>> else
>>> warning(msg, domain = NA, immediate. = TRUE)
>>>
>>> If you use bugzilla before and have a handle, maybe file a bug report with
>>> this as patch athttps://bugs.r-project.org/
>>>
>>> Dirk
>>>
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
S4 generic?) Is
> >> there any hidden state I may be breaking for the rest of the test this
> >> way?
> >> The test does pass like this, so this may be worrying about nothing.
>
> > Indeed, this coul
] stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocGenerics_0.49.1
loaded via a namespace (and not attached):
[1] compiler_4.4.0
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
that you have a
> function object in your function which can't be called
> unconditionally. The workaround doesn't create such an object.
>
> Recognizing that your function never tries to call fun requires global
> inspection of toto(), and most of the checks are based on local
> inspection.
>
> Duncan Murdoch
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
):
toto <- function(mode)
{
if (mode == 1)
fun <- function(a, b) a*b
else
fun <- function(u, v, w) (u + v) / w
fun
}
Is that NOTE really intended? Hard to see why this code would be
considered "wrong".
I know it's just a NOTE but still...
e is a better
> solution, the `menu[select]` seems to allocate more memory than
> `menu_env = list2env(menu); mget(select, envir = menu, ifnotfound =
> list(NULL)`. Or the sapply solution. Is this a benchmarking artifact?
>
> https://stackoverflow.com/q/77828678/4868692
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
I see. We'll update soon. Thanks Martin.
On 11/4/23 06:52, Martin Maechler wrote:
>>>>>> Hervé Pagès
>>>>>> on Fri, 3 Nov 2023 15:10:40 -0700 writes:
> > Hi list,
>
> > Here is an example:
>
> > hpages@XPS15
gnature
‘object="CoreSet"’: arguments (‘verbose’) after ‘...’ in the generic
must appear in the method, in the same place at the end of the argument list
Error: package or namespace load failed for ‘CoreGx’:
unable to load R code in package ‘CoreGx’
Best,
H.
On 11/3/23 15:10, Herv
prettyunits_1.2.0 tools_4.4.0 crayon_1.5.2
[9] desc_1.4.2 callr_3.7.3 pkgbuild_1.4.2 ps_1.7.5
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
on of R-devel!}
> modified the behavior of `dim<-` somewhat
> such it does *not* unnecessarily drop dimnames,
> e.g., in your `dim(x) <- dim(x)` case above,
> one could really argue that it's a "true loss" if x loses
> dimnames "unnecessarily" ...
>
>
uot;CsparseMatrix" or
> "TsparseMatrix" or "dMatrix", "symmetricMatrix".
>
> In the case of as(, "dgTMatrix") , if you
> replace "dgTMatrix" by "TsparseMatrix"
> the result will be the same but also work in the future when the
&
On 9/25/23 07:05, Martin Maechler wrote:
>>>>>> Hervé Pagès
>>>>>> on Sat, 23 Sep 2023 16:52:21 -0700 writes:
> > Hi Martin,
> > On 9/23/23 06:43, Martin Maechler wrote:
> >>>>>>> Hervé Pagès
> &g
Hi Martin,
On 9/23/23 06:43, Martin Maechler wrote:
>>>>>> Hervé Pagès
>>>>>> on Fri, 22 Sep 2023 16:55:05 -0700 writes:
> > The problem is that you have things that are
> > **semantically** different but look exactly the sa
On 9/22/23 16:55, Hervé Pagès wrote:
> The problem is that you have things that are **semantically**
> different but look exactly the same:
>
> They look the same:
>
> > x
> [1] NA
> > y
> [1] NA
> > z
> [1] NA
>
> > is.na(x)
> [1] TRUE
>
should never be
> expecting identical() to treat different types as the same (e.g.
> identical(NA, NA_real_) is FALSE, as it should be). If you are using
> a different test, that's user error.
>
> Duncan Murdoch
>
> On 22/09/2023 2:41 p.m., Hervé Pagès wrote:
>&
e NA in the sense of is.na(.), but their
> Re() and Im() are not all NA:
>
>showC <- function(z) noquote(sprintf("(R = %g, I = %g)", Re(z), Im(z)))
>z <- complex(, c(11, NA, NA), c(NA, 99, NA))
>z
>showC(z)
>
> gives
>
>> z
>[1] NA NA NA
>> showC(z)
&
On 9/11/23 22:39, Prof Brian Ripley wrote:
> On 09/09/2023 01:56, Hervé Pagès wrote:
>> Hi Martin,
>>
>> Sounds good. Are there any plans to support the xz compression for
>> package source tarballs?
>
> What makes you think it is not supported?
I guess becaus
daily/?C=M;O=D
>
>
> Best,
> Martin
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
[[alternative HTML version deleted]]
ride anything so should not disrupt anything.
H.
On 6/15/23 13:51, Hervé Pagès wrote:
>
> I'd argue that at the root of the problem is that your qr.X() generic
> dispatches on all its arguments, including the 'ncol' argument which I
> think the dispatch mechanism needs to e
r.X)[["ncol"]]
>>>> if (complete) nrow(R) else min(dim(R))
>>>>
>>>> where 'R' must be defined in the body of any method that might
>>>> evaluate
>>>> 'ncol'.
>>>>
>>>
>>> Perhaps I am misunderstanding something, but I think Mikael
_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Los_Angeles
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.0 codetools_0.2-19
-
an error. The help is not explicit what should
happen when the length "of the first ... argument" is zero, but the
above behavior effectively does something like:
answer <- list()
first <- "A"
names(answer) <- first[seq_along(answer)]
answer
named list()
em don't set this env var
manually, either.
Gabor
[...]
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
__
R-devel@
On 10/09/2021 12:53, brodie gaslam wrote:
On Friday, September 10, 2021, 03:13:54 PM EDT, Hervé Pagès
wrote:
Good catch, thanks!
Replacing
if(ISNAN(vi) || (tmp = (int) vi) < 0 || tmp > 255) {
tmp = 0;
warn |= WARN_RAW;
}
pa[i] = (Rbyt
On 10/09/2021 09:12, Duncan Murdoch wrote:
On 10/09/2021 11:29 a.m., Hervé Pagès wrote:
Hi,
The first warning below is unexpected and confusing:
> as.raw(c(3e9, 5.1))
[1] 00 05
Warning messages:
1: NAs introduced by coercion to integer range
2: out-of-range val
Thanks Martin!
Best,
H.
On 10/09/2021 02:24, Martin Maechler wrote:
Hervé Pagès
on Thu, 9 Sep 2021 17:54:06 -0700 writes:
> Hi,
> I just stumbled across these 2 lines in RealFromComplex (lines 208 & 209
> in src/main/coerce.c):
> double
oblem and its
code can be fixed in a similar manner:
> as.raw(c("3e9", 5.1))
[1] 00 05
Warning messages:
1: NAs introduced by coercion to integer range
2: out-of-range values treated as 0 in coercion to raw
Cheers,
H.
--
Hervé Pagès
Bioconductor Core Team
hpage
able to ignore them). In any case they should
probably be removed.
Cheers,
H.
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
--
Hervé Pagès
Bioconductor Core Team
hpages.on.git...@gmail.com
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Excellent! Thanks Martin.
H.
On 5/28/20 00:39, Martin Maechler wrote:
Martin Maechler
on Wed, 27 May 2020 13:35:44 +0200 writes:
Hervé Pagès
on Tue, 26 May 2020 12:38:13 -0700 writes:
>> Hi Martin, On 5/26/20 06:24, Martin Maechler wrote: ...
>>>
> Anyway discussing recycling schemes is interesting but not directly
> related with what the OP brought up (behavior of the 'collapse'
operation).
> Cheers,
> H.
>>
>> ~G
--
Hervé Pagès
Program in Computational Biology
Di
On 5/24/20 00:26, Gabriel Becker wrote:
On Sat, May 23, 2020 at 9:59 PM Hervé Pagès <mailto:hpa...@fredhutch.org>> wrote:
On 5/23/20 17:45, Gabriel Becker wrote:
> Maybe my intuition is just
> different but when I collapse multiple character vectors together,
On 5/23/20 17:45, Gabriel Becker wrote:
Maybe my intuition is just
different but when I collapse multiple character vectors together, I
expect all the characters from each of those vectors to be in the
resulting collapsed one.
Yes I'd expect that too. But the **collapse** operation in paste()
On 5/22/20 18:12, brodie gaslam wrote:
FWIW what convinces me is consistency with other aggregating functions applied
to zero length inputs:
sum(numeric(0))
## [1] 0
Right.
And 1 is the identity element of multiplication:
> prod(numeric(0))
[1] 1
And the empty string is the identity elemen
Software
wdunlap tibco.com
<https://urldefense.proofpoint.com/v2/url?u=http-3A__tibco.com&d=DwMFaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=Z1o-HO3_OqxOR9LaRguGvnG7X4vF_z1_q13I7zmjcfY&s=7ZT1IjmexPqsDBhrV3NspPTr8M8
t always had.
That's all there is to it.
H.
On 5/22/20 03:00, Gabriel Becker wrote:
Hi Martin et al,
On Thu, May 21, 2020 at 9:42 AM Martin Maechler
mailto:maech...@stat.math.ethz.ch>> wrote:
>>>>> Hervé Pagès
>>>>> on Fri, 15 May 2020 13
ually be incompatible and paste should throw an error if
recycle0 were TRUE and collapse were declared in the same call. I don't
think the value of recycle0 should be silently ignored if it is actively
specified.
~G
On Fri, May 15, 2020 at 11:05 AM Hervé Pagès <mailto:hpa...@fredhutch
rU9CCUEItSDI96zc0&s=xN84DhkZeoxzn6SG0QTMpOGg2w_ThmjZmZymGUuD0Uw&e=
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&a
Thanks for the fix.
H.
On 5/12/20 23:29, Tomas Kalibera wrote:
Thanks, fixed.
Tomas
On 5/13/20 5:14 AM, Dirk Eddelbuettel wrote:
On 12 May 2020 at 19:59, Hervé Pagès wrote:
| While reading about the new 'recycle0' argument of paste/paste0, I
| spotted a mysterious "cd"
ot
‘NULL’) should lead to the zero-length ‘character(0)’.
cd
^^
This is in R 4.0.0 Patched and R devel.
Cheers,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.
e.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwIFaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=zMjaTujju0afmK5eIVPZrNajypj8QjuNbSyoAv93ISk&s=vUQZdkVyqq3iT9HukcKqEjg80sI-OZoKuy9DKiufquw&e=
--
Hervé Pagès
Progr
5dXWo2qb7mQwONaCxYeeWgKwycd3y89JoqY-oY&s=ABvG3sGKR5ln27FVCM8dlmZ82X93ZCTigbMxHeBEb6E&e=
[[alternative HTML version deleted]]
______
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
On 3/27/20 15:19, Hadley Wickham wrote:
On Fri, Mar 27, 2020 at 4:01 PM Hervé Pagès <mailto:hpa...@fredhutch.org>> wrote:
On 3/27/20 12:00, Hadley Wickham wrote:
>
>
> On Fri, Mar 27, 2020 at 10:39 AM Hervé Pagès
mailto:hpa...@fredhutch.org&g
On 3/27/20 12:00, Hadley Wickham wrote:
On Fri, Mar 27, 2020 at 10:39 AM Hervé Pagès <mailto:hpa...@fredhutch.org>> wrote:
Hi Tomas,
On 3/27/20 07:01, Tomas Kalibera wrote:
> they provide an over-approximation
They can also provide an "under-approxima
that case:
setRefClass("A", fields=c(stuff="ANY"))
object.size(new("A", stuff=raw(0))) # 680 bytes
object.size(new("A", stuff=runif(1e8))) # 680 bytes
Why wouldn't object.size() look at the content of environments?
Thanks,
H.
--
Hervé Pag
Excellent. Thank you! H.
On 3/20/20 23:55, Tomas Kalibera wrote:
On 3/18/20 6:11 PM, Hervé Pagès wrote:
Thanks Tomas. Any chance the old version of the error message could be
restored? It would definitely be more helpful than the current one.
It's confusing to get an error and be to
17/20 8:18 PM, Hervé Pagès wrote:
Using --with-pcre1 to configure the latest R 4.0 (revision 77988) on
an Ubuntu 14.04.5 LTS system gives me the following error:
...
checking if lzma version >= 5.0.3... yes
checking for pcre2-config... no
checking for pcre_fullinfo in -lpcre... yes
checking pcr
eaders are required, or use --with-pcre1
Maybe the real problem is that the PCRE version on this OS is 8.31?
The error message is not particularly helpful.
Thanks,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fa
_
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwIDaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=ByODf3XxvkT0Ag-YiS72sOZMg3b9vKH-pDRcZARaGWQ&s=z5huvy_ZadTqpmI
m/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=C3VCGF44o7jATPOlC8aZhaT4YGU1JtcOixJKZgu6KyI&s=FeZWU9uN-HwDNkSBOmbYXiGqu8q8-U6DI-ddyUn7HHw&e=
--
Hervé Pagès
Prog
<- array(NA, 2:0)
typeof(a2)
# [1] "logical"
a2
# <2 x 1 x 0 array of logical>
# [,1]
# [1,]
# [2,]
Thanks,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N,
Hi Martin,
On 09/26/2018 12:41 AM, Martin Maechler wrote:
Hervé Pagès
on Tue, 25 Sep 2018 23:27:19 -0700 writes:
> Hi, Unlike on an atomic matrix, as.vector() doesn't drop
> the "dim" attribute of matrix or array of type "list":
m <- ma
[,3]
# [1,] NULL NULL NULL
# [2,] NULL NULL NULL
is.vector(as.vector(m))
# [1] FALSE
Thanks,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail
nC_hDq80BUkAUKNwcowN5W1k&s=WOx4NyeYmWxpDG3tBRQ9-_Y3_7YAlKUKOP6gZLs0BrQ&e=
__
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q
Thanks!
On 09/01/2018 05:42 AM, Kurt Hornik wrote:
Hervé Pagès writes:
Thanks: fixed in the trunk with c75223.
Best
-k
Hi,
The following error message misspells the name of
the 'dim' argument:
array(integer(0), dim=integer(0))
Error in array(integer(0), dim =
rgs(array)
function (data = NA, dim = length(data), dimnames = NULL)
NULL
Cheers,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpa...@fre
On 08/25/2018 04:33 PM, Duncan Murdoch wrote:
On 25/08/2018 4:49 PM, Hervé Pagès wrote:
The choice of the L suffix in R to mean "R integer type", which
is mapped to the "int" type at the C level, and NOT to the "long int"
type, is really unfortunate as it seems to
On 08/25/2018 02:23 PM, Dirk Eddelbuettel wrote:
On 25 August 2018 at 13:49, Hervé Pagès wrote:
| The choice of the L suffix in R to mean "R integer type", which
| is mapped to the "int" type at the C level, and NOT to the "long int"
| type, is really unfortunat
integers ...
(It is all murky because the size is an implementation detail and later
"essentially everybody" moved to 32 bit integers and 64 bit longs as the 64
bit architectures became prevalent. Which is why when it matters one should
really use more explicit types like int32_t
On 08/16/2018 11:30 AM, Prof Brian Ripley wrote:
On 16/08/2018 18:33, Hervé Pagès wrote:
...
Only on Intel platforms int is 32 bits. Strictly speaking int is only
required to be >= 16 bits. Who knows what the size of an int is on
the Sunway TaihuLight for example ;-)
R's configur
y supported inside
data.table. We use it for 64-bit integers as nanosecond timestamps in our
nanotime package (which has some converters).
Dirk
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwIFAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=ERck0y30d00Np6hqTNYfjusx1beZim0OrKe9O
domain), ...) :
arguments cannot be recycled to the same length
> unique(matrix(1:10, ncol=2), MARGIN=3)
Error in unique.matrix(matrix(1:10, ncol = 2), MARGIN = 3) :
c("MARGIN = 3 is invalid for dim = 5", "MARGIN = 3 is invalid for
dim = 2")
Thanks,
H.
--
Hervé Pa
24.2µs
(note the units)
That's a good one. Need to change this in S4Vectors::default_extractROWS()
and other places. Thanks!
H.
Hadley
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P
mean max
#>
#> 1 arr[i, TRUE, TRUE, TRUE] 41.8ms 43.6ms 46.5ms
#> 2 arr[i, , , ] 41.7ms 43.1ms 46.3ms
On Fri, Jun 8, 2018 at 12:31 PM, Berry, Charles wrote:
On Jun 8, 2018, at 11:52 AM, Hadley Wickham wrote:
On Fri, Jun 8, 201
y 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:
> matrix(raw(0), nrow=5, ncol=0)[1:3 , TRUE]
Error in matrix(raw(0), nrow = 5, ncol = 0)[1:3, TRUE] :
] 2 3 4
subset_ROW(data.frame(x = 1:10, y = 10:1), 2:4)
#> x y
#> 2 2 9
#> 3 3 8
#> 4 4 7
HTH,
Chuck
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Sea
On 06/08/2018 10:32 AM, Hervé Pagès wrote:
On 06/08/2018 10:15 AM, Michael Lawrence wrote:
There probably should be an abstraction for this. In S4Vectors, we
have extractROWS().
FWIW the code in S4Vectors that does what your subset_ROW() does is:
https://urldefense.proofpoint.com/v2/url?u
_stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=MF0DzYDiaYtcFXIyQwpQKs9lVbLNvdBBUubTv7BVAfM&s=HsEbNAT5IElAUS-W2VVSeJs4tfQc77heV7BbQxru518&e=
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hut
On 05/16/2018 01:24 PM, Michael Lawrence wrote:
On Wed, May 16, 2018 at 12:23 PM, Hervé Pagès wrote:
On 05/16/2018 10:22 AM, Michael Lawrence wrote:
Factors and data.frames are not structures, because they must have a
class attribute. Just call them "objects". They are higher
tor", "factor"))
is(data.frame(), "vector")
# [1] FALSE
is(data.frame(), "factor")
# [1] FALSE
is(data.frame(), "vector_OR_factor")
# [1] TRUE
etc...
Many people stay away from S4 because of these incomprehensible
behaviors.
Finally note
SE
is(x, "vector")
# [1] TRUE
Couldn't we recognize these problems as real, even if they are by
design? Hopefully we can all agree that:
- the dispatch mechanism should only dispatch, not alter objects;
- is() and selectMethod() should not contradict each other.
Thanks,
H.
Mic
37 11
# [4,]48 12
So, luckily, I have a workaround.
But shouldn't the dispatch mechanism stay away from the business of
altering objects before passed to it?
Thanks,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Ca
Thanks Martin for the clarifications. H.
On 05/04/2018 06:02 AM, Martin Maechler wrote:
Hervé Pagès
on Thu, 3 May 2018 08:55:20 -0700 writes:
> Hi,
> It would be great if one of the experts could comment on the
> difference between Hadley's dotlength and
ing the rest using ..1,
but I don't know a way to do this for general n in pre-3.5.0 base R.
If you don't mind using a package:
# works with R 3.1 and up
library(rlang)
x <- "global"
f <- function(...) {
x <- "f"
g(...)
}
g <- function(...) {
dots <
dding an
as.list.data.frame method that does strict coercion?
2) The S4 coercion system based on as() does strict coercion by
default.
H.
Michael
On Tue, Jan 30, 2018 at 2:41 PM, Hervé Pagès <mailto:hpa...@fredhutch.org>> wrote:
Hi Gabe,
Interestingly the b
at par for the course here...
did I misunderstand something?
~G
On Tue, Jan 30, 2018 at 2:24 PM, Hervé Pagès <mailto:hpa...@fredhutch.org>> wrote:
I agree that it makes sense to expect as.list() to perform
a "strict coercion" i.e. to return an object of class "li
On 01/30/2018 02:24 PM, Hervé Pagès wrote:
I agree that it makes sense to expect as.list() to perform
a "strict coercion" i.e. to return an object of class "list",
*even* on a list derivative. That's what as( , "list") does
by default:
# on a data.fra
n for "by" and no mention if it has
any superclasses.
--
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia
__
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A
fmem( n <- countTRUE(x) )
>> str(n)
>> ## num 2.15e+09
>> print(n == .Machine$integer.max + 1)
>> ## [1] TRUE
>>
>> print(p)
>> ## Rprofmem memory profiling of:
>> ## n <- countTRUE(x)
>> #
(list(NA_character_)))
[1] TRUE
Does this mean deparse() preserves NA-ness for NA_character_ but not
NA_real_?
-Original Message-----
From: R-devel [mailto:r-devel-boun...@r-project.org
<mailto:r-devel-boun...@r-project.org>] On Behalf Of Hervé Pagès
Sent: M
r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=VbamM9XRQOlfBakrmlrmQZ7DLgXZ-hhhFeLD-fKpoCo&s=Luhqwpr2bTltIA9Cy7kA4gwcQh16bla0S6OVe3Z09Xo&e=
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N,
> dimnames(m0)
[[1]]
NULL
[[2]]
NULL
Unexpected dimnames attribute!
rbind'ing empty vectors also returns a matrix with unexpected
dimnames:
> dimnames(rbind(character(0), character(0)))
[[1]]
NULL
[[2]]
NULL
Cheers,
H.
--
Hervé Pagès
Program in Computational B
"AA" Integer,5
# c "AA" Integer,5 NULL
# d Integer,5 NULL "AA"
format(m2)
# [1] "1, 2, 3, 4, 5" "NULL" "AA""1, 2, 3, 4, 5"
# [5] "NULL" "AA"
lass` but it is for S4. It looks
like `data.frame()` is not an S4 class.
isS4(data.frame())
[1] FALSE
And in your case this might help:
is(asS4(data.frame()), "list")
[1] TRUE
Looks like `is` is designed for S4 classes, I am not entirely sure.
Best,
-Mehmet
On 29 November 2017 at 20:46
w("B"))
# [1] "B" "A"
## Does a B object inherit from A?
is(new("B"), "A")
# [1] TRUE
Cheers,
H.
Note that object class is always `data.frame` here, check:
> class(data.frame())
[1] "data.frame"
> is(data.frame(), &q
xtends() agrees:
> extends("data.frame", "list")
[1] TRUE
> extends("data.frame", "oldClass")
[1] TRUE
> extends("data.frame", "vector")
[1] TRUE
Who is right?
Shouldn't 'is(object, class2)' be equival
On 11/21/2017 06:19 PM, Hervé Pagès wrote:
Hi,
Here is another problem with data frame subsetting:
> df <- data.frame(aa=1:3)
> value <- data.frame(aa=11:12, row.names=c("A", "B"))
> `[<-`(df, 4:5, , value=value)
aa
1 1
2 2
3
e)
aa
1 1
2 2
3 3
B 12
A 11
For this last result, the rownames of the 2 last rows should
be swapped.
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle,
will be truncated or padded with NAs
The latter should probably behave like the former in that case. Maybe
by sharing more code with it?
Thanks,
H.
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M
XHoc9_le3Z1DrZg0nQqg&e=
[[alternative HTML version deleted]]
__
R-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Ddevel&d=DwIGaQ&c=eRAMFD45gAfqt84VtBcfhQ&
Hi Martin,
On 06/07/2017 03:54 AM, Martin Maechler wrote:
Martin Maechler
on Tue, 6 Jun 2017 09:45:44 +0200 writes:
Hervé Pagès
on Fri, 2 Jun 2017 04:05:15 -0700 writes:
>> Hi, I have a long numeric vector 'xx' and I want to use
>> sum()
Error in dim(a2) <- c(2, 3) : invalid first argument
On Mon, Jun 5, 2017 at 6:08 PM, Hervé Pagès mailto:hpa...@fredhutch.org>> wrote:
Hi,
It's nice to be able to define S4 classes with slots that correspond
to standard attributes:
setClass(
# 'dimnames' applied to non-array
So it seems that the presence of a "dim" or "dimnames" slot prevents a
class from being extended. Is this expected? I couldn't find anything
in TFM about this. Sorry if I missed it.
Thanks,
H.
-
hat length() already does this so that wouldn't create a
precedent. Also and FWIW prod() avoids the problem by always returning
a double, whatever the type of the input is (except on a complex
vector).
I can provide a patch if this change sounds reasonable.
Cheers,
H.
--
Hervé Pagès
Program in
_listinfo_r-2Ddevel&d=DwIGaQ&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=mLJLORFCunDiCafHllurGVVVHiMf85ExkM7B5DngfIk&s=helOsmplADBmY6Ct7r30onNuD8a6GKz6yuSgjPxljeU&e=
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred H
ot(2+2==5, print("Hey!!!") == "Hey!!!")
Stopifnot(2+2==4, print("Hey!!!") == "Hey!!!")
Stopifnot(T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,F,T)
On 15 May 2017, at 15:37 , Martin Maechler wrote:
I'm still curious about Hervé's idea on using switch() for the
i
1 - 100 of 470 matches
Mail list logo