Re: [R] rgl persp3d bounding box color problem.

2009-03-01 Thread Bo Zhou
.@hotmail.com > CC: remkoduur...@gmail.com; r-help@r-project.org > Subject: Re: [R] rgl persp3d bounding box color problem. > > On 01/03/2009 5:54 PM, Bo Zhou wrote: > > site down.. > > > > here is the code > > > > library(rgl) > > > > plot1: > &

Re: [R] rgl persp3d bounding box color problem.

2009-03-01 Thread Bo Zhou
-- > Remko Duursma > Post-Doctoral Fellow > > Centre for Plant and Food Science > University of Western Sydney > Hawkesbury Campus > Richmond NSW 2753 > > Dept of Biological Science > Macquarie University > North Ryde NSW 2109 > Australia

Re: [R] rgl persp3d bounding box color problem.

2009-03-01 Thread Bo Zhou
using similar setup could give it a try. Thanks, Bo > Date: Sun, 1 Mar 2009 07:03:10 -0500 > From: murd...@stats.uwo.ca > To: bozhou1...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] rgl persp3d bounding box color problem. > > On 28/02/2009 4:20 PM, Bo Zhou wrote:

[R] rgl persp3d bounding box color problem.

2009-02-28 Thread Bo Zhou
Hi guys, I hit on a problem when I use rgl. Could you try to run the code here in this link and see why the first persp3d gives a red bounding box and the second shows black? http://rafb.net/p/g1i7ur33.html (sorry for not pasting the code here directly but my previous email got filtered by t

[R] 3d graph aspect ratio question‏

2009-02-28 Thread Bo Zhou
3d graph aspect ratio questionþ Hi guys, What's the counterpart of rgl package's aspect3d() in Lattice package? aspect3d() :

Re: [R] R Finance

2008-03-13 Thread Bo Zhou
Just like David said, I doubt you can get the symbology databased for free (distribution license/fee reasons). (Or if you know any please let me know :-) I'm sure nobody would like to prepare this mapping manually. This is what I would try: 1. Get today's open or close price from Bloomberg f

Re: [R] elegant way to minus on each row of a matrix

2008-03-02 Thread Bo Zhou
Belgium > Tel: +32/(0)16/336899 > Fax: +32/(0)16/337015 > Web: http://med.kuleuven.be/biostat/ > http://www.student.kuleuven.be/~m0390867/dimitris.htm > > > Quoting Bo Zhou <[EMAIL PROTECTED]>: > > > > > How to do this in an elegant way formatrix/data fr

Re: [R] elegant way to minus on each row of a matrix

2008-03-02 Thread Bo Zhou
10 [4,]05 10 [5,]05 10 > Date: Sun, 2 Mar 2008 14:56:22 -0300 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [R] elegant way to minus on each row of a matrix > CC: r-help@r-project.org > > Try this: > > sweep(mat, 1, vec) >

Re: [R] elegant way to minus on each row of a matrix

2008-03-02 Thread Bo Zhou
nus on each row of a matrix > To: [EMAIL PROTECTED] > > try result<-apply(mat,1, function(.row) .row - vector) but I don't have R > here so make sure it works. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Bo Zhou &g

[R] elegant way to minus on each row of a matrix

2008-03-02 Thread Bo Zhou
How to do this in an elegant way formatrix/data frame/zoo? mat= 1 2 3 4 5 6 7 8 9 vector= 1 2 3 result= 0 1 2 2 3 4 4 5 6 ie 1-1 2-1 3-1 4-2 5-2 6-2 7-3 8-3 9-3 Thanks in advance. _ 08 [[alternative HTML version

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
> Try: > > rollapply(x, 3, force) > > or > > embed(x, 3)[, 3:1] > > On Sun, Mar 2, 2008 at 9:53 AM, Bo Zhou <[EMAIL PROTECTED]> wrote: > > > > I needed that matrix for following calculations. So I don't think roll* > > would work for me. >

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
Subject: Re: [R] Idioms for a timeseries operation - moving window > CC: r-help@r-project.org > > See > > ?embed > > and from zoo see: > ?rollapply > ?rollmean > ?rollmax > > There is a function coded in C in the caTools package for speed. > > > On Sun,

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
a timeseries operation - moving window > CC: r-help@r-project.org > > See > > ?embed > > and from zoo see: > ?rollapply > ?rollmean > ?rollmax > > There is a function coded in C in the caTools package for speed. > > > On Sun, Mar 2, 2008 at 9:24 AM, Bo

[R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
Hi Guys, Need your wisdom on this. Say I have a time series (in zoo format) like this > x <- zoo(11:21) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 I want to do a "moving window sampling" of it. The result can either be a matrix or a dataframe like this my.super

[R] question on lag.zoo

2008-03-02 Thread Bo Zhou
Hi Guys, I'm using zoo package now. I found lag is not doing what I assumed. > x <- zoo(11:21) > z <- zoo(1:10, yearqtr(seq(1959.25, 1961.5, by = 0.25)), frequency = 4) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 > lag(x) 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-18 Thread Bo Zhou
> If this is intended to be a time series you might want to look at the zoo > package. It has three vignettes that give more info. > > > On Feb 17, 2008 11:54 PM, Bo Zhou <[EMAIL PROTECTED]> wrote: > > Hi Gabor, > > > > I'm using this code but it

Re: [R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Bo Zhou
quot;POSIXct" Any insight? Cheers, Bo > Date: Sun, 17 Feb 2008 15:53:28 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [R] How to make a vector/list/array of POSIXlt object? > CC: r-help@r-project.org > > Normally one uses POSIXct rather

[R] How to make a vector/list/array of POSIXlt object?

2008-02-17 Thread Bo Zhou
Hi Guys, I'm cooking up my time series code. I want a data frame with first column as timestamp in POSIXlt format. I hit on this the problem of how to create an array/list/vector of POSIXlt objects. Code is as follows > dtt=array(dim = 2) > t=as.POSIXlt( strptime("07/12/07 13:20:01", "%m/%d