Displaying 20 results from an estimated 8000 matches similar to: "list2env() is broken"
2015 Sep 29
3
making object.size() more meaningful on environments?
Hi,
Currently object.size() is not very useful on environments as it always
returns 56 bytes, no matter how big the environment is:
env1 <- new.env()
object.size(env1) # 56 bytes
env2 <- new.env(hash=TRUE, size=75000000L)
object.size(env2) # 56 bytes
env3 <- list2env(list(a=runif(25000000), L=LETTERS))
object.size(env3) # 56 bytes
This makes it pretty useless on
2015 Sep 29
1
making object.size() more meaningful on environments?
Hi Gabe,
On 09/29/2015 02:51 PM, Gabriel Becker wrote:
> Herve,
>
> The problem then would be that for A a refClass whose fields take up N
> bytes (in the sense that you mean), if we do
>
> B <- A
>
> A and B would look like the BOTH take up N bytes, for a total of 2N,
> whereas AFAIK R would only be using ~ N + 2*56 bytes, right?
Yes, but that's still a *much*
2010 Oct 11
1
'R CMD build' not cleaning the src/ folder on Windows
Hi,
'R CMD build' (with R 2.12.0 RC) fails to clean the src/ folder
on Windows:
D:\biocbld\bbs-2.7-bioc>ls meat/BUS/src
BUS.cpp BUS.h
D:\biocbld\bbs-2.7-bioc>R\bin\R CMD build meat\BUS
* checking for file 'meat\BUS/DESCRIPTION' ... OK
* preparing 'BUS':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package
2010 Oct 02
1
cleanup_pkg() in tools:::.build_packages() is broken
Hi,
The cleanup_pkg() function defined the big tools:::.build_packages()
function in tools/R/build.R is currently broken. When Makefiles are
used cleanup_pkg() doesn't clean anything because of the way system2()
is called.
For example, the call to Ssystem() on line 304 (Ssystem is a silent
version of system2) is basically trying to do this:
>
2011 Feb 23
1
factor() on a double vector
Hi,
When 'x' is a vector of doubles, it's not clear how 'factor(x)'
compares its values in order to determine the levels. For example,
here all the values in 'x' are "conceptually" the same:
x <- c(11/3,
2/3 + 4/3 + 5/3,
50 + 11/3 - 50,
7.00001 - 1000003/300000)
However, due to machine rounding errors, they are not
2011 Feb 24
1
min/max of a vector with NAs and NaNs
I get this (with R-2.12 and R-2.13, didn't try with earlier versions):
> max(c(NaN, NA))
[1] NA
> max(c(NA, NaN))
[1] NaN
I get the same thing with min().
The fact that the result of 'max(x)' or 'min(x)' depends on the order
of the elements in 'x' is surprising. It also seems to contradict the
man page:
By definition the min/max of a numeric vector
2010 Jun 04
2
Argument recycling in substring()
Hi,
According to its man page substring() "expands (its) arguments
cyclically to the length of the longest _provided_ none are of
zero length".
So, as expected, I get an error here:
> substring("abcd", first=2L, last=integer(0))
Error in substring("abcd", first = 2L, last = integer(0)) :
invalid substring argument(s)
But I don't get one here:
2010 Nov 10
1
installed.packages Error: subscript out of bounds
Hi,
Today we've seen the following problem with the R-2.12 that we use
for our Windows builds:
> installed.packages()
Error: subscript out of bounds
After some investigation we discovered that the cause of this failure
was that 1 of the 890 packages currently installed on the machine
(Windows Server 2003 R2) had its DESCRIPTION file empty:
2010 Sep 16
1
Lack of consistent cross-platform behaviour of tools:::buildVignettes()
Hi,
On both Unix and Windows there is a mechanism to add variables
to the environment when R is started. I noticed that, on Unix,
this mechanism is not used when R is started normally at the
command line but only when it's started using the 'R CMD' syntax.
One problem with this is some lack of consistent cross-platform
behaviour. For example:
On Linux:
$ echo $TEXINPUTS
$
2010 Sep 30
1
tar problem when using 'R CMD build' on Windows
Hi,
Already reported here:
https://stat.ethz.ch/pipermail/r-devel/2010-September/058636.html
but it doesn't seem to be related (at least not in an obvious way) to
the problems described in that previous thread.
So the problem is that, with recent versions of R 2.12 (i.e.
current R-alpha but I've observed this with R-devel for at
least 2-3 months now), 'R CMD build
2010 Oct 22
1
cannot connect to an FTP server with long HELLO message
Hi,
Trying to access files on the ftp server at ftp.ncbi.nih.gov
will either give a time out or sometimes even a segfault on Linux.
The 2 following methods give the same results:
f <-
url("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz", open="r")
download.file("ftp://ftp.ncbi.nih.gov/pub/geo/DATA/SOFT/GDS/GDS10.soft.gz",
destfile=tempfile())
2008 Dec 01
2
[BioC] BioC 2.3 standard installation
I always followed http://cran.r-project.org/bin/linux/ubuntu/ to install R
on Ubuntu 8.1. I had no errors before!
> install.packages("XML")
Warning in install.packages("XML") :
argument 'lib' is missing: using '/usr/local/lib/R/site-library'
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL
2010 Jun 03
1
named empty list
Hi,
I just realized that a named empty list is displayed the same
way as an empty list:
> list(aa=2:5)[0]
list()
> list()
list()
For empty atomic vectors, the print method makes the difference:
> c(aa=3L)[0]
named integer(0)
> integer(0)
integer(0)
Maybe lists could do that too?
Thanks,
H.
> sessionInfo()
R version 2.12.0 Under development (unstable)
2009 Jun 02
2
formal argument "envir" matched by multiple actual arguments
Hi list,
This looks similar to the problem reported here
https://stat.ethz.ch/pipermail/r-devel/2006-April/037199.html
by Henrik Bengtsson a long time ago. It is very sporadic and
non-reproducible.
Henrik, do you remember if your code was using reg.finalizer()?
I tend to suspect it but I'm not sure.
I've been hunting this bug for months but today, and we the help of other
Bioconductor
2010 Jun 21
1
No output/no source tarball produced by 'R CMD build' on Windows (but ret code is 0)
Hi,
After updating R-2.12 on the Bioconductor build system about 1 week ago
(we update R every 4-6 weeks for our devel builds), we've started to see
something never seen before on Windows: for some BioC packages,
'R CMD build' would produce no output at all (0 byte) and, of course,
no source tarball. Even though, the code returned by the command is 0!
See an example of this is here:
2010 Nov 12
1
installing dependencies: binary vs source
Hi,
Installing from binaries on Windows:
> install.packages("multtest")
Warning: dependency 'Biobase' is not available
trying URL
'http://cran.fhcrc.org/bin/windows/contrib/2.12/multtest_2.6.0.zip'
Content type 'application/zip' length 1645590 bytes (1.6 Mb)
opened URL
downloaded 1.6 Mb
package 'multtest' successfully unpacked
2009 Sep 24
1
crash with NAs in subscripted assignment of a raw vector
Hi,
> x <- charToRaw("ABCDEFGx")
> x[c(1:3, NA, 6)] <- x[8]
*** caught segfault ***
address 0x8402423f, cause 'memory not mapped'
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Cheers,
H.
> sessionInfo()
R version 2.10.0 Under development
2017 May 03
2
stopifnot() does not stop at first non-TRUE argument
Not sure why the performance penalty of nonstandard evaluation would
be more of a concern here than for something like switch().
If that can't/won't be fixed, what about fixing the man page so it's
in sync with the current behavior?
Thanks,
H.
On 05/03/2017 02:26 AM, peter dalgaard wrote:
> The first line of stopifnot is
>
> n <- length(ll <- list(...))
>
>
2017 Nov 29
2
binary form of is() contradicts its unary form
Hi Mehmet,
On 11/29/2017 11:22 AM, Suzen, Mehmet wrote:
> Hi Herve,
>
> I think you are confusing subclasses and classes. There is no
> contradiction. `is` documentation
> is very clear:
>
> `With one argument, returns all the super-classes of this object's class.`
Yes that's indeed very clear. So if "list" is a super-class
of "data.frame" (as
2010 Jul 15
1
Very slow subsetting by name
Hi,
I'm subsetting a named vector using character indices.
My vector of indices (or keys) is 10x longer than the vector
I'm subsetting. All my keys are distinct and only 10% of them
are valid (i.e. match a name of the vector being subsetted).
It is surprisingly slow:
x1 <- 1:1000
names(x1) <- paste("a", x1, sep="")
keys <- sample(c(names(x1),