Re: [R] plotting

2007-09-05 Thread yoooooo
This looks like exactly what i want!! Thanks! Jim Lemon-2 wrote: > > yoo wrote: >> Hi, let's say I have data >> >> x = c(1, 2, 10, 12) >> y = c(100, -20, 50, 25) >> >> if I go plot(x, y), then the default x-axis range goes from 1 to 12.

[R] plotting

2007-08-31 Thread yoooooo
Hi, let's say I have data x = c(1, 2, 10, 12) y = c(100, -20, 50, 25) if I go plot(x, y), then the default x-axis range goes from 1 to 12. Is there a way to change it so that the axis looks like: |-|-|-| 1 2 10 12 This doesn't seem reasonable but let's

[R] Efficient way to parse string and construct data.frame

2007-08-28 Thread yoooooo
Hi all, I have this list of strings [1] "1 ,2 ,3" "4 ,5 ,6" Is there an efficient way to convert it to data.frame: V1 V2 V3 1 1 23 2 4 56 Like I can use strsplit to get to a list of split strings.. and then use say a = strsplit(mylist, ",") data.frame(V1 = lapply(a, funct

Re: [R] RServe

2007-08-11 Thread yoooooo
Yea, I found the shutdown function in the java interface as well.. but is there a way I can send a shutdown command through linux shell? (something that I can cron?) Thanks!! - yoo Dirk Eddelbuettel wrote: > > > On 11 August 2007 at 11:00, yoo wrote: > | Hi all, is th

[R] RServe

2007-08-11 Thread yoooooo
Hi all, is there a way to properly terminate Rserve instead of killing the process? I run Rserve in a linux box that serves my Java client.. I have a cronjob that runs Rserve every morning. However, I'm killing it at night manually for the moment. Is there a way, given host/port, I can run an R co

[R] GLPK API

2007-07-17 Thread yoooooo
Hi all, let's say I have: lp = lpx_create_prob() lpx_set_obj_dir(lp, LPX_MIN) lpx_add_cols(lp, 3) lpx_add_rows(lp, 2) lpx_set_obj_coef(lp, 1, 100) lpx_set_obj_coef(lp, 2, 200) lpx_set_obj_coef(lp, 3, 300) lpx_set_mat_row(lp, 1, 3, c(1, 2, 3), c(3, 2,1)) lpx_set_row_name(lp, 1, "c1") lpx_set_row_b

Re: [R] restructuring matrix

2007-06-27 Thread yoooooo
your original matrix is A then > unique(A$People) and unique(A$Desc) > will produce a vector of different people and a vector > of different descriptions. > > --- yoo <[EMAIL PROTECTED]> wrote: > >> >> Hi all, >> >> let's say

[R] restructuring matrix

2007-06-27 Thread yoooooo
Hi all, let's say I have matrix PeopleDescValue Mary Height50 Mary Weight 100 FannyHeight 60 Fanny Height200 Is there a quick way to form the following matrix? People HeightWeight Mary 50 100 Fanny 60200 (Assuming I

[R] How does max.lag work?

2007-04-19 Thread yoooooo
Let's say I have some data DIFF, then I do > a <- acf(DIFF, lag.max=2) > a$acf , , 1 [,1] [1,] 1.000 [2,] -0.2085724 [3,] -0.1597789 > a <- acf(DIFF) > a$acf , , 1 [,1] [1,] 1. [2,] -0.20857236 [3,] -0.15977892 How come they are different? I thought the

Re: [R] Memory management

2007-04-12 Thread yoooooo
A value of 2 means that the object must be duplicated before being changed. What does it mean "the new symbol b is bound to the same value as a". Does it mean b has a pointer pointing to a? Thanks!! - yooo yoo wrote: > > I guess I have more reading to do Are

Re: [R] Memory management

2007-04-11 Thread yoooooo
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 200

[R] Memory management

2007-04-10 Thread yoooooo
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.. ) Thu

[R] Simplest question ever...

2007-03-01 Thread yoooooo
Let's say i have a = c(1, 4, 5) b = c(2, 6, 7) and i have matrix m, what's an efficient way of access m[1, 2], m[4, 6], m[5, 7] like of course m[a, b] = is not going to do, but what's an expression that will allow me to have that list? Thanks! -- View this message in context: http://www.nabb

[R] Matrix manipulation

2007-02-13 Thread yoooooo
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c("YOO1", "YOO2", "YOO3") # ie # YOO1 YOO2 YOO3 #[1,]124 HELLO <- NULL HELLO$YOO1="BOO" HELLO$YOO2="BOO" HELLO$YOO3="HOO" and I want a matrix that will sum my categorization.. how can I do it efficiently with

[R] Matrix manipulation

2007-02-13 Thread yoooooo
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c("YOO1", "YOO2", "YOO3") # ie # YOO1 YOO2 YOO3 #[1,]124 HELLO <- NULL HELLO$YOO1="BOO" HELLO$YOO2="BOO" HELLO$YOO3="HOO" and I want a matrix that will sum my categorization.. how can I do it efficiently with