Displaying 20 results from an estimated 94 matches for "infelicities".
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
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
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
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 =
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,
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
2007 Dec 03
1
cor(data.frame) infelicities
In using cor(data.frame), it is annoying that you have to explicitly
filter out non-numeric columns, and when you don't, the error message
is misleading:
> cor(iris)
Error in cor(iris) : missing observations in cov/cor
In addition: Warning message:
In cor(iris) : NAs introduced by coercion
It would be nicer if stats:::cor() did the equivalent *itself* of the
following for a data.frame:
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)
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?????????????????? ###
2008 Aug 12
2
Possible buglet (wart ?) of odfWeave 0.7.6 (with workaround)
Dear List,
I have had problems inserting some (not all !) figures via odfWeave
(using print(someLatticeFunction)...). The figure was correctly
displayed in a R device window but the resulting ODF document displayed
the correct space for the figure and an empty frame with a "broken
image" icon and a "read error" mention.
Exploration of the odf (.odt, in my case) file showed
2011 Nov 23
1
gsub, utf-8 replacements and the C-locale
Hi all,
I'd like to discuss a infelicity/possible bug with gsub. Take the
following function:
f <- function(x) {
gsub("\u{A0}", " ", gsub(" ", "\u{A0}", x))
}
As you might expect, in utf-8 locales it is idempotent:
Sys.setlocale("LC_ALL", "UTF-8")
f("x y")
# [1] "x y"
But in the C locale it is not:
2008 May 12
2
ggplot2: font size mismatch for pdf output
Hi
In the following, the graph I see on the screen and the .png output
coincide. However, in the .pdf file, the fonts seem to be scaled
fairly larger, resulting in the label for the top legend disappearing.
Is this an infelicity or bug, or is there something I've missed?
More generally, how do I control the size of fonts used in legends
and axis labels?
library(car)
library(ggplot2)
qp
2004 Mar 12
1
Re: [R] No traceback available when using try(...) (PR#6669)
On Fri, 12 Mar 2004 11:44:14 -0500, "Roger D. Peng" <rpeng@jhsph.edu>
wrote :
>Funny, it works for me on R-patched
>
> > f <- function(a) { return(log(a)) }
> > f("A")
>Error in log(x) : Non-numeric argument to mathematical function
> > traceback()
>2: log(a)
>1: f("A")
> > try(f("A"))
>Error in log(x) :
2020 Mar 26
4
unstable corner of parameter space for qbeta?
I've discovered an infelicity (I guess) in qbeta(): it's not a bug,
since there's a clear warning about lack of convergence of the numerical
algorithm ("full precision may not have been achieved"). I can work
around this, but I'm curious why it happens and whether there's a better
workaround -- it doesn't seem to be in a particularly extreme corner of
parameter
2006 Dec 19
1
preserving sparse matrices (Matrix)
Hi,
I have sparse (tridiagonal) matrices, and I use the Matrix package for
handling them. For certain computations, I need to either set the
first row to zero, or double the last row. I find that neither
operation preserves sparsity, eg
> m <- Diagonal(5)
> m
5 x 5 diagonal matrix of class "ddiMatrix"
[,1] [,2] [,3] [,4] [,5]
[1,] 1 . . . .
[2,] . 1
2015 Jul 29
2
update.packages(checkBuilt=TRUE, ask=FALSE): possible bug
On 7/19/2015 3:50 AM, peter dalgaard wrote:
>> For some, but not allI repositories I get the error message below:
>> >Error in install.packages(update[instlib == l, "Package"], l, contriburl =
>> >contriburl, :
>> > specifying 'contriburl' or 'available' requires a single type, not type =
>> >"both"
>> >
2009 Apr 29
1
Corrupt data frame construction - bug?
Hi useRs,
A recent coding infelicity along these lines
yielded a corrupt data frame.
foo <- matrix(1:12, nrow = 3)
bar <- data.frame(foo)
bar$NewCol <- foo[foo[, 1] == 4, 4]
bar
lapply(bar, length)
> foo <- matrix(1:12, nrow = 3)
> bar <- data.frame(foo)
> bar$NewCol <- foo[foo[, 1] == 4, 4]
> bar
X1 X2 X3 X4 NewCol
1 1 4 7 10 <NA>
2 2 5 8 11
2008 Feb 01
2
bug using matplot (PR#10676)
Full_Name: Anne CORI
Version: 2.6.1
OS: windows
Submission from: (NULL) (134.157.220.19)
let A be a mtrix with n lines and p columns, p>36 ;
matplot(A) will only draw the plot of the first 36 columns of A.
This is due to a bug in the definition of pch in the function :
pch <- c(paste(c(1:9, 0)), letters)[1:k]
should be replaced by
pch <- c(paste(c(1:9, 0)), letters)
I hope this