Displaying 20 results from an estimated 10000 matches similar to: "match.arg()"
2002 May 02
0
improving match.args()
Here is a suggestion for improving match.arg()
Comments welcome.
Best
Jens Oehlschl?gel
# up to now match.arg() works as
t1 <- function( param = c("default", "alternative1", "alternative2") ){
param <- match.arg(param)
param
}
# and
args(t1)
# > function (param = c("default", "alternative1", "alternative2"))
#
2000 May 07
1
Problem with match.arg() (PR#536)
Full_Name: Kjetil Kjernsmo
Version: Version 1.0.0
OS: osf1
Submission from: (NULL) (129.240.28.227)
Hello again!
This is a follow-up to my message on R-help about a problem with match.arg()
I have a little more on the topic, but not much really.
First, it was not entirely true what I wrote in r-help that I call match.arg()
in my ramp(), because ramp() just calls qamp() with runif() as
2001 Jun 14
1
expand.model.frame() fails when subset is specified (PR# 979)
> Thanks. This is also present in the current pre-1.3.0. Your patch
> looks correct, but I wonder if the default for "enclos"
> should not be
> environment(formula(model)) rather than parent.frame() as it is now?
>
> (And wouldn't it be better named "envir"?)
Peter,
I was merely making an incremental improvement, your suggestions provide
2009 Jul 31
0
Somewhat OT: OpenOffice.org Headless issues as non-root user
Hi,
I've installed recently OpenOffice.org 3.1 on Centos 5.3. I use OOo in
headless mode. I have no problem when running as root, but I'd prefer
run it as non-root user (oooserver user). When I run the script in
debug mode this is the output:
sh -x /tmp/ooo-headless-nonroot start
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++
2007 Jan 12
0
Minor logical bug in rbind.data.frame ?
When attempting to merge 3 data frames, one of which has fewer columns
than the others, rbind.data.frame correctly refuses to perform the bind.
However, the error message given is a bit obscure due to a logical
bug in the match.names() internal function to rbind.data.frame.
Illustration:
## Three data frames with same column variable names:
> foo <- data.frame(v1 = c('a',
2005 Apr 29
0
Anscombe-Glynn, Bonett-Seier, D'Agostino
Dear useRs,
I was searching CRAN for implementation of kurtosis and skewness tests,
and found that there is some kind of lack on it.
So, I have written three functions:
1. Anscombe-Glynn test for kurtosis
2. Bonett-Seier test based on Geary's kurtosis (which is not widely
known, but I was inspired by original paper describing it, found
coincidentally in Elsevier database)
3.
1997 Nov 28
0
R-alpha: "..." arg.matching [was 'Problems with dimnames and names']
> -- Now to the ``real'' one : --
>
> Martyn> 3) I have no idea what's going on here.
>
> >> c(r=1,s=2)
> Martyn> s
> Martyn> 2
> >> c(u=100,b=4)
> Martyn> b
> Martyn> 4
>
> Martyn> This seems to happen only for "r" and "u". Other single-letter
> Martyn> names
2007 Oct 22
2
Help interpreting output of Rprof
Hello there,
I am not quite sure how to interpret the output of Rprof (in the following the output I was staring at). I was poking around the web a little bit for documentation but without much success. I guess if I want to figure out what takes so long in my code the 2nd table $by.total and the total.pct column (pct = percent) is the most helpful. What does it mean that [ or [.data.frame is
2001 Mar 08
2
surprising behavior of match.arg() (PR#872)
If a function needs to be passed as an argument to another function,
default arguments to the function being passed are lost. Consider this
example:
fun1 <- function(x, A=c("power","constant")) {
arg <- match.arg(A)
cat(paste("A is:",paste(A,collapse=", "),"\narg is:",arg,"\n"))
cat("formals:\n")
print(formals())
1999 May 25
1
Muliple partial matches with pmatch
I am using R0.64.1 under Windows 95.
The help for `pmatch' states that:
If `duplicates.ok' is false multiple matches will result
in the value of `nomatch' being returned, and if it is
true, the index of the first matching value will be
returned.
The help for pmatch gives the following examples:
pmatch("m", c("mean",
2002 Mar 22
2
rare bad bug in sys.function() {or match.arg()} (PR#1409)
I found this tracing a bug when experimenting with a new sort()
function using match.arg().
It was triggered because mosaicplot.default(.) has an argument
called `sort' and calls itself the sort() function in which I
was using match.arg()...
Here is (input for) a small clean example :
#### bad match.arg() // sys.function() bug :
#### MM, 22.3.2002
callme <- function(a = 1, mm =
2023 Dec 19
1
Partial matching performance in data frame rownames using [
Hi Hilmar and Ivan,
I have used your code examples to write a blog post about this topic,
which has figures that show the asymptotic time complexity of the
various approaches,
https://tdhock.github.io/blog/2023/df-partial-match/
The asymptotic complexity of partial matching appears to be quadratic
O(N^2) whereas the other approaches are asymptotically faster: linear
O(N) or log-linear O(N log N).
2023 Dec 16
2
Partial matching performance in data frame rownames using [
On Wed, 13 Dec 2023 09:04:18 +0100
Hilmar Berger via R-devel <r-devel at r-project.org> wrote:
> Still, I feel that default partial matching cripples the functionality
> of data.frame for larger tables.
Changing the default now would require a long deprecation cycle to give
everyone who uses `[.data.frame` and relies on partial matching
(whether they know it or not) enough time to
2019 Apr 05
0
[EXTERNAL] Re: Re: all.equal failure
On 05/04/2019 10:46 a.m., Therneau, Terry M., Ph.D. wrote:
>
>
> On 4/5/19 9:39 AM, Duncan Murdoch wrote:
>> On 05/04/2019 10:19 a.m., Therneau, Terry M., Ph.D. wrote:
>>> Duncan,
>>> ?? I should have included it in my original note, but
>>>
>>> ??? ? all.equal(unclass(t0x), unclass(t1x))
>>>
>>> returns TRUE as well.? I had
2013 Jul 15
1
pmatch inconsistency
The pmatch help (see also section 4.3.2 in the R Language Definition)
claims that pmatch with duplicates.ok=FALSE provides the same
functionality as R's argument matching algorithm, modulo how empty
strings are matched.
Here's an undocumented inconsistency between pmatch and R's argument
matching algorithm:
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform:
2005 Aug 18
2
kendall tau correlation test for ties: Potential error (PR#8076)
Full_Name: Dirk Koschuetzki
Version: 2.1.1
OS: source code
Submission from: (NULL) (194.94.136.34)
Hello,
>From the source code (R-2.1.1, file: .../R-2.1.1/src/library/stats/R/)
******************************
cor.test.default <-
function(x, y, alternative = c("two.sided", "less", "greater"),
method = c("pearson", "kendall",
2008 Jun 23
3
One-to-one matching?
Hi folks,
Can anyone suggest an efficient way to do "matching without
replacement", or "one-to-one matching"? pmatch() doesn't quite provide
what I need...
For example,
lookupTable <- c("a","b","c","d","e","f")
matchSample <- c("a","a","b","d")
##Normal match()
2006 May 24
0
the computation of exact p-value for the nonparametric cor-test with ties
Hello,
I wuold like to propose my modifications of the original cor.test to you : I
tried to calcolate the correct p-value for Spearman and Kendall's test with
ties.
Let me know what you think.
Thanks you for your time.
Antonietta di Salvatore
test <- function(x, ...) UseMethod("test")
test.default <-
function(x, y, alternative = c("two.sided",
2011 Jun 28
1
Using Match in a lookup table
Hi All,
I'm having a few problems using match and a lookup table, previous Googling
show numerous solutions to matching a lookup table to a dataset,
My situation is slightly different as i have multiple lookup tables, (that i
cannot merge - for integrity reasons) that i wish to match against my data,
and each of these files is large, so lots of for / if conditions are not
ideal. (withstanding
2008 Feb 03
1
R class accessor problem in 2.6
I was able to track down the problem that causes R-Swig to fail in 2.6.
In 2.5, I am able to use the set method against '$' and '$<-' to cause
expressions like r$d to get dispatched to get and set functions. This no
longer seems to work in 2.6, and I was wondering if anyone can give
information as why.
The function that are failing are at the end of this e-mail. In 2.5 a