Displaying 20 results from an estimated 63 matches for "profmem".
2018 Jan 27
1
R (>= 3.4.0): integer-to-double coercion in comparisons no longer done (a good thing)
...s a memory improvement done in R going from R 3.3.3 to R 3.4.0
when it comes to comparing an integer 'x' an double 'y' (either may be
scalar or vector).
For example, in R 3.3.3, I get:
> getRversion()
[1] '3.3.3'
> x <- integer(1000)
> y <- double(1000)
> profmem::profmem(z <- (x < y))
Rprofmem memory profiling of:
z <- (x < y)
Memory allocations:
bytes calls
1 8040 <internal>
2 4040 <internal>
total 12080
>
and in R 3.4.0, I get:
> getRversion()
[1] '3.4.0'
> x <- integer(1000)
> y <...
2018 Jan 25
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
..., times = 2^31)
> y <- sum(x)
> y
[1] NA
Warning message:
In sum(x) : integer overflow - use sum(as.numeric(.))
> y <- matrixStats::sum2(x, mode = "double")
> y
[1] 2147483648
> str(y)
num 2.15e+09
No coercion is taking place, so the memory overhead is zero:
> profmem::profmem(y <- matrixStats::sum2(x, mode = "double"))
Rprofmem memory profiling of:
y <- matrixStats::sum2(x, mode = "double")
Memory allocations:
bytes calls
total 0
/Henrik
On Fri, Jun 2, 2017 at 1:58 PM, Henrik Bengtsson
<henrik.bengtsson at gmail.com>...
2016 Sep 23
2
Undocumented 'use.names' argument to c()
...064 100
c(a, d, use.names = FALSE) 0.031 0.031 0.049 0.034 0.035 1.452 100
c(a, b, use.names = TRUE) 0.031 0.031 0.055 0.034 0.036 2.094 100
c(a, d, use.names = TRUE) 0.510 0.526 0.588 0.549 0.617 1.998 100
c(c, d, use.names = TRUE) 0.780 0.815 0.886 0.841 0.944 1.430 100
> profmem::profmem(c(c, d, use.names=FALSE))
Rprofmem memory profiling of:
c(c, d, use.names = FALSE)
Memory allocations:
bytes calls
1 80040 <internal>
total 80040
> profmem::profmem(c(c, d, use.names=TRUE))
Rprofmem memory profiling of:
c(c, d, use.names = TRUE)
Memory allocation...
2008 Sep 16
4
ubuntu hardy packages 32bit no tcltk support
...; echo "capabilities()" | R --no-save | tail -6
[Previously saved workspace restored]
> capabilities()
jpeg png tcltk X11 aqua http/ftp sockets libxml
TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE
fifo cledit iconv NLS profmem cairo
TRUE FALSE TRUE TRUE TRUE TRUE
Best regards,
Ulrich
--
______________________________________________________________________
Ulrich Leopold
Resource Centre for Environmental Technologies, Public Research Centre
Henri Tudor, Technoport Schlassgoart, 66 rue d...
2016 Sep 25
1
Undocumented 'use.names' argument to c()
....034 0.035 1.452 100
>> c(a, b, use.names = TRUE) 0.031 0.031 0.055 0.034 0.036 2.094 100
>> c(a, d, use.names = TRUE) 0.510 0.526 0.588 0.549 0.617 1.998 100
>> c(c, d, use.names = TRUE) 0.780 0.815 0.886 0.841 0.944 1.430 100
>>
>>> profmem::profmem(c(c, d, use.names=FALSE))
>> Rprofmem memory profiling of:
>> c(c, d, use.names = FALSE)
>>
>> Memory allocations:
>> bytes calls
>> 1 80040 <internal>
>> total 80040
>>
>>> profme...
2018 Jan 30
2
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...ic(.))
>
> >> y <- matrixStats::sum2(x, mode = "double")
> >> y
> > [1] 2147483648
> >> str(y)
> > num 2.15e+09
>
> > No coercion is taking place, so the memory overhead is zero:
>
> >> profmem::profmem(y <- matrixStats::sum2(x, mode = "double"))
> > Rprofmem memory profiling of:
> > y <- matrixStats::sum2(x, mode = "double")
>
> > Memory allocations:
> > bytes calls
> > total 0
>
> > /...
2016 Sep 23
0
Undocumented 'use.names' argument to c()
...names = FALSE) 0.031 0.031 0.049 0.034 0.035 1.452 100
> c(a, b, use.names = TRUE) 0.031 0.031 0.055 0.034 0.036 2.094 100
> c(a, d, use.names = TRUE) 0.510 0.526 0.588 0.549 0.617 1.998 100
> c(c, d, use.names = TRUE) 0.780 0.815 0.886 0.841 0.944 1.430 100
>
>> profmem::profmem(c(c, d, use.names=FALSE))
> Rprofmem memory profiling of:
> c(c, d, use.names = FALSE)
>
> Memory allocations:
> bytes calls
> 1 80040 <internal>
> total 80040
>
>> profmem::profmem(c(c, d, use.names=TRUE))
> Rprofmem memory profiling o...
2018 Jan 27
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...> In sum(x) : integer overflow - use sum(as.numeric(.))
>> y <- matrixStats::sum2(x, mode = "double")
>> y
> [1] 2147483648
>> str(y)
> num 2.15e+09
> No coercion is taking place, so the memory overhead is zero:
>> profmem::profmem(y <- matrixStats::sum2(x, mode = "double"))
> Rprofmem memory profiling of:
> y <- matrixStats::sum2(x, mode = "double")
> Memory allocations:
> bytes calls
> total 0
> /Henrik
Thank you, Henrik, for the reminder....
2017 Jun 02
4
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
Hi,
I have a long numeric vector 'xx' and I want to use sum() to count
the number of elements that satisfy some criteria like non-zero
values or values lower than a certain threshold etc...
The problem is: sum() returns an NA (with a warning) if the count
is greater than 2^31. For example:
> xx <- runif(3e9)
> sum(xx < 0.9)
[1] NA
Warning message:
In sum(xx
2018 Feb 01
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...<- matrixStats::sum2(x, mode = "double")
>> >> y
>> > [1] 2147483648
>> >> str(y)
>> > num 2.15e+09
>>
>> > No coercion is taking place, so the memory overhead is zero:
>>
>> >> profmem::profmem(y <- matrixStats::sum2(x, mode = "double"))
>> > Rprofmem memory profiling of:
>> > y <- matrixStats::sum2(x, mode = "double")
>>
>> > Memory allocations:
>> > bytes calls
>> > total 0...
2010 Nov 08
2
incorrect DLL path for Rbitmap.dll on Windows
...vel builds of R on Windows with
various devices from the grDevices package.
For example:
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE FALSE TRUE TRUE TRUE TRUE FALSE
> jpeg()
Error in jpeg() : unable to start jpeg() device
In addition: Warning messages:
1: In jpeg() : Unable to load Rbitmap.dll
2: In jpeg() : opening device failed
In the GUI version, a dialog appears saying:
Unable to l...
2016 Sep 23
2
Undocumented 'use.names' argument to c()
In S-PLUS 3.4 help on 'c' (http://www.uni-muenster.de/ZIV.BennoSueselbeck/s-html/helpfiles/c.html), there is no 'use.names' argument.
Because 'c' is a generic function, I don't think that changing formal arguments is good.
In R devel r71344, 'use.names' is not an argument of functions 'c.Date', 'c.POSIXct' and 'c.difftime'.
Could
2010 May 09
2
Non-zero exit status for survival package
...loaded via a namespace (and not attached):
[1] tools_2.11.0
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
libxml fifo cledit
TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE
TRUE TRUE TRUE
iconv NLS profmem cairo
TRUE TRUE TRUE TRUE
2013 Jul 15
1
Problem with plot in several cases, font issue?
...ated graphics).
I'm working on ubuntu 12.04 with R 3.0.1 (2013-05-16).
The capabilities function returns me:
jpeg png tiff tcltk X11 aqua http/ftp sockets
TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE TRUE
I think this may be an issue with my installation, but I could not
figured out what was the missing package.
I tried this on other computers. I did not see the same bug.
Thanks in advance for the help,
Alice
2013 Oct 21
2
png(type='cairo'): point symbols without boarders are not anti-aliased?
...methods base
loaded via a namespace (and not attached):
[1] Cairo_1.5-2 tools_3.0.2
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
TRUE TRUE TRUE TRUE TRUE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE TRUE TRUE
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
2017 Mar 05
0
length(unclass(x)) without unclass(x)?
...xample illustrating what I'm trying to get to:
> x <- structure(double(1e6), class = c("foo", "numeric"))
> length.foo <- function(x) 1L
> length(x)
[1] 1
> length(unclass(x))
[1] 1000000
but the latter call will cause an internal memory allocation:
> profmem::profmem(length(unclass(x)))
Rprofmem memory profiling of:
length(unclass(x))
Memory allocations:
bytes calls
1 8000040 <internal>
total 8000040
In my use case, I have control over neither the class of 'x' (it can
be any class from any package) nor the implementatio...
2009 Oct 01
1
X11 Problems
...the Cairo package within R,
which appears to work fine.
This what I'm seeing:
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE TRUE TRUE
> x11()
Error in X11(d$display, d$width, d$height, d$pointsize, d$gamma,
d$colortype, :
unable to start device X11cairo
In addition: Warning message:
In x11() : unable to open connection to X11 display ''
An...
2009 Jun 17
1
Unable to use jpeg(), png() etc.....
...vice PNG
In addition: Warning message:
In png() : no png support in this version of R
> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE TRUE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE FALSE TRUE TRUE FALSE FALSE
It's not really a problem because i use cairo but i would like to know the source of this error.
I checked the library as proposed in previous post :
https://stat.ethz.ch/pipermail/r-help/2005-December/085177.html
bu...
2009 Sep 14
1
setting plotting device
...s utils datasets methods base
> dev.cur()
null device
1
> capabilities(what = NULL)
jpeg png tiff tcltk X11 aqua http/ftp sockets
FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE FALSE FALSE
> dev.interactive()
[1] FALSE
Before re-installation, everything was working perfectly.
Please suggest, how do I set the interactive device as default?
Thank in advance,
Regards,
Utkarsh
[[alternative HTML version d...
2017 Jun 02
0
sum() returns NA on a long *logical* vector when nb of TRUE values exceeds 2^31
...SE) {
nx <- length(x)
if (nx < .Machine$integer.max) return(sum(x, na.rm = na.rm))
nx * mean(x, na.rm = na.rm)
}
(not sure if one needs to worry about rounding errors, i.e. where n %% 0 != 0)
x <- rep(TRUE, times = .Machine$integer.max+1)
object.size(x)
## 8589934632 bytes
p <- profmem::profmem( n <- countTRUE(x) )
str(n)
## num 2.15e+09
print(n == .Machine$integer.max + 1)
## [1] TRUE
print(p)
## Rprofmem memory profiling of:
## n <- countTRUE(x)
##
## Memory allocations:
## bytes calls
## total 0
FYI / related: I've just updated matrixStats::sum2() to supp...