Okay thanks, I'm going through the docs now.. and I came through this..
The named field is set and accessed by the SET_NAMED and NAMED macros, and
take values 0, 1 and 2. R has a `call by value' illusion, so an assignment
like
b - a
appears to make a copy of a and refer to it as b.
I guess I have more reading to do Are there any website that I can read
up on memory management, or specifically what happen when we 'pass in'
variables, which strategy is better at which situation?
Thanks~
- y
Prof Brian Ripley wrote:
On Tue, 10 Apr 2007, yoo wrote:
Hi
Start with the 'R Internals' manual. R has 'call by value' semantics, but
lazy copying (the idea is to make a copy only when an object is changed
and there are still references to the original version, but that idea is
partially implemented).
'which strategy is better at which situation' is
Before you go down that road, I would recommend first seeing if it is
really a problem. Premature code optimization is in my opinion never
a good idea.
Also, reading the Details on ?attach you will find this:
The database is not actually attached. Rather, a new environment is
Hi all, I'm just curious how memory management works in R... I need to run an
optimization that keeps calling the same function with a large set of
parameters... so then I start to wonder if it's better if I attach the
variables first vs passing them in (coz that involves a lot of copying.. )
On Tue, 10 Apr 2007, yoo wrote:
Hi all, I'm just curious how memory management works in R... I need to run an
optimization that keeps calling the same function with a large set of
parameters... so then I start to wonder if it's better if I attach the
variables first vs passing them in
I don't see why making copies of the columns you need inside the loop is
better memory management. If the data are in a matrix, accessing
elements is quite fast. If you're worrying about speed of that, do what
Charles suggest: work with the transpose so that you are accessing
elements in the
Liaw, Andy wrote:
I don't see why making copies of the columns you need inside the loop is
better memory management. If the data are in a matrix, accessing
elements is quite fast. If you're worrying about speed of that, do what
Charles suggest: work with the transpose so that you are
On Tue, 20 Feb 2007, Federico Calboli wrote:
Liaw, Andy wrote:
I don't see why making copies of the columns you need inside the loop is
better memory management. If the data are in a matrix, accessing
elements is quite fast. If you're worrying about speed of that, do what
Charles
Charles C. Berry wrote:
This is a bit different than your original post (where it appeared that
you were manipulating one row of a matrix at a time), but the issue is
the same.
As suggested in my earlier email this looks like a caching issue, and
this is not peculiar to R.
Viz.
Hi All,
I would like to ask the following.
I have an array of data in an objetct, let's say X.
I need to use a for loop on the elements of one or more columns of X and I am
having a debate with a colleague about the best memory management.
I believe that if I do:
col1 = X[,1]
col2 = X[,2]
On Mon, 19 Feb 2007, Federico Calboli wrote:
Hi All,
I would like to ask the following.
I have an array of data in an objetct, let's say X.
I need to use a for loop on the elements of one or more columns of X and I am
having a debate with a colleague about the best memory management.
Charles C. Berry wrote:
Whoa! You are accessing one ROW at a time.
Either way this will tangle up your cache if you have many rows and
columns in your orignal data.
You might do better to do
Y - t( X ) ### use '-' !
for (i in whatever ){
do something using Y[ , i ]
}
My
Hi All,
just a quick (?) question while I wait my code runs...
I'm comparing the identity of the lines of a dataframe, doing all possible
pairwise comparisons. In doing so I use identical(), but that's by the way. I'm
doing a (not so) quick and dirty check, and subsetting the data as
:[EMAIL PROTECTED] On Behalf Of
Federico Calboli
Sent: Monday, October 30, 2006 11:35 AM
To: r-help
Subject: [R] memory management
Hi All,
just a quick (?) question while I wait my code runs...
I'm comparing the identity of the lines of a dataframe, doing
all possible
pairwise comparisons
All,
I've written some functions that use a list and a
list of sub-lists and I'm running into memory problems,
even after changing memory.limit. Does it make
any difference to the handling of memory if I use
simple vectors and matrices instead of the list and
list of sub-lists? I suspect
I think this an issue about the amount of graphics memory. You are asking
for an image of about 17*2*3 = 102Mb, and you need more than that.
From the help page:
Windows imposes limits on the size of bitmaps: these are not
documented in the SDK and may depend on the version of
: Re: [R] Memory Management under Linux: Problems to allocate large
amounts of data
Let's assume this is a 32-bit Xeon and a 32-bit OS (there are
64-bit-capable Xeons). Then a user process like R gets a 4GB address
space, 1GB of which is reserved for the kernel. So R has a 3GB address
space
: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 29. Juni 2005 15:18
An: Dubravko Dolic
Cc: r-help@stat.math.ethz.ch
Betreff: Re: [R] Memory Management under Linux: Problems to allocate large
amounts of data
Let's assume this is a 32-bit Xeon and a 32-bit OS (there are
64-bit-capable
Prof Brian Ripley [EMAIL PROTECTED] writes:
On Thu, 30 Jun 2005, Dubravko Dolic wrote:
Dear Prof. Ripley.
Thank You for Your quick answer. Your right by assuming that we run
R on a 32bit System. My technician tried to install R on a emulated
64bit Opteron machine which led into some
Auftrag von Peter Dalgaard
Gesendet: Donnerstag, 30. Juni 2005 11:48
An: Prof Brian Ripley
Cc: Dubravko Dolic; r-help@stat.math.ethz.ch
Betreff: Re: [R] Memory Management under Linux: Problems to allocate large
amounts of data
Prof Brian Ripley [EMAIL PROTECTED] writes:
On Thu, 30 Jun 2005, Dubravko
Dear Group
I'm still trying to bring many data into R (see older postings). After solving
some troubles with the database I do most of the work in MySQL. But still I
could be nice to work on some data using R. Therefore I can use a dedicated
Server with Gentoo Linux as OS hosting only R. This
Let's assume this is a 32-bit Xeon and a 32-bit OS (there are
64-bit-capable Xeons). Then a user process like R gets a 4GB address
space, 1GB of which is reserved for the kernel. So R has a 3GB address
space, and it is trying to allocate a 2GB contigous chunk. Because of
memory
23 matches
Mail list logo