Displaying 20 results from an estimated 2000 matches similar to: "sort infelicity"
2011 Mar 27
0
model diagnostics for MatrixModels
Dear list,
I have been working with the MatrixModels package quite a bit this
week, and it is proving to be extremely valuable for my current work
(I am working with several factors with many levels, leading to a
sparse model matrix). However, as my knowledge of statistical theory
leaves much to be desired, there are certain aspects of model
evaluation etc that I am having trouble with. Has
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
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
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,
2012 Aug 14
2
Communative Matrix Multiplcation
Friends
I'm not seeing why the following occurs:
> T1 <- (A1 - A2) %*% D
> T2 <- (A1 %*% D) - (A2 %*% D)
> identical(T1, T2)
[1] FALSE
Harold
> dput(A1)
new("dsCMatrix"
, i = c(0L, 1L, 2L, 3L, 0L, 1L, 4L, 2L, 3L, 5L)
, p = c(0L, 1L, 2L, 3L, 4L, 7L, 10L)
, Dim = c(6L, 6L)
, Dimnames = list(NULL, NULL)
, x = c(5, 5, 5, 5, 5, 5, 10, 5, 5, 10)
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 Jun 28
4
how to print "<=" in plot title
Hi, how can I print "<=" (I mean the symbol of just one character) in the main
title of a plot?
for example:
plot(1:10, main=paste("x <=", x))
where variable x is some number generated on the fly.
Thanks
John
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?????????????????? ###
2011 Dec 07
4
bug in rank(), order(), is.unsorted() on character vector
Hi,
This looks OK:
> x <- c("_1_", "1_9", "2_9")
> rank(x)
[1] 1 2 3
But this does not:
> xa <- paste(x, "a", sep="")
> xa
[1] "_1_a" "1_9a" "2_9a"
> rank(xa)
[1] 2 1 3
Cheers,
H.
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1]
2010 Nov 11
3
User input after opening graphing device
If I run the following:
> windows()
>
> bringToTop(-1)
>
> interactive()
[1] TRUE
>
> run <- readline(prompt = "Continue (Yes = 1, No = 2):")
Continue (Yes = 1, No = 2):
> dummy <- 1
> run
[1] ""
it does not allow user input though the session is interactive (it jumps right over the readline command).
It would be great
2010 Mar 19
3
strange behavior, adds new field by non-existent field
data:
> tmp1
Date HrMn Temp Q.4
1 19450101 0900 -37.0 1
2 19450101 1000 -35.9 2
3 19450101 1100 -35.9 3
4 19450101 1200 -36.4 4
5 19450101 1300 -36.4 5
6 19450101 1400 -36.4 6
7 19450101 1500 -36.4 7
8 19450101 1600 -37.5 9
Accidentally, I did this (I meant to write Q.4 instead of Q here)
> tmp1$Q[tmp1$Q!="1" & tmp1$Q!= "5"]<-NA
I would
2011 Feb 09
3
Problem with xlsx package
I am trying to read an xlsx spreadsheet (1506 rows, 501columns) all
populated but getting the following error:
Please advise as to how to get around this issue.
> res <- read.xlsx("c:\\BSE_v2.xlsx",1)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
Here is the session info:
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All
I have a problem with the height of the boxes in the key in the following.
(The text is over 2 lines to accentuate the problem of no space
between the rectangles.)
Is there an easy way to put a space between the rectangles; size
controls the width but there appears to be nothing for the height?
xyplot(1~1,
key = list(corner = c(0.8,0.8),
2011 Aug 30
1
R crash
Dear users,
By running the script below, R crashes systematically at the last
command, namely dev.off(), on Windows 7, but not on Windows XP.
I therefore don't provide a reproducible example and do not really
extract the relevant parts of the script because it has most likely
nothing to do with the script itself. I can do it though if you think it
might be relevant.
R crashes on Windows
2011 Apr 11
1
RExcel
Hi, I am installing Excel using package "RExcelInstaller". When I tried to run
installRExcel()
I got this error message:
You don not have the R package rcom installed.
The (D)COM server installed which will aloow you to use the background server in
RExcel.
Since rcom is not installed, foreground mode will be unavailable.
You may continue with the installation, but in most
2011 Jul 06
1
trouble parsing a date using strptime()
Hi,
I am having a trouble parsing dates using strptime() that I get in the
format of year and week number. The data looks like this "201127" which
means year 2011 and week 27. I would like to graph this using ggplot but
then I get a gap between 201054 and 201101 so I thought I would just easily
convert it.
I tried to use strptime and as.Date and the format string of %Y%W but it
seems
2011 Mar 21
1
Help with POSIXct
I rarely work with dates in R, so I know very little about the
POSIXct and POSIXlt classes. I'm importing an excel file into R using
the RODBC package, and am having issues reformatting the dates.
1. The important info:
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United