Re: [R] Erro: cannot allocate vector of size 216.0 Mb

2008-07-22 Thread José Augusto Jr.
Dear all,

I have some news.

First, i sucessfully installed Ubuntu 8.04 LTS in my notebook with R
too.  The problem simply disappeared. Now, i can embed my 1.000.000
observations time-series even in 20 dimensions without problem, in the
same notebook.

I'm writing this message to encourage people migrating to Ubuntu. W$ e
M$  are shit.

Thank you all.

Regards,

jamaj


2008/7/21 José Augusto Jr. [EMAIL PROTECTED]:
 Dear all,

 Thank you by your attention.

 1) I'm using a Core 2 Duo CPU with 2MB physical memory and Windows Vista
 2) The main  function, that´s causing the error, is embedd(x=data,d,t).
 3) The time series that i´m using has 1.000.000 observations of real numbers.
 4) Sometimes the function works, sometimes, not.

 Some things i´m doing:

 1) I have put x - NULL and gc() in the end of each memory-intensive
 routine (embedding), to release memory.

 2) I installed Ubuntu linux in the same machine and will try the same routine.
 Efective men use Unix :)

 And my plans to the future:

 3) If this not work, i will try to rewrite the code to reduce memory
 requirements.

 4) If this not work, i will try to parallelize the code, by using snow
 ou Rmpi, something like this.

 5) If this  not work, i will try to use a cluster, with sufficient
 memory to let this work.

 Any suggestions?

 Many thanks.

 Regards,

 jamaj


 2008/7/21, Prof Brian Ripley [EMAIL PROTECTED]:
 On Mon, 21 Jul 2008, Uwe Ligges wrote:

  Several questions:
 
  - Before we go ahead: Are you sure 3 Gb are sufficient for your problem?
  - Which OS (I guess Windows)?
 

 (The only platform on which these functions are supported.)

  - Which version of R (let's assume R-2.7.1)?
  - Is your Windows 3GB enabled in the boot flags, or is it a 64-bit version
 of Windows?
 

 (No, or the default memory limit would be higher than 1.5Gb.  R by default
 uses as high a memory limit as is sensible if (as here) the address space is
 the limiting factor.)


 
 
  Best wishes,
  Uwe Ligges
 
 
 
  José Augusto Jr. wrote:
 
   Please,
  
   I have a 2GB computer and a huge time-series to embedd, and i tried
   increasing memory.limit() and memory.size(max=TRUE), but nothing.
  
   Just before the command:
  
  
memory.size(max=TRUE)
   
   [1] 13.4375
  
memory.limit()
   
   [1] 1535.875
  
gc()
   
   used (Mb) gc trigger (Mb) max used (Mb)
   Ncells 209552  5.6 407500 10.9   35  9.4
   Vcells 125966  1.0 786432  6.0   496686  3.8
  
  
   I  increased the memory limit:
  
  
memory.limit(3000)
   
   NULL
  
memory.limit()
   
   [1] 3000
  
memory.size()
   
   [1] 11.33070
  
memory.size(max=TRUE)
   
   [1] 13.4375
  
gc()
   
   used (Mb) gc trigger (Mb) max used (Mb)
   Ncells 209552  5.6 407500 10.9   35  9.4
   Vcells 125964  1.0 786432  6.0   496686  3.8
  
  
   And even trying to increase the memory.limits, i still get and error.
  
   Any sugestions?
  
  
   Thanks in  advance.
  
   jama
  
   __
   R-help@r-project.org mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
   and provide commented, minimal, self-contained, reproducible code.
  
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 

 --
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,
 http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Erro: cannot allocate vector of size 216.0 Mb

2008-07-21 Thread José Augusto Jr.
Dear all,

Thank you by your attention.

1) I'm using a Core 2 Duo CPU with 2MB physical memory and Windows Vista
2) The main  function, that´s causing the error, is embedd(x=data,d,t).
3) The time series that i´m using has 1.000.000 observations of real numbers.
4) Sometimes the function works, sometimes, not.

Some things i´m doing:

1) I have put x - NULL and gc() in the end of each memory-intensive
routine (embedding), to release memory.

2) I installed Ubuntu linux in the same machine and will try the same routine.
Efective men use Unix :)

And my plans to the future:

3) If this not work, i will try to rewrite the code to reduce memory
requirements.

4) If this not work, i will try to parallelize the code, by using snow
ou Rmpi, something like this.

5) If this  not work, i will try to use a cluster, with sufficient
memory to let this work.

Any suggestions?

Many thanks.

Regards,

jamaj


2008/7/21, Prof Brian Ripley [EMAIL PROTECTED]:
 On Mon, 21 Jul 2008, Uwe Ligges wrote:

  Several questions:
 
  - Before we go ahead: Are you sure 3 Gb are sufficient for your problem?
  - Which OS (I guess Windows)?
 

 (The only platform on which these functions are supported.)

  - Which version of R (let's assume R-2.7.1)?
  - Is your Windows 3GB enabled in the boot flags, or is it a 64-bit version
 of Windows?
 

 (No, or the default memory limit would be higher than 1.5Gb.  R by default
 uses as high a memory limit as is sensible if (as here) the address space is
 the limiting factor.)


 
 
  Best wishes,
  Uwe Ligges
 
 
 
  José Augusto Jr. wrote:
 
   Please,
  
   I have a 2GB computer and a huge time-series to embedd, and i tried
   increasing memory.limit() and memory.size(max=TRUE), but nothing.
  
   Just before the command:
  
  
memory.size(max=TRUE)
   
   [1] 13.4375
  
memory.limit()
   
   [1] 1535.875
  
gc()
   
   used (Mb) gc trigger (Mb) max used (Mb)
   Ncells 209552  5.6 407500 10.9   35  9.4
   Vcells 125966  1.0 786432  6.0   496686  3.8
  
  
   I  increased the memory limit:
  
  
memory.limit(3000)
   
   NULL
  
memory.limit()
   
   [1] 3000
  
memory.size()
   
   [1] 11.33070
  
memory.size(max=TRUE)
   
   [1] 13.4375
  
gc()
   
   used (Mb) gc trigger (Mb) max used (Mb)
   Ncells 209552  5.6 407500 10.9   35  9.4
   Vcells 125964  1.0 786432  6.0   496686  3.8
  
  
   And even trying to increase the memory.limits, i still get and error.
  
   Any sugestions?
  
  
   Thanks in  advance.
  
   jama
  
   __
   R-help@r-project.org mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
   and provide commented, minimal, self-contained, reproducible code.
  
 
  __
  R-help@r-project.org mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
  and provide commented, minimal, self-contained, reproducible code.
 
 

 --
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,
 http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] portfolio optimization problem - use R

2008-07-21 Thread José Augusto Jr.
You could try the fPortfolio package.

Wish helps.

jamaj

2008/7/21, fzp2008 [EMAIL PROTECTED]:

 How to use R to solve the optimisaton problem

 Minimize:
 ½*w^T*omega*w+mu^T*w+c^T(w-w0) for ww0 long position
 ½*w^T*omega*w+mu^T*w-c^T(w-w0) for ww0 short position

 W: is the update weight of portfolio
 Wo is the initial weight of portfolio

 Omega is the variance covariance matrix

 mu is the vector of return rate of stocks in the portfolio

 C is the vector coefficient of transaction cost

 Is it a quandratic programming problem? Then how to write the objective
 function? Or any other method to solve this?

 --
 View this message in context: 
 http://www.nabble.com/portfolio-optimization-problem---use-R-tp18570399p18570399.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread José Augusto Jr.
Dear all,

I have just installed the new version of R 2.7.1 and when i first
instaled some packages it asked me to create a personal directory.

It installed the packages, but not the html help page (packages.html)

The downloaded packages are in
C:\Users\jamaj\AppData\Local\Temp\Rtmp4MTuXN\downloaded_packages
updating HTML package descriptions
Warning message:
In file.create(f.tg) :
  cannot create file 'C:\PROGRA~1\R\R-27~1.1/doc/html/packages.html',
reason 'Permission denied'


How can i fix the packages.html file to reflect the packages' instalation?

Thanks in advance.

José Augusto M. de Andrade Jr. (jamaj)
Quant. Finance Researcher
FEA-RP - University of São Paulo

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Erro updating HTML package descriptions in packages.html

2008-07-20 Thread José Augusto Jr.
Dear all,

Unfortunately, i´m running as administrator. So, i cannot run R in an
upper level than this one i am already running.

jamaj

2008/7/20 Gabor Grothendieck [EMAIL PROTECTED]:
 Read the VISTA HOW TO section of this page:
 http://batchfiles.googlecode.com


 On Sun, Jul 20, 2008 at 12:48 PM, José Augusto Jr. [EMAIL PROTECTED] wrote:
 Dear all,

 I have just installed the new version of R 2.7.1 and when i first
 instaled some packages it asked me to create a personal directory.

 It installed the packages, but not the html help page (packages.html)

 The downloaded packages are in
C:\Users\jamaj\AppData\Local\Temp\Rtmp4MTuXN\downloaded_packages
 updating HTML package descriptions
 Warning message:
 In file.create(f.tg) :
  cannot create file 'C:\PROGRA~1\R\R-27~1.1/doc/html/packages.html',
 reason 'Permission denied'


 How can i fix the packages.html file to reflect the packages' instalation?

 Thanks in advance.

 José Augusto M. de Andrade Jr. (jamaj)
 Quant. Finance Researcher
 FEA-RP - University of São Paulo

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Erro: cannot allocate vector of size 216.0 Mb

2008-07-20 Thread José Augusto Jr.
Please,

I have a 2GB computer and a huge time-series to embedd, and i tried
increasing memory.limit() and memory.size(max=TRUE), but nothing.

Just before the command:

 memory.size(max=TRUE)
[1] 13.4375
 memory.limit()
[1] 1535.875
 gc()
 used (Mb) gc trigger (Mb) max used (Mb)
Ncells 209552  5.6 407500 10.9   35  9.4
Vcells 125966  1.0 786432  6.0   496686  3.8



I  increased the memory limit:

 memory.limit(3000)
NULL
 memory.limit()
[1] 3000
 memory.size()
[1] 11.33070
 memory.size(max=TRUE)
[1] 13.4375
 gc()
 used (Mb) gc trigger (Mb) max used (Mb)
Ncells 209552  5.6 407500 10.9   35  9.4
Vcells 125964  1.0 786432  6.0   496686  3.8



And even trying to increase the memory.limits, i still get and error.

Any sugestions?


Thanks in  advance.

jama

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.