Displaying 20 results from an estimated 20000 matches similar to: "Attributes of 1st argument in ..."
2010 Jan 08
2
function by: order within subsets
When the 'by' function forms subsets, are the rows in the same order as they
are in the original data frame?
For example, I want to use 'by' to calculate cumulative sums of a value 'v'
by date 'd' for different levels of a factor 'f':
>
2012 Aug 15
1
Build from Source fails on Loading required package Matrix
Hello:
I am building R 2.15.1 from source on a Windows 7 machine with the x64
toolset, MixTeX, and InnoSetup per
http://cran.r-project.org/bin/windows/Rtools/. I obtained the source for
2.15.1 via svn from https://svn.r-project.org/R/branches/R-2-15-branch/.
This is my first try building R from source. The build seems to go far,
then terminates with "undefined exports: .M.classEnv" from
2010 May 06
1
Validity glitch when contains="matrix"
Sirs:
My validity function did not run when my class contains="matrix". But if I
first define the class with contains="numeric", then define it again
with contains="matrix", validity runs. Here's the session:
> f <- function(object) "BAD CLASS" # force error to
> setClass("A", contains="matrix", validity=f)
[1]
2009 Mar 16
4
Match .3 in a sequence
Hello:I am trying to match the value 0.3 in the sequence seq(.2,.3). I get
> 0.3 %in% seq(from=.2,to=.3)
[1] FALSE
Yet
> 0.3 %in% c(.2,.3)
[1] TRUE
For arbitrary sequences, this "invisible .3" has been problematic. What is
the best way to work around this?
Thank you.
Dan
[[alternative HTML version deleted]]
2020 Mar 02
2
dput()
On 02/03/2020 3:24 a.m., Martin Maechler wrote:
>>>>>> robin hankin
>>>>>> on Sun, 1 Mar 2020 09:26:24 +1300 writes:
>
> > Thanks guys, I guess I should have referred to FAQ 7.31
> > (which I am indeed very familiar with) to avoid
> > misunderstanding. I have always used dput() to clarify
> > 7.31-type
2020 Feb 29
2
dput()
Thanks guys, I guess I should have referred to FAQ 7.31 (which I am
indeed very familiar with) to avoid misunderstanding. I have always
used dput() to clarify 7.31-type issues.
The description in ?dput implies [to me at any rate] that there will
be no floating-point roundoff in its output. I hadn't realised that
'deparsing' as discussed in dput.Rd includes precision roundoff
issues.
2015 Jun 03
2
What has happened to the CentOS logo?
Has the CentOS logo disappeared from CentOS-7?
I thought the logo in CentOS-6 was very pleasant.
Also I liked the way in which one increasing circle inside another
showed how the boot was progressing.
The dots going round and round in Microsoft fashion in CentOS-7
is a retrograde step, I think.
One always has the fear it might continue forever.
--
Timothy Murphy
gayleard /at/ eircom.net
School
2008 Dec 22
2
... (dotMethods) and cbind/rbind: how to give the signature?
Dear List,
I'm struggling with the signature writing cbind/rbind functions for a S4
class.
First of all, I'm very happy that it is now possible to dispatch on ...
I follow the example for "paste" in ?dotMethods, which works as far as this:
### start example
setClass ("cbtest",
representation = representation (data = "data.frame"),
2019 Aug 15
3
Underscores in package names
Martin,
Thank you for discussing this amongst R-core and for detailing the
R-core discussion here.
Some specific examples where having underscores available would have
been useful.
1. My primerTree package (2013) was originally primer_tree, but I had
to change the name to camelCase to comply with the check requirements.
Using camelCase in the package name makes reading code jarring, as the
2006 Mar 02
5
Deparsing '...'
Hi,
The following function works, but is there a neater way to write it?
f = function(x,...)
{
# return a character vector of the arguments passed in after 'x'
gsub("
","",unlist(strsplit(deparse(substitute(list(...))),"[(,)]")))[-1]
}
> f(x,a,b,c*d)
[1] "a" "b" "c*d"
>
Thanks.
[[alternative HTML
2018 Feb 20
5
deparseDots to get names of all arguments?
Hi, All:
????? How can I get the names of all the arguments in dots(...)?
????? I'm able to get the name of the first argument but not the second:
deparseDots <- function(...){
? deparse(substitute(...))
}
a <- 1
b <- 2
deparseDots(a, b)
[1] "a"
????? I'd like to get c('a', 'b').
????? Thanks,
????? Spencer Graves
> sessionInfo()
R
2017 May 15
2
stopifnot() does not stop at first non-TRUE argument
>>>>> Herv? Pag?s <hpages at fredhutch.org>
>>>>> on Wed, 3 May 2017 12:08:26 -0700 writes:
> On 05/03/2017 12:04 PM, Herv? Pag?s wrote:
>> Not sure why the performance penalty of nonstandard evaluation would
>> be more of a concern here than for something like switch().
> which is actually a primitive. So it seems that
2019 Jul 13
2
Mitigating Stalls Caused by Call Deparse on Error
When large calls cause errors R may stall for extended periods.? This
is particularly likely to happen with `do.call`, as in this example
with a 24 second stall:
??? x <- runif(1e7)
??? system.time(do.call(paste0, list(abs, x)))? # intentional error
??? ## Error in (function (..., collapse = NULL)? :
??? ##?? cannot coerce type 'builtin' to vector of type 'character'
??? ##
2018 Feb 20
0
deparseDots to get names of all arguments?
On 21/02/18 11:36, Spencer Graves wrote:
> Hi, All:
>
>
> ????? How can I get the names of all the arguments in dots(...)?
>
>
> ????? I'm able to get the name of the first argument but not the second:
>
>
>
> deparseDots <- function(...){
> ? deparse(substitute(...))
> }
> a <- 1
> b <- 2
> deparseDots(a, b)
> [1]
2019 Aug 10
2
Underscores in package names
On 09/08/2019 4:37 p.m., Gabriel Becker wrote:
> Duncan,
>
>
> On Fri, Aug 9, 2019 at 1:17 PM Duncan Murdoch <murdoch.duncan at gmail.com
> <mailto:murdoch.duncan at gmail.com>> wrote:
>
> On 09/08/2019 2:41 p.m., Gabriel Becker wrote:
> > Note that this proposal would make mypackage_2.3.1 a valid
> *package name*,
> > whose
2008 Feb 05
2
two densities with same stepsize
Hi there,
I have two series of data. plotting the density function of both gives me an
idea about the difference of the data. But I would like to quantify the
difference I see.
a <- rnorm(100)
b <- rnorm(100)
da <- density(a)
db <- density(b)
The problem is that da$x and db$x are different and so I have difficulties to
compare them... Is there any way to force the density
2019 Jul 14
2
[External] Mitigating Stalls Caused by Call Deparse on Error
Luke, thanks for considering the issue.? I would like to
try to separate the problem into two parts, as I _think_
your comments address primarily part 2 below:
1. How can we avoid significant and possibly crippling
?? stalls on error with these non-standard calls.
2. What is the best way to view these non-standard calls.
I agree that issue 2. requires further thought and
discussion under a
2011 Aug 31
2
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Hi all,
Why I am getting,
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Thanks in advance!
func <- Vectorize(function(x, a, sad, trunc=0, ...) {
result <- function(x) {
f1 <- function(n) {
dcom <- paste("d", deparse(substitute(sad)), sep="")
dots <- c(as.name("n"), list(...))
f <-
2019 Jul 16
1
[External] Mitigating Stalls Caused by Call Deparse on Error
We also have a few other suggestions and wishes about backtrace
storage and display on the one hand, and display of constructed calls
on the other hand. Perhaps it would be better to open a different
wishlist item for traceback() to keep the discussions focused?
FWIW I think deparsing backtraces lazily is a great idea. Displaying 1
line per call by default in interactive sessions, while being
2007 Aug 31
1
gsub warning message
Hi.
I am using R 2.5.1 on a Windows XP machine. Here is an example of a piece
of code I was running in older versions of R on the same machine. I am
looking for underscores and replacing them with periods. This result is
from R 2.4.1:
>gsub ( "\\_+","\.","AAA_I")
[1] "AAA.I"
>
Here is what I get in R 2.5.1:
>gsub (