Hi:
2^40
[1] 1.099512e+12
Do you have enough memory for almost 1.1 trillion rows and 40 columns?
This is a good example of the 'power law' that Stephen Strogatz discussed in
his New York Times article today:
http://opinionator.blogs.nytimes.com/2010/03/28/power-tools/?hp
HTH,
Dennis
On Mon,
OK. I understood this. But the problem is I have to execute that for atleast
130. Is there any possibility to break that calculation into some
sub-section so that individual section can carry out the calculation
efficiently?
Thanks,
--
View this message in context:
Bogaso wrote:
OK. I understood this. But the problem is I have to execute that for atleast
130. Is there any possibility to break that calculation into some
sub-section so that individual section can carry out the calculation
efficiently?
Thanks,
Why do you 'have' to do this? What are you
KJ == Keith Jewell k.jew...@campden.co.uk
on Tue, 22 Dec 2009 16:02:49 - writes:
KJ Hi All,
KJ This example code
KJ
KJ dDF - structure(list(y = c(4.75587, 4.8451, 5.04139, 4.85733, 5.20412,
KJ 5.92428, 5.69897, 4.78958, 4, 4), t = c(0, 48, 144, 192,
Just confirming it isn't the bug fixed in 2.11.0dev, and giving an even
simpler example:
R version 2.11.0 Under development (unstable) (2009-12-20 r50794)
expand.grid(data.frame(y=1:10, t=1:10))
Error in `[[-.data.frame`(`*tmp*`, i, value = c(1L, 2L, 3L, 4L, 5L, 6L, :
replacement has 100
1) Look at the help: a data frame may be a list, but do pass a list
such as unclass(dDF) when it says 'list'.
2) You have 7 columns of 10 items, which gives 10 million rows. Is
that really what you want (especially as some of the columns are
constant)? It's an object of ca 500MB.
On Tue,
The help page says:
...: vectors, factors or a list containing these.
So, you can try this:
expand.grid(as.list(dDF))
On Tue, Dec 22, 2009 at 2:19 PM, Keith Jewell k.jew...@campden.co.uk wrote:
Just confirming it isn't the bug fixed in 2.11.0dev, and giving an even
simpler example:
R
Keith Jewell k.jewell at campden.co.uk writes:
Hi All,
This example code
dDF - structure(list(y = c(4.75587, 4.8451, 5.04139, 4.85733, 5.20412,
5.92428, 5.69897, 4.78958, 4, 4), t = c(0, 48, 144, 192, 240,
312, 360, 0, 48, 144), Batch = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1
On Dec 22, 2009, at 11:19 AM, Keith Jewell wrote:
Just confirming it isn't the bug fixed in 2.11.0dev, and giving an
even
simpler example:
R version 2.11.0 Under development (unstable) (2009-12-20 r50794)
expand.grid(data.frame(y=1:10, t=1:10))
Error in `[[-.data.frame`(`*tmp*`, i, value
bangs head on desk
Thanks, Prof Ripley (and everyone else who's responding while I type this!).
I thought I was being stupid. What I wanted was:
expand.grid(lapply(dDF, unique))
which works fine!
hangs head in shame
Seasonal greetings to all,
Keith Jewell
Prof Brian Ripley
On 22/12/2009 11:19 AM, Keith Jewell wrote:
Just confirming it isn't the bug fixed in 2.11.0dev, and giving an even
simpler example:
The docs for expand.grid say it works on lists, but they don't mention
dataframes. Although a dataframe is in many ways a list with extra
structure,
Unfortunately, expand.grid doesn't validate the class of its argument, so it
is reporting an internal error rather than something more intelligible.
On Tue, Dec 22, 2009 at 11:19 AM, Keith Jewell k.jew...@campden.co.ukwrote:
Just confirming it isn't the bug fixed in 2.11.0dev, and giving an
12 matches
Mail list logo