Displaying 20 results from an estimated 9000 matches similar to: "out of memory?"
2001 Mar 20
3
help:too slow
here is a script I use to make overlapping cut of my input "col.dat"
file into a matrix:
#----------------------------------
col2mat<-function(x, sampsz=220, qsamp=2000) {
m<-matrix(nr=qsamp, nc=sampsz)
for(s in 1:qsamp){
print(s)
for(i in 1:sampsz){
m[s,i] <- x[s+i,1]
}
}
m
}
w<-read.table("col.dat", check.names=FALSE)
m<-col2mat(w)
1999 Mar 25
6
Using zip format for help pages, examples, etc.
At the Vienna meeting we discussed the problems encountered on some
operating systems when storing many small files in a directory. In
particular the directories $RHOME/library/base/help/,
$RHOME/library/base/R-ex/, and $RHOME/library/base/data/ can take up
an enormous amount of storage on the Macintosh or on Windows systems
because the minimum amount of storage per distinct file is quite
large.
2012 Oct 13
1
hep on arithmetic covariance conversion to log-covariance
Dear All,
is there a function in R that would help me convert a covariance matrix built based on arithmetic returns to a covariance matrix from log-returns?
As an example of the means and covariance from arithmetic:
mu <-c(0.094,0.006,1.337,1.046,0.263)
sigma
2010 Feb 04
4
xyplot 3 panels 3 different Y variables
Often, when exploring a dataset, I'd like to plot several very different Y variables against the same X variable, in panels stacked one over the other. Is there an easy way to do this?
I'd like to achieve an elegant look similar to the look achieved by lattice in conditioned plots--for instance no space between panels. But unlike in straightforward conditioned plot, each panel may be on a
2006 Jan 17
5
NOOB: Numeric only input...can it be done on client?
I was wondering if there''s a way to limit what a user is typing on the
keyboard to only valid numeric input. Is there a simple plugin or something
which would allow this? I guess with AJAX it could also be one. Has anyone
already solved this requirement? Thanks in advance.
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Sep 02
2
Impact of cex changing as a function of mfrow
R 2.15.1
OS X (MLion)
Colleagues,
I am aware that changes in mfrow / mfcol in par() affect cex (from help: In a layout with exactly two rows and columns the base value of ?"cex"? is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66).
I generate a multipage PDF in which mfrow varies such that cex is impacted. This affect
2003 Jul 11
3
short puzzles
Dear R users,
can someone help with these short puzzles?
1) Is there a function like outer() that evaluates a three-argument function
on a threedimensional grid - or else how to define such a function, say,
outer.3()? E.g., calculate (x/y)^z on (x,y,z) element of {1,2,3}x{3,4}x{4,5} and
return the results in a 3-dimensional array. I would naively use outer() on
two of the arguments within a
2017 Mar 19
2
outer not applying a constant function
Hi,
the function outer can not apply a constant function as in the last line of the following example:
> xg <- 1:4
> yg <- 1:4
> fxyg <- outer(xg, yg, function(x,y) x*y)
> fconstg <- outer(xg, yg, function(x,y) 1.0)
Error in outer(xg, yg, function(x, y) 1) :
dims [product 16] do not match the length of object [1]
Of course there are simpler ways to construct a constant
2017 Mar 20
1
outer not applying a constant function
> Or is this a bad idea?
I don't like the proposal. I have seen code like the following (in
fact, I have written such code, where I had forgotten a function was
not vectorized) where the error would have been discovered much later
if outer() didn't catch it.
> outer(1:3, 11:13, sum)
Error in outer(1:3, 11:13, sum) :
dims [product 9] do not match the length of object [1]
2017 Dec 06
3
[RFC][LV][VPlan] Proposal for Outer Loop Vectorization Implementation Plan
Proposal for Outer Loop Vectorization Implementation Plan
=============================================
=====
Goal:
=====
Extending Loop Vectorizer (LV) such that it can handle outer loops, via VPlan infrastructure enhancements.
Understand the trade-offs in trying to make concurrent progress with moving remaining inner loop vectorization
functionality to VPlan infrastructure
===========
2006 Mar 23
3
outer() function
Greetings R-help community,
I am relatively new to R, which may be why I am having trouble
understanding this problem. I am trying to use outer() to generate a
graphable surface of a function. If there is a better way to do this,
I would appreciate the insight. Otherwise, could someone suggest a
method to get the outer() function to work here?
Below is my simplified R program. Further down
2017 Dec 14
3
[RFC][LV][VPlan] Proposal for Outer Loop Vectorization Implementation Plan
>Another might be to introduce changes under feature flags to ease the revert/reintroduce/revert cycle.
This is essentially the first guard. We plan to have flags/settings to control which types of outer loops are handled.
The new code path is initially exclusive to outer loop vectorization. If we disable all types of outer loops
(and that's the initial default), LV continues to be good
2005 Feb 28
2
A problem about outer()
Dear all,
I have something about function outer() that I can't understand. Just see the following example. The two NaNs are due to 0/0, but I can't figure out the cause of the last two errors. I wonder if some one can explain this for me.
___________________________________________________________________
> sx=rbinom(10,1,0.5);ot=rbinom(10,1,0.5);ag <- rbinom(10,100,0.3);ho <-
2011 Mar 28
2
mgcv gam predict problem
Hello
I'm using function gam from package mgcv to fit splines. ?When I try
to make a prediction slightly beyond the original 'x' range, I get
this error:
> A = runif(50,1,149)
> B = sqrt(A) + rnorm(50)
> range(A)
[1] 3.289136 145.342961
>
>
> fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE)
> predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE)
Error
2008 Jan 04
2
subsetting
I'm using R Version 2.6.1 under Windows XP.
> search()
[1] ".GlobalEnv" "s" "s" "package:cairoDevice"
[5] "package:datasets" "package:foreign" "package:graphics" "package:grDevices"
[9] "package:gWidgetsrJava"
2013 Apr 23
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
Hi,
I am investigating a performance degradation between llvm-3.1 and llvm-3.2
(Note: current top-of-tree shows a similar degradation)
One issue I see is the following:
- 'loop invariant code motion' seems to be depending on the result of the 'reassociate expression' pass:
In the samples below I observer the following behavior:
Both start with the same expression:
%add = add
2001 Mar 15
3
outer
Dear r-plus users,
i would like to use outer in the following case outer(x,y,FUN="fun")
i suppose that my function fun is of the following form:
fun<-function(x,y)
{
if(y>x) return(x+y)
if(y<=x) return(0)
}
My problem is that the command outer(x,y,FUN="fun") return me a
null matrix instead of an upper triangular matrix.
Is somebody have a solution ?
Thanks for your
2018 Jan 15
0
[RFC][LV][VPlan] Proposal for Outer Loop Vectorization Implementation Plan
To revive the discussion around vectorizer testing, here's a quick
sample of a few of the issues hit recently in the loop vectorizer. I
want to be careful to say that I am not stating these are the result of
any recent work, just that they're issues that have been triaged down to
the loop vectorizer doing something incorrect or questionable from a
performance perspective.
2006 Dec 07
2
groupedData Error Using outer=TRUE
I'm using groupedData from nlme. I set up a groupedData data.frame with
outer=~group1. When I try to plot with outer=TRUE, I get "subscript out
of bounds." This happens most of the time. When it works, I get
spaghetti-type plots for comparing groups. But I don't understand why it
doesn't usually work.
> longa.mod.1.gd <- groupedData(mod1.logit~time|
2005 Oct 27
3
outer-question
Dear all,
This is a rather lengthy message, but I don't know what I made wrong in
my real example since the simple code works.
I have two variables a, b and a function f for which I would like to
calculate all possible combinations of the values of a and b.
If f is multiplication, I would simply do:
a <- 1:5
b <- 1:5
outer(a,b)
## A bit more complicated is this:
f <-