[R] Compiling R 2.4.0 in ubuntu/linux

2006-10-11 Thread T C
I'm not sure if this is the place to post this question, but, I am having trouble compiling the source code. I do have a suitable C compiler and f2c but I get this error when I run ./configure configure: error: --with-readline=yes (default) and headers/libs are not available Any ideas? Thanks. _

[R] whole object approach for nested loops

2006-09-12 Thread T C
I have the following code that I am trying to execute using the whole object approach and get rid of the for loop. I have looked at the manual and seached the database for examples or similar questions with no luck. The following example works without any problems. for (j in 1:186) { entropy.cogp[

Re: [R] matrix logic

2006-01-11 Thread t c
Uwe, FYI: I tried: "data3 <- ifelse(is.na(data1), data2, data1)" It seems to me that data3 is an array of length 100. I do NOT end up with a dataset of 5 columns and 20 rows. Uwe Ligges <[EMAIL PROTECTED]> wrote: Tom wrote: > On Tue, 10 Jan 2006 20:25:23 -0500, r user wrote:

[R] transpose a matrix?

2005-12-21 Thread t c
I have a data set in the following format: x<-data.frame(id=c(‘a’,’b’,’c’),’2005-01-15’=c(100,225,425), ’2005-02-23’=c(1100,2325,4525)) > x id X2005.01.15 X2005.02.23 1 a 1001100 2 b 2252325 3 c 4254525 I want:

[R] given a mid-month date, get the month-end date

2005-12-19 Thread t c
I have a vector of dates. I wish to find the month end date for each. Any suggestions? e.g. For 12/15/05, I want 12/31/05, For 10/15/1995, I want 10/31/1995, etc __ [[alternative HTML version deleted]] __

[R] creating a subset of a dataset using ifelse statement?

2005-12-13 Thread t c
I am using R in a Microsoft Windows environment. I have a dataset called “mp1b”. I have a variable called h. h can take a value from -1 to 5. If h <1, I want to create a new dataset called mp2 that is the same as mp1b: “mp2<-mp1b” If h > 0, I want to set create a data

[R] vector memory exhausted (limit reached?)" error message while loading saved workspace

2005-11-25 Thread t c
I am running R 2.2.0 in a Windows XP environment. During my previous r session, I saved my workspace as “20051123b.Rdata”. (On disk, it is ~1.25 gb.) I have launched R. (I have the following in my application shortcut <--max-mem-size=4000M>, and although it may not be necessary, I have also

[R] running out of memory while running a VERY LARGE regression

2005-11-22 Thread t c
I am running a VERY LARGE regression (many factors, many rows of data) using LM. I think I have my memory set as high as possible. ( I ran "memory.limit(size = 4000)") Is there anything I can do? ( FYI, I "think" I have removed all data I am not using, and I "think" I have only the d

Re: [R] percent rank by an index key?

2005-11-07 Thread t c
5,AL,6,32772 2005,TX,7,77477 2005,AL,7,98282 2005,TX,8,73346 2005,AL,8,38943 2005,TX,9,38947 2005,AL,9,70195 2005,TX,10,23890 2005,AL,10,84020 2000,TX,11,na 2005,AL,11,null Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: t c wrote: > What is the easiest way to cal

[R] percent rank by an index key?

2005-11-01 Thread t c
What is the easiest way to calculate a percent rank “by” an index key? Foe example, I have a dataset with 3 fields: Year,State, Income , I wish to calculate the rank, by year, by state. I also wish to calculate the “percent rank”, where I define percent rank as rank/n. (n i

[R] getting last 2 charcters of a string, other "text" functions?

2005-10-31 Thread t c
I wish to obtain the right-most n characters of a character string? What is the appropriate function? - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https://st

[R] getting an aggregate count, and adding it to a dataset as a new column

2005-10-18 Thread t c
I have the data below in a dataset called “test3”. What is the easiest way to get a count, by date, of all numerical values of var1, and to then add this count to the “test3 “dataset as a new “column”? What I have: date,var1,cat 1/1/2005,5,a 1/1/2005,12,a 1/1/2005,44,b 2/1/2005,1,

Re: [R] Correlation, by date, of two variables?

2005-10-12 Thread t c
I have a dataset with three variables: date, var1, var2 How can I calculate the correlation, by date, between var1 and var2? e.g. datevar1var2 1/1/200154 1/1/200185 1/1/200197 2/1/200172 2/1/200121 2/1/200146 3/1/200135

[R] R training/"tutor"

2005-10-12 Thread t c
Can anyone recommend a place to post/look for someone to help me with R? I'm looking for a consultant/trainer/tutor that knows R well, and can help me over the phone or via email. Thanks. - [[alternative HTML version deleted]]

[R] functions available for use with aggregate?

2005-10-12 Thread t c
What are the functions available for use with “aggregate”? Where can a reference to them be found? - [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing list https:/

Re: [R] adding 1 month to a date

2005-10-12 Thread t c
#x27; must be of length 1" Thanks. Gabor Grothendieck <[EMAIL PROTECTED]> wrote: Try this: seq(as.Date("2005-01-15"), len = 2, by = "month")[2] or here is another approach: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/61570.html On 10/11/05, t c wrote: &g

Re: [R] adding 1 month to a date

2005-10-12 Thread t c
#x27; must be of length 1" Thanks. Gabor Grothendieck <[EMAIL PROTECTED]> wrote: Try this: seq(as.Date("2005-01-15"), len = 2, by = "month")[2] or here is another approach: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/61570.html On 10/11/05, t c wrote: &g

[R] adding 1 month to a date

2005-10-11 Thread t c
Within an R dataset, I have a date field called “date_”. (The dates are in the format “-MM-DD”, e.g. “1995-12-01”.) How can I add or subtract “1 month” from this date, to get “1996-01-01” or “ “1995-11-01”. - [[alternative H