Displaying 20 results from an estimated 70 matches similar to: "cor(data.frame) infelicities"
2012 Apr 25
1
recommended way to group function calls in Sweave
Dear all
When using Sweave, I'm always hitting the same bump: I want to group
repetitive calls in a function, but I want both the results and the
function calls in the printed output. Let me explain myself.
Consider the following computation in an Sweave document:
summary(iris[,1:2])
cor(iris[,1:2])
When using these two calls directly, I obtain the following output:
> summary(iris[,1:2])
2010 Jul 15
4
Sweave: infelicities with lattice graphics
In a paper I'm writing using Sweave, I make use of lattice graphics, but
don't want to explicitly show (or explain)
in the article text the print() wrapper I need in code chunks for the
graphs to appear.
I can solve this by including each chunk twice, with different options,
as in
<<ortho-xyplot1-code, keep.source=TRUE, eval=FALSE>>=
library(nlme)
library(lattice)
2006 Mar 16
1
Conditional correlation in R?
hi all,
Suppose I have four variables (X1,X2,Y1,Y2)
I want to calculate conditional correlation of (X1,Y1) given (X2, Y2).
How can I do it in R?
Thanks
Ming Chen
2008 Apr 03
1
by "infelicity"
Dear list,
Please find below an example of odd
behaviour of the by function.
It occurs both under GNU/Linux R 2.6.2
and Windows R 2.7.0alpha. Respective
sessionInfo()'s are given below.
I hope I do not overlook anything.
testFactor <- factor(sample(LETTERS[1:6], size = 42, replace = TRUE))
testMatrix <- matrix(rnorm(42 * 6), nrow = 42)
testDf <- as.data.frame(testMatrix)
by(data
2013 Oct 04
0
bug/infelicity in citation("base")
utils::citation() offers the option auto=(NULL|TRUE) to obtain the
citations for a package from the package
DESCRIPTION file or a CITATION file, as described below:
|auto|
a logical indicating whether the default citation auto-generated from
the package 'DESCRIPTION' metadata should be used or not, or |NULL|
(default), indicating that a 'CITATION' file is used if it exists, or
2014 Jun 11
0
infelicity in dlnorm, plnorm
In theory, dlnorm(x, ...) == dnorm(log(x), ...)/x, x>0.
Unfortunately, when sd=0, dlnorm and plnorm return NaN, while dnorm
returns (if(x != mean)0 else Inf) and pnorm returns (if(x<mean)0 else
1). [A numerical optimization, maxLik{maxLik}, reported the NaNs for me.]
help('dlnorm') says, "dlnorm is calculated from the definition (in
?Details?). [pqr]lnorm are based on the
2009 Mar 17
1
Mean of difftime vectors : "code infelicity" or intended behaviour ?
Dear list,
"+" (and "-") being defined for difftime class, I expected mean() to
return something sensible. This is only half-true :
> mean(c(1:5, 5:1),na.rm=TRUE)
[1] 3
> mean(as.difftime(c(1:5, 5:1),unit="mins"),na.rm=TRUE)
Time difference of 3 mins
Fine so far. However :
> mean(c(1:5, NA,5:1),na.rm=TRUE)
[1] 3
> mean(as.difftime(c(1:5,
2023 Jun 03
1
infelicity in `na.print = ""` for numeric columns of data frames/formatting numeric values
format(c(1:2, NA)) gives the last value as "NA" rather than
preserving it as NA, even if na.encode = FALSE (which does the
'expected' thing for character vectors, but not numeric vectors).
This was already brought up in 2008 in
https://bugs.r-project.org/show_bug.cgi?id=12318 where Gregor Gorjanc
pointed out the issue. Documentation was added and the bug closed as
2020 May 10
0
Minor Infelicity in Printing of Objects Nested in Lists
Hello,
The main reason for resetting the tagbuf in `print.default()` and
other entry points to the print routine is that it is currently not
reset on exit. Creating a context to reset it on exit to its last
value might work. This should be done in the entry points rather than
in print-value-rec though, since callers of the latter might write to
the tagbuf.
Another solution to this problem is
2006 May 19
1
UseMethod infelicity
If I do
> example(lm)
...
> mycoef <- function(object, ...) UseMethod("coef", object)
> mycoef(lm.D9)
Error in mycoef(lm.D9) : no applicable method for "coef"
which is pretty surprising, as coef has a default method.
After a bit of digging, this comes from do_usemethod having
defenv = environment where the generic was defined */
defenv =
2011 Jul 10
2
sort infelicity
Hello:
sort(c('A', 'b', 'C')) seems to produce different answers in R
interactive than in "R CMD check", at least under both Fedora 13 and
Windows 7 with Windows 7 sessionInfo() copied below:
In interactive, the result is c('A', 'b', 'C'); with R CMD
check, it is c('A', 'C', 'b'). This produced
2020 May 10
2
Minor Infelicity in Printing of Objects Nested in Lists
Currently S3 objects nested in generic vectors cause the tag buffer to be reset.? This feels sub-optimal for those objects that don't have a print method:
> list(a=list(b='hello'))
$a
$a$b???????????????? ### <<<< notice "$a$b"
[1] "hello"
> list(a=structure(list(b='hello'), class='world'))
$a
$b?????????????????? ###
2018 Sep 17
2
diag(-1) produces weird result
On Mon, Sep 17, 2018 at 5:22 PM, G?bor Cs?rdi <csardi.gabor at gmail.com>
wrote:
> I would say it is a mis-feature. If the 'x' argument of diag() is a
> vector of length 1, then it creates an identity matrix of that size,
> instead of creating a 1x1 matrix with the given value:
>
> ? diag(3)
> [,1] [,2] [,3]
> [1,] 1 0 0
> [2,] 0 1 0
2009 Aug 21
2
[virt-v2v] "make distcheck" now passes
There were a few "infelicities" that kept the "make distcheck"
test from passing. These three patches combine to fix all of them,
punting on only one by disabling the install-data-hook rule.
>From 7504acedcb71bd80d99abe412e6669b267cade38 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Fri, 21 Aug 2009 13:37:18 +0200
Subject: [PATCH 1/3]
2012 Aug 30
2
segfault in gplots::heatmap.2
Hi all,
I experience a segfault when calling gplots::heatmap.2(), but only when
certain other packages are loaded.
I am not sure for the correct place to send this bug report. Should I send
it to the package maintainers directly? If R-help is the wrong place,
please feel free to direct me to the correct one.
I am on debian (testing) linux 64 with the binary R distribution
from the
2012 Aug 30
2
segfault in gplots::heatmap.2
Hi all,
I experience a segfault when calling gplots::heatmap.2(), but only when
certain other packages are loaded.
I am not sure for the correct place to send this bug report. Should I send
it to the package maintainers directly? If R-help is the wrong place,
please feel free to direct me to the correct one.
I am on debian (testing) linux 64 with the binary R distribution
from the
2018 Sep 18
0
diag(-1) produces weird result
Yes, both are rooted in age-old design infelicities (in which, basically, interactive expedience has taken precedence over consistency and generality).
Unfortunately, they are quite difficult to rectify, because there are bound to be countless uses of, say, diag(5) as a 5x5 identity matrix which would break if it suddenly meant the 1x1 matrix(5) instead.
We'd need a very carefully
2011 Oct 14
0
survey 3.26
Version 3.26 of the survey package is percolating through CRAN. Since
the last announcement on this list, of version 3.20, about 18 months
ago, the main changes are
-- an option to calculate replicate-weight variances from sums of
squares around the point estimate rather than from the variance of the
replicates ("MSE" style)
-- Preston's multistage rescaled bootstrap,
2008 Dec 08
0
gee niggles
I'm not sure if the gee package is still actively maintained, but I for one find it extremely useful. However, I've come across a few infelicities that I'm hoping could be resolved for future versions. Hope it's okay to list them all in one post! They are:
(1) AR(1) models don't fit when clustsize = 1 for any subject, even if some subjects have clustsize > 1.
(2) If the
2018 Apr 03
0
sorting large msets
On Sat, Mar 31, 2018 at 12:58:19AM +0000, Eric Wong wrote:
> Olly Betts <olly at survex.com> wrote:
> > If you're just wanting the 200 newest, it'll be faster not to calculate
> > weights, so:
> >
> > $enquire->set_sort_by_value(0, 1);
> > $enquire->set_weighting_scheme(new Xapian::BoolWeight());
> >
> > For me, this drops the time