Displaying 20 results from an estimated 112 matches for "dened".
Did you mean:
denied
2011 Jul 18
1
plotting groups via density and different colors
I have a data set that looks like this:
dene <- data.frame(length =
c(35,32,33,34,41,40,46,35,41,40,45,36,38,37,39,40,42,42,42,43,44),
sex=c(1,1,1,1,2,2,2,1,2,2,2,1,2,2,2,2,2,2,2,2,2))
I would like to plot the density (frequency of occurrence) of each length
class but I want to have different colors for sex. I used the following:
library(sm)
sex.f<-factor(as.factor(dene$sex),levels=c(1,2),
2018 May 03
7
length of `...`
Hi,
In some cases the number of arguments passed as ... must be determined
inside a function, without evaluating the arguments themselves. I use
the following construct:
dotlength <- function(...) length(substitute(expression(...))) - 1L
# Usage (returns 3):
dotlength(1, 4, something = undefined)
How can I define a method for length() which could be called directly on
`...`? Or is it an
2020 Mar 12
2
support of `substitute(...())`
Dear R Core Team,
I learnt approx. two years ago in this mailing list that one can use the
following "trick" to get a (dotted pair)list of the ellipsis arguments
inside a function:
`substitute(...())`
Now my problem is that I can not find any occurrence of this call within
the R source - the most frequent solution there is
`substitute(list(...))[-1L] `
I would like to know if:
1)
2020 Nov 20
2
return (x+1) * 1000
Without having dug into the details, it could be that one could update
the parser by making a 'return' a keyword and require it to be
followed by a parenthesis that optionally contains an expression
followed by end of statement (newline or semicolon). Such a
"promotion" of the 'return' statement seems backward compatible and
would end up throwing syntax errors on:
2020 Nov 20
2
return (x+1) * 1000
And the related:
> f = function() stop(return("lol"))
> f()
[1] "lol"
I have a feeling all of this is just return() performing correctly though.
If there are already R CMD CHECK checks for this kind of thing (I
wasnt sure but I'm hearing from others there may be/are) that may be
(and/or may need to be) sufficient.
~G
On Fri, Nov 20, 2020 at 3:27 PM D?nes T?th
2020 Oct 19
1
Is there any way to check the class of an ALTREP?
Thank Denes for the clarification, glad to see my package got one citation
from my own question:) Also, thank Benjamin
for sending many useful documents.
Actually, the question is related to the SharedObject package that Benjamin
has pointed to. I wanna
avoid sharing an object that has already been shared, so I need to check
whether an object is an ALTREP
that is defined in my package. Since the
2020 Oct 19
2
Is there any way to check the class of an ALTREP?
Benjamin,
You happened to send a link which points to the OP's own package :) I
think Jiefei would like to know how one can "officially" determine if an
arbitrary ALTERP object belongs to a class that he owns.
Regards,
Denes
On 10/19/20 10:22 AM, Benjamin Christoffersen wrote:
> It seems as if you can you use the ALTREP macro as done in this
> package:
2013 Aug 28
1
named lmer.models in do.call(anova,models)
Hi,
For some reason do.call on anova fails if the models are named lmer objects.
Consider the following example:
library(lme4)
models <- list(
lmer(Reaction ~ Days + (1| Subject), sleepstudy),
lmer(Reaction ~ Days + (Days | Subject), sleepstudy))
#
# models is an unnamed list, do.call works (although with warning):
do.call(anova, models)
#
# after labeling the models, do.call gives an
2020 Nov 21
1
return (x+1) * 1000
On 20/11/2020 7:01 p.m., Ben Bolker wrote:
> I may be unusual but I don't find these examples surprising at all/
> I don't think I would make these mistakes (maybe it's easier to make
> that mistake if you're used to a language where 'return' is a keyword
> rather than a function?
>
> My two cents would be that it would make more sense to (1) write
2017 Dec 11
1
possible bug in utils::removeSource - NULL argument is silently dropped
Dear R-Core Team,
I found an unexpected behaviour in utils::removeSource (also present in
r-devel as of today).
---
# create a function which accepts NULL argument
foo <- function(x, y) {
if (is.null(y)) y <- "default foo"
attr(x, "foo") <- y
x
}
# create a function which utilizes 'foo'
testSrc <- function() {
x <- 1:3
x <- foo(x,
1998 Oct 17
1
SAMBA digest 1846
> Date: Fri, 16 Oct 1998 18:07:45 -0700
> From: RICK_@t-online.de =?ISO-8859-1?Q?(J=DCRGEN?= ANZER)
> To: dszekely@csoft.ro
> Subject: Re: WIN 98 password problem
> Message-ID: <3627EDE1.38A@t-online.de>
>
> Szekely Denes wrote:
> >
> > Three days ago I had a mad ideea to install Win 98 on my PC. Until this
> > date I cannot map or access from WINDOWS
1998 Oct 16
5
WIN 98 password problem
Hi!
I'm new on the list, so please, be patient with me!
I have a problem for wich I can't find the answer in the FAQ. Until
recently I was running a 16 PC-s network with SCO OpenServer 5.0.4 and
Samba 1.9.16p11 on the server and mixed clients (Win 3.11 to Win 95
OSR2). The users on the network have access to a PUBLIC directory on
they own user directories on the server without
2018 May 03
1
Converting a list to a data frame
This is very nice to learn about, Denis, but it seems only fair to point out that the result of rbindlist is not a data frame. You can convert it to a data frame easily, but the copy and indexing semantics of data tables are quite different than data tables, which could be a real headache for someone not prepared for those differences. (To learn more, read the data tables vignette.)
Tibbles (as
2020 Oct 06
0
understanding as.list(substitute(...()))
Hi Tim,
I have also asked a similar question a couple of months ago, and someone
else did the same recently, maybe on r-devel.
We received no "official" response, but Deepayan Sarkar (R Core Team
member) claimed that:
"
There is no documented reason for this to work (AFAIK), so again, I
would guess this is a side-effect of the implementation, and not a API
feature you should
2005 Aug 31
1
improving vorbis compression with arithmetic coding and by exploiting temporal redundancies
Hi!
If you were looking foe a paper about improving vorbis compression by using
arithmetic coding and exploiting temporal redundancies (i.e. repeating sound)
you might have a look here:
http://web.interware.hu/rudas
Three ogg vorbis files were compressed losslessly, with compression ratios
between 2 - 8 % and compression time about 1/500 realtime (i.e. slow).
Theoretical upper bound of the
2020 May 01
4
Request: tools::md5sum should accept connections and finally in-memory objects
AFAIK there is no hashing utility in base R which can create hash
digests of arbitrary R objects. However, as also described by Henrik
Bengtsson in [1], we have tools::md5sum() which calculates MD5 hashes of
files. Calculating hashes of in-memory objects is a very common task in
several areas, as demonstrated by the popularity of the 'digest' package
(~850.000 downloads/month).
Upon
2018 May 02
0
Converting a list to a data frame
On 05/02/2018 07:11 PM, Kevin E. Thorpe wrote:
> I suspect this is pretty easy, but I'm having trouble figuring it out.
> Basically, I have a list of data frames such as the following example:
>
> list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8))
>
> I would like to turn this into data frame where the list elements are
> essentially rbind'ed together and
2020 Nov 21
0
return (x+1) * 1000
I may be unusual but I don't find these examples surprising at all/
I don't think I would make these mistakes (maybe it's easier to make
that mistake if you're used to a language where 'return' is a keyword
rather than a function?
My two cents would be that it would make more sense to (1) write
code to detect these constructions in existing R code (I'm not good at
2020 Oct 06
3
understanding as.list(substitute(...()))
I probably need to be more specific. What confuses me is not the use
of substitute, but the parenthesis after the dots. It clearly works
and I can make guesses as to why but it is definitely not obvious.
The following function gives the same final result but I can
understand what is happening.
dots <- function (...) {
exprs <- substitute(list(...))
as.list(exprs[-1])
}
In the
2017 Sep 28
0
Searching for Enumerated Items using str_count() from the stringr package
On 09/28/2017 10:25 PM, Dan Abner wrote:
> Hi all,
>
> I have a large number of text strings to search for enumerated items.
> However, I am receiving this error message even though I thought that I
> properly escaped the special character closed parenthesis:
>
>
>> Count<-str_count(text3,keywords)
> Error in stri_count_regex(string, pattern, opts_regex =