[R] fractional ranks

2008-06-06 Thread array chip
Hi, is there a function to calculate fractional ranks? Thanks __ 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,

[R] R: Securities earning covariance

2008-06-06 Thread ANGELO.LINARDI
Thank you for your very fast response. I just tried to use the zoo package, after having read the vignettes, but I get this error message: Warning messages: 1: In x$DAY : $ operator is invalid for atomic vectors, returning NULL 2: In x$EARNINGS : $ operator is invalid for atomic vectors,

[R] R: Securities earning covariance

2008-06-06 Thread ANGELO.LINARDI
It works perfectly, thank you so much. Now I will try to put teh results into a suitable form (a data frame like this): SEC_ID.xSEC_ID.yEARN_COV Thank you again Angelo Linardi -Messaggio originale- Da: Patrick Burns [mailto:[EMAIL PROTECTED] Inviato: giovedì 5 giugno

Re: [R] Getting R and x11 to work

2008-06-06 Thread Prof Brian Ripley
On Fri, 6 Jun 2008, Rick Bilonick wrote: I'm using Suse Linux Enterprise Desktop 10.2 (SP2) on an HP 2133 (x86) mini-notebook. (There apparently are a LOT of bugs in 10.1!) I downloaded R-base from the openSuse 10.2 repository and was (finally) able to install it (after installing blas and

[R] Multiple comment.char under read.table

2008-06-06 Thread Gundala Viswanath
Hi all, Suppose I want to read a text file with read.table. It containt lines to be skipped that begins with ! and ^. Is there a way to include this two values in the read.table function? I tried this but doesn't seem to work. dat - read.table(mydata.txt, comment.char = c(!,^) , na.strings =

Re: [R] power of a multiway ANOVA

2008-06-06 Thread biologeeks
thank you ! :) 2008/6/5 Rolf Turner [EMAIL PROTECTED]: On 6/06/2008, at 1:08 AM, biologeeks wrote: dear all, in the package pwr , there is the fonction power.anova.test which permit to obtain the power for a one-way ANOVA...but I'm looking for a way to compute the power of a multiway

[R] How can I display a characters table ?

2008-06-06 Thread Maura E Monville
I would like to generate a graphics text. I have a 67x2 table with 5-character string in col 1 and 2-character string in col 2. Is it possible to make such a table appear on a graphics or a message-box pop-up window ? Thank you so much. -- Maura E.M

Re: [R] (baseline) logistic regression + gof functions?

2008-06-06 Thread David Barron
Hi, I'm not sure why you think glm doesn't provide goodness of fit tests. Have a look at anova.glm and summary.glm. All the functions you mention can deal with multiple predictors. multinom deals with non-binary data. lrm will deal with ordinal data as well as binary. polr (in the MASS

[R] modifying tbrm function

2008-06-06 Thread DAVID ARTETA GARCIA
Hi, I haven´t much experience on writing functions and would like to modify the simple tbrm() function from package dplR in order to save the weights that it produces. I have tried using the superassignment operator as explained in the R intro, but is this the right way to save a

[R] Lattice: key does not accept German umlaute

2008-06-06 Thread Bernd Weiss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 library(lattice) ## works as expected xyplot(1~1, key = list(text = list(c(Maenner ## works as expected xyplot(1~1, key = list(text = list(c(Maenner))), xlab = M\344nner) ## gives an error xyplot(1~1, key = list(text = list(c(M\344nner Is

[R] which question

2008-06-06 Thread Eleni Christodoulou
Hello list, I was trying to select a column of a data frame using the *which* command. I was actually selecting the rows of the data frame using *which, *and then displayed a certain column of it. The command that I was using is: sequence=*mydata*[*which*(human[,3] %in% genes.sam.names),*9*] In

Re: [R] label outliers in geom_boxplot (ggplot2)

2008-06-06 Thread Mihalicza Péter
hadley wickham írta: 2008/5/27 Mihalicza Péter [EMAIL PROTECTED]: Dear List and Hadley, I would like to have a boxplot with ggplot2 and have the outlier values labelled with their name attribute. So I did library(ggplot2) dat=data.frame(num=rep(1,20), val=c(runif(18),3,3.5),

Re: [R] (baseline) logistic regression + gof functions?

2008-06-06 Thread Wim Bertels
Thanks for the quick reply David, so far this sums up to: # logistic on binary data lrm combined with resid(model,'gof') # logistic on raw binary data glm with gof using anova.glm (i think that anova.glm only makes sence on grouped binary data, not on the raw binary data..) (so what is the

[R] bartlett-test

2008-06-06 Thread hanen
i a have transformed my data to data frame named df with only column names(no rownames).each column represnt one sample with 3 observations (in deed nrow(df)=3, and ncol(df)=92).in order to check homoskedasticity of variance of my 92 samples i do: bartlett.test(df) it work and give me a

[R] Agreggating data using external aggregation rules

2008-06-06 Thread ANGELO.LINARDI
Dear R experts, I am currently facing a tricky problem which I have read a lot about in the various R mailing lists without finding exactly what I need. I have a big data frame DF (about 2,000,000 rows) with 7 columns being variables and 1 being a measure (using reshape package nomeclature).

Re: [R] Lattice: key does not accept German umlaute

2008-06-06 Thread Bernd Weiss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bernd Weiss schrieb: | library(lattice) | | ## works as expected | xyplot(1~1, key = list(text = list(c(Maenner | | ## works as expected | xyplot(1~1, key = list(text = list(c(Maenner))), xlab = M\344nner) | | ## gives an error | xyplot(1~1, key

Re: [R] which question

2008-06-06 Thread Dieter Menne
Eleni Christodoulou elenichri at gmail.com writes: I was trying to select a column of a data frame using the *which* command. I was actually selecting the rows of the data frame using *which, *and then displayed a certain column of it. The command that I was using is:

Re: [R] vector comparison

2008-06-06 Thread Jim Lemon
Karin Lagesen wrote: I know this is fairly basic, but I must have somehow missed it in the manuals. I have two vectors, often of unequal length. I would like to compare them for identity. Order of elements do not matter, but they should contain the same. I.e: I want this kind of comparison:

Re: [R] Y values below the X plot

2008-06-06 Thread Jim Lemon
jpardila wrote: Dear List, I am creating a plot and I want to insert the tabular data below the X axis. I mean for every value of X I want to show the value in Y as a table below the plot. I think the attached image gives an idea of what I mean by this. Below is the code i am using now... but

Re: [R] Lattice: key does not accept German umlaute

2008-06-06 Thread Prof Brian Ripley
Well, you failed to give the 'at a minimum information' asked for in the posting guide, and \344 is locale-specific. I see 'MingW32' below, so will guess this is German-language Windows. We don't know what the error was, either. It works correctly for me in CP1252 with R-patched, and gives

Re: [R] Lattice: key does not accept German umlaute

2008-06-06 Thread Dieter Menne
Bernd Weiss bernd.weiss at uni-koeln.de writes: library(lattice) ## gives an error xyplot(1~1, key = list(text = list(c(M\344nner Is this a bug? You forgot to mention your version, assuming 2.7.0 unpatched. Corrected by Brian Ripley in developer version (and probably also in patched)

[R] Merging two dataframes

2008-06-06 Thread Michael Pearmain
Hi All, Newbie question for you all but i have been looking at the archieves and the help dtuff to get a rough idea of what i want to do I would like to merge two dataframes together based on a keyed variable in one dataframe linking to the other dataframe. Only some of the cases will match but

Re: [R] Lattice: key does not accept German umlaute

2008-06-06 Thread Bernd Weiss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prof Brian Ripley schrieb: [...] | It works correctly for me in CP1252 with R-patched, and gives an error | in 2.7.0 (and works in 2.6.2). I think it was fixed as side effect of | | oRare string width calculations in package grid were not

[R] boxplot changes fontsize of labels

2008-06-06 Thread Sebastian Merz
Hi all! So far I learned some R but finilizing my plots so they look publishable seems not to be possible. I set up some boxplots. Everything works well but when I put more then two of them in one plot the labels of the axes appear smaller than the normal font size. x - rnorm(30) y -

[R] simple data question

2008-06-06 Thread stephen sefick
if I wanted to use a name for a column with two words say Dick Cheney and George Bush can I put these in quotes Dick Cheney and George Bush to get them to read into R using both read.table and read.zoo to recognize this. thanks Stephen -- Let's not spend our time and resources thinking about

Re: [R] Multiple comment.char under read.table

2008-06-06 Thread Daniel Folkinshteyn
according to the helpfile, comment only takes one character, so you'll have to do some 'magic' :) i'd suggest to first run mydata through sed, and replace one of the comment chars with another, then run read.table with the one comment char that remains. sed -e 's/^\^/!/' mydata.txt

Re: [R] simple data question

2008-06-06 Thread Daniel Folkinshteyn
should work - don't even have to put them in quotes, if your field separator is not space. why don't you just try it and see what comes out? :) on 06/06/2008 08:43 AM stephen sefick said the following: if I wanted to use a name for a column with two words say Dick Cheney and George Bush can I

Re: [R] R: Securities earning covariance

2008-06-06 Thread Gabor Grothendieck
Update your version of zoo to the latest one. On Fri, Jun 6, 2008 at 3:18 AM, [EMAIL PROTECTED] wrote: Thank you for your very fast response. I just tried to use the zoo package, after having read the vignettes, but I get this error message: Warning messages: 1: In x$DAY : $ operator is

Re: [R] Merging two dataframes

2008-06-06 Thread Daniel Folkinshteyn
try this: FullData - merge(ETC, SURVEY, by.x = ord, by.y = uid, all.x = T, all.y = F) on 06/06/2008 07:30 AM Michael Pearmain said the following: Hi All, Newbie question for you all but i have been looking at the archieves and the help dtuff to get a rough idea of what i want to do I would

[R] request: a class having max frequency

2008-06-06 Thread Muhammad Azam
Dear R users I have a very basic question. I tried but could not find the required result. using dat - pima f - table(dat[,9]) f 0 1 500 268 i want to find that class say 0 having maximum frequency i.e 500. I used which.max(f) which provide 0 1 How can i get only the 0. Thanks and

Re: [R] request: a class having max frequency

2008-06-06 Thread Chuck Cleland
On 6/6/2008 9:14 AM, Muhammad Azam wrote: Dear R users I have a very basic question. I tried but could not find the required result. using dat - pima f - table(dat[,9]) f 0 1 500 268 i want to find that class say 0 having maximum frequency i.e 500. I used which.max(f) which provide

Re: [R] request: a class having max frequency

2008-06-06 Thread Michael Conklin
The 0 is the name of the item and the 1 is the index in f of the maximum class. (since f is a table, and the first element of the table is the maximum, which.max returns a 1) So, if you just want to know which class is maximum you can say names(which.max(f)) Michael Conklin Chief

Re: [R] request: a class having max frequency

2008-06-06 Thread Daniel Folkinshteyn
names(f)[which.max(f)] on 06/06/2008 09:14 AM Muhammad Azam said the following: Dear R users I have a very basic question. I tried but could not find the required result. using dat - pima f - table(dat[,9]) f 0 1 500 268 i want to find that class say 0 having maximum frequency i.e

Re: [R] Problem in executing R on server

2008-06-06 Thread Erik Iverson
Run the sessionInfo() command in R, as the posting guide requests! Jason Lee wrote: Hi, I am not too sure its what you meant :- Below is the closest data for each session from top PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 26792 jason 25 0 283m 199m 2620 R 100

Re: [R] request: a class having max frequency

2008-06-06 Thread Chuck Cleland
On 6/6/2008 9:18 AM, Chuck Cleland wrote: On 6/6/2008 9:14 AM, Muhammad Azam wrote: Dear R users I have a very basic question. I tried but could not find the required result. using dat - pima f - table(dat[,9]) f 0 1 500 268 i want to find that class say 0 having maximum frequency

[R] Manipulating DataSets

2008-06-06 Thread Neil Gupta
Hello R-users, I have a very simple problem I wanted to solve. I have a large dataset as such: Lag X.Symbol Time TickType ReferenceNumber Price Size X.Symbol.1 Time.1 TickType.1 ReferenceNumber.1 1 ES 3:ESZ7.GB 08:30:00B74390987 151075 44 3:ESZ7.GB08:30:00 A

Re: [R] Agreggating data using external aggregation rules

2008-06-06 Thread Gabor Grothendieck
Use aggregate() for aggregation and use indexing or subset() for selection. Alternately try the sqldf package: http://sqldf.googlecode.com which allows one to perform SQL operations on data frames. On Fri, Jun 6, 2008 at 6:12 AM, [EMAIL PROTECTED] wrote: Dear R experts, I am currently facing

[R] Subsetting to unique values

2008-06-06 Thread Emslie, Paul [Ctr]
I want to take the first row of each unique ID value from a data frame. For instance ddTable - data.frame(Id=c(1,1,2,2),name=c(Paul,Joe,Bob,Larry)) I want a dataset that is Id Name 1 Paul 2 Bob unique(ddTable) Will give me all 4 rows, and unique(ddTable$Id) Will give me

Re: [R] How can I display a characters table ?

2008-06-06 Thread Katharine Mullen
Dear Maura, try the function textplot from the package gplots. you can say textplot(yourmatrix) and get a plot of a character matrix. On Fri, 6 Jun 2008, Maura E Monville wrote: I would like to generate a graphics text. I have a 67x2 table with 5-character string in col 1 and 2-character

[R] Giovanna Jonalasinio è fuori ufficio, I' m away

2008-06-06 Thread Giovanna . Jonalasinio
Risposta automatica dal 06/06/08 fino al 14/06/08 I'm going to have limited access to my email untill the 14th of june 2008 Avrò accesso limitato all'email fino al 14 giugno 2008 [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Subsetting to unique values

2008-06-06 Thread Chuck Cleland
On 6/6/2008 9:35 AM, Emslie, Paul [Ctr] wrote: I want to take the first row of each unique ID value from a data frame. For instance ddTable - data.frame(Id=c(1,1,2,2),name=c(Paul,Joe,Bob,Larry)) I want a dataset that is Id Name 1 Paul 2 Bob unique(ddTable) Will give me all 4

Re: [R] simple data question

2008-06-06 Thread stephen sefick
Good point. Thanks On Fri, Jun 6, 2008 at 9:05 AM, Daniel Folkinshteyn [EMAIL PROTECTED] wrote: should work - don't even have to put them in quotes, if your field separator is not space. why don't you just try it and see what comes out? :) on 06/06/2008 08:43 AM stephen sefick said the

Re: [R] Subsetting to unique values

2008-06-06 Thread John Kane
I don't have R on this machine but will this work. myrows - unique(ddTable[,1]) unis - ddTable(myrows, ] --- On Fri, 6/6/08, Emslie, Paul [Ctr] [EMAIL PROTECTED] wrote: From: Emslie, Paul [Ctr] [EMAIL PROTECTED] Subject: [R] Subsetting to unique values To: r-help@r-project.org Received:

Re: [R] which question

2008-06-06 Thread Eleni Christodoulou
An example is: symbol=human[which(human[,3] %in% genes.sam.names),8] The data* human* and *genes.sam.names* are attached. The result of the above command is: symbol [1] CCL18 MARCO SYT13 [4] FOXC1 CDH3 [7] CA12 CELSR1

Re: [R] Subsetting to unique values

2008-06-06 Thread Adrian Dusa
Emslie, Paul [Ctr] emsliep at atac.mil writes: I want to take the first row of each unique ID value from a data frame. For instance ddTable - data.frame(Id=c(1,1,2,2),name=c(Paul,Joe,Bob,Larry)) I want a dataset that is IdName 1 Paul 2 Bob unique(ddTable) Will give

Re: [R] Java to R interface

2008-06-06 Thread Dumblauskas, Jerry
Try and make sure that R is in your windows Path variable I got your message when I first did this, but when I did the about it then worked... == Please access the attached hyperlink for an important electronic

[R] Startup speed for a lengthy script

2008-06-06 Thread Dennis Fisher
Colleagues, Several days ago, I wrote to the list about a lengthy delay in startup of a a script. I will start with a brief summary of that email. I have a 10,000 line script of which the final 3000 lines constitute a function. The script contains time-markers (cat(date()) to that I can

Re: [R] which question

2008-06-06 Thread Richard Pearson
I didn't get any attached data, but my suspicion here is that you have somehow got RefSeq IDs in column 8 of human, as well as the gene symbols. Did you read this data in from a text file? Eleni Christodoulou wrote: An example is: symbol=human[which(human[,3] %in% genes.sam.names),8] The

Re: [R] Merging two dataframes

2008-06-06 Thread Daniel Folkinshteyn
cool. :) yea, the argument names are by.x and by.y, so your by.etc were ignored in the black hole of arguments passed to other methods on 06/06/2008 09:11 AM Michael Pearmain said the following: Thanks Works perfectly. Was the problem due to me putting by.survey and by.etc rather than by.y

[R] fit.variogram sgeostat error

2008-06-06 Thread Alexys Herleym Rodriguez Avellaneda
Hi, When i do the next line it work fine: fit.spherical(var, 0, 2.6, 250, type='c', iterations=10, tolerance=1e-06, echo=FALSE, plot.it=T, weighted=TRUE, delta=0.1, verbose=TRUE) But, i use the next and send one error: fit.variogram(spherical, var, nugget=0, sill=2.6, range=250, plot.it=TRUE,

[R] lsmeans

2008-06-06 Thread Dani Valverde
Hello, I have the next function call: lme(fixed=Error ~ Temperature * Tumour ,random = ~1|ID, data=error_DB) which returns an lme object. I am interested on carrying out some kind of lsmeans on the data returned, but I cannot find any function to do this in R. I'have seen the effect()

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
Anybody have any thoughts on this? Please? :) on 06/05/2008 02:09 PM Daniel Folkinshteyn said the following: Hi everyone! I have a question about data processing efficiency. My data are as follows: I have a data set on quarterly institutional ownership of equities; some of them have had

[R] store filename

2008-06-06 Thread DAVID ARTETA GARCIA
__ 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] label outliers in geom_boxplot (ggplot2)

2008-06-06 Thread hadley wickham
It's too obvious, so I am positive that there is a good reason for not doing this, but still: why is it not possible, to have an outlier output in stat_boxplot that can be used at geom_text()? Something like this, with upper: dat=data.frame(num=rep(1,20), val=c(runif(18),3,3.5),

Re: [R] Improving data processing efficiency

2008-06-06 Thread Patrick Burns
One thing that is likely to speed the code significantly is if you create 'result' to be its final size and then subscript into it. Something like: result[i, ] - bestpeer (though I'm not sure if 'i' is the proper index). Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696

Re: [R] Improving data processing efficiency

2008-06-06 Thread Gabor Grothendieck
Try reading the posting guide before posting. On Fri, Jun 6, 2008 at 11:12 AM, Daniel Folkinshteyn [EMAIL PROTECTED] wrote: Anybody have any thoughts on this? Please? :) on 06/05/2008 02:09 PM Daniel Folkinshteyn said the following: Hi everyone! I have a question about data processing

[R] Store filename

2008-06-06 Thread DAVID ARTETA GARCIA
Hi list, Is it possible to save the name of a filename automatically when reading it using read.table() or some other function? My aim is to create then an output table with the name of the original table with a suffix like _out example: mydata = read.table(Run224_v2_060308.txt, sep = \t,

[R] where to download BRugs?

2008-06-06 Thread Nanye Long
Hi all, Does anyone know where to download the BRugs package? I did not find it on r-project website. Thanks. NL __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
i did! what did i miss? on 06/06/2008 11:45 AM Gabor Grothendieck said the following: Try reading the posting guide before posting. On Fri, Jun 6, 2008 at 11:12 AM, Daniel Folkinshteyn [EMAIL PROTECTED] wrote: Anybody have any thoughts on this? Please? :) on 06/05/2008 02:09 PM Daniel

[R] How to force two regression coefficients to be equal but opposite in sign?

2008-06-06 Thread Woolner, Keith
Is there a way to set up a regression in R that forces two coefficients to be equal but opposite in sign? I'm trying to setup a model where a subject appears in a pair of environments where a measurement X is made. There are a total of 5 environments, one of which is a baseline. But each

Re: [R] Improving data processing efficiency

2008-06-06 Thread Gabor Grothendieck
Its summarized in the last line to r-help. Note reproducible and minimal. On Fri, Jun 6, 2008 at 12:03 PM, Daniel Folkinshteyn [EMAIL PROTECTED] wrote: i did! what did i miss? on 06/06/2008 11:45 AM Gabor Grothendieck said the following: Try reading the posting guide before posting. On

Re: [R] Improving data processing efficiency

2008-06-06 Thread Gabor Grothendieck
That is the last line of every message to r-help. On Fri, Jun 6, 2008 at 12:05 PM, Gabor Grothendieck [EMAIL PROTECTED] wrote: Its summarized in the last line to r-help. Note reproducible and minimal. On Fri, Jun 6, 2008 at 12:03 PM, Daniel Folkinshteyn [EMAIL PROTECTED] wrote: i did!

Re: [R] Store filename

2008-06-06 Thread Daniel Folkinshteyn
well, where are you getting the filename in the first place? are you looping over a list of filenames that comes from somewhere? generally, for concatenating strings, look at function 'paste': write.table(myoutput, paste(myfilename,_out.txt, sep=''),sep=\t) on 06/06/2008 11:51 AM DAVID ARTETA

Re: [R] Store filename

2008-06-06 Thread Henrique Dallazuanna
You can write your own function, something about like this: read.table2 - function(file, ...) { x - read.table(file, ...) attributes(x)[[file_name]] - file return(x) } mydata - read.table2(Run224_v2_060308.txt, sep = \t, header = TRUE) myfile - attr(x, file_name) On Fri, Jun 6, 2008 at 12:51

[R] fit.contrast error

2008-06-06 Thread Dani Valverde
Hello, I am trying to perform a fit.contrast() on a lme object with this code: attach(error_DB) model_temperature - lme(Error ~ Temperature, data = error_DB,random=~1|ID) summary(model_temperature) fit.contrast(model_temperature, Temperature, c(-1,1), conf.int=0.95 ) detach(error_DB) but I got

Re: [R] where to download BRugs?

2008-06-06 Thread Uwe Ligges
Dear NL. BRugs is available from the CRAN extras repository hosted by Brian Ripley. install.packages(BRugs) should install it as before (for R-2.7.x), if you have not changed the list of default repositories. Best wishes, Uwe Ligges Nanye Long wrote: Hi all, Does anyone know where to

Re: [R] choosing an appropriate linear model

2008-06-06 Thread Levi Waldron
Perhaps this was too big a question, so I'll ask something shorter: I have fit a linear model, and want to use its prediction intervals to calculate the sum of many individual predictions. 1) Some of the lower prediction intervals are negative, which is non-sensical. Should I just set all

[R] reorder breaking by half

2008-06-06 Thread avilella
Hi, I want to reorder the colors given by rainbow(7) so that the last half move to the first 4. For example: ci=rainbow(7) ci [1] #FFFF #FFDB00FF #49FF00FF #00FF92FF #0092 #4900 [7] #FF00DBFF I would like #FFFF #FFDB00FF #49FF00FF to be at the end of ci, and the rest to be at

Re: [R] rmeta package: metaplot or forestplot of meta-analysis under DSL (ramdon) model

2008-06-06 Thread Thomas Lumley
The package has a plot() method for random-effects meta-analyses as well, either those produced by meta.DSL or meta.summaries. There are examples on the help page for meta.DSL. -thomas On Tue, 27 May 2008, Shi, Jiajun [BSD] - KNP wrote: Dear all, I could not draw a forest plot

[R] Problem with subset

2008-06-06 Thread Luca Mortarini
Hi, I am new to R and i am looking for a way to extract a subset from a vector. I have a vector of number oscillating around zero (a decreasing autocorrelation function) and i would like to extract only the first positive part of the function (from zero lag to the lag where the function

Re: [R] Manipulating DataSets

2008-06-06 Thread Charles C. Berry
On Fri, 6 Jun 2008, Neil Gupta wrote: Hello R-users, I have a very simple problem I wanted to solve. I have a large dataset as such: Lag X.Symbol Time TickType ReferenceNumber Price Size X.Symbol.1 Time.1 TickType.1 ReferenceNumber.1 1 ES 3:ESZ7.GB 08:30:00B74390987

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
i thought since the function code (which i provided in full) was pretty short, it would be reasonably easy to just read the code and see what it's doing. but ok, so... i am attaching a zip file, with a small sample of the data set (tab delimited), and the function code, in a zip file (posting

Re: [R] lsmeans

2008-06-06 Thread John Fox
Dear Dani, I intend at some point to extend the effects package to linear and generalized linear mixed-effects models, probably using lmer() rather than lme(), but as you discovered, it doesn't handle these models now. It wouldn't be hard, however, to do the computations yourself, using the

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
thanks for the tip! i'll try that and see how big of a difference that makes... if i am not sure what exactly the size will be, am i better off making it larger, and then later stripping off the blank rows, or making it smaller, and appending the missing rows? on 06/06/2008 11:44 AM Patrick

Re: [R] reorder breaking by half

2008-06-06 Thread Daniel Folkinshteyn
ci = rainbow(7)[c(4:7, 1:3)] on 06/06/2008 01:02 PM avilella said the following: Hi, I want to reorder the colors given by rainbow(7) so that the last half move to the first 4. For example: ci=rainbow(7) ci [1] #FFFF #FFDB00FF #49FF00FF #00FF92FF #0092 #4900 [7] #FF00DBFF I

Re: [R] Improving data processing efficiency

2008-06-06 Thread Gabor Grothendieck
I think the posting guide may not be clear enough and have suggested that it be clarified. Hopefully this better communicates what is required and why in a shorter amount of space: https://stat.ethz.ch/pipermail/r-devel/2008-June/049891.html On Fri, Jun 6, 2008 at 1:25 PM, Daniel Folkinshteyn

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
just in case, uploaded it to the server, you can get the zip file i mentioned here: http://astro.temple.edu/~dfolkins/helplistfiles.zip on 06/06/2008 01:25 PM Daniel Folkinshteyn said the following: i thought since the function code (which i provided in full) was pretty short, it would be

Re: [R] How to force two regression coefficients to be equal but opposite in sign?

2008-06-06 Thread Greg Snow
One simple way is to do something like: fit - lm(y ~ I(x1-x2) + x3, data=mydata) The first coeficient (after the intercept) will be the slope for x1, the slope for x2 will be the negative of that. This model is nested in the fuller model with x1 and x2 fit seperately and you can therefore

Re: [R] where to download BRugs?

2008-06-06 Thread Prof Brian Ripley
On Fri, 6 Jun 2008, Nanye Long wrote: Hi all, Does anyone know where to download the BRugs package? I did not find it on r-project website. Thanks. It is Windows-only, and you download it from 'CRAN (extras)' which is part of the default repository set on Windows versions of R. So

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
Ok, sorry about the zip, then. :) Thanks for taking the trouble to clue me in as to the best posting procedure! well, here's a dput-ed version of the small data subset you can use for testing. below that, an updated version of the function, with extra explanatory comments, and producing an

Re: [R] Subsetting to unique values

2008-06-06 Thread jim holtman
The interesting thing about R is that there are several ways to skin the cat; here is yet another solution: do.call(rbind, by(ddTable, ddTable$Id, function(z) z[1,,drop=FALSE])) Id name 1 1 Paul 2 2 Bob On Fri, Jun 6, 2008 at 9:35 AM, Emslie, Paul [Ctr] [EMAIL PROTECTED] wrote: I want

Re: [R] ggplot questions

2008-06-06 Thread Thompson, David (MNR)
Thanx Thierry, Suggestion #1 had no effect. I have been playing with variants on #2 along the way. DaveT. -Original Message- From: ONKELINX, Thierry [mailto:[EMAIL PROTECTED] Sent: June 6, 2008 04:02 AM To: Thompson, David (MNR); hadley wickham Cc: r-help@r-project.org Subject: RE: [R]

Re: [R] Improving data processing efficiency

2008-06-06 Thread Patrick Burns
That is going to be situation dependent, but if you have a reasonable upper bound, then that will be much easier and not far from optimal. If you pick the possibly too small route, then increasing the size in largish junks is much better than adding a row at a time. Pat Daniel Folkinshteyn

Re: [R] Problem with subset

2008-06-06 Thread Charles C. Berry
On Fri, 6 Jun 2008, Luca Mortarini wrote: Hi, I am new to R and i am looking for a way to extract a subset from a vector. I have a vector of number oscillating around zero (a decreasing autocorrelation function) and i would like to extract only the first positive part of the function (from

Re: [R] ggplot questions

2008-06-06 Thread hadley wickham
Does the difference have something to do with ggplot() using ranges derived from the data? When I modify my original 'test' dataframe with two extra rows as defined below, I get expected results in both versions. Order shouldn't matter - and if it's making a difference, that's a bug. But I'm

Re: [R] Improving data processing efficiency

2008-06-06 Thread Daniel Folkinshteyn
Cool, I do have an upper bound, so I'll try it and how much of a speedboost it gives me. Thanks for the suggestion! on 06/06/2008 02:03 PM Patrick Burns said the following: That is going to be situation dependent, but if you have a reasonable upper bound, then that will be much easier and not

Re: [R] boxplot changes fontsize of labels

2008-06-06 Thread Prof Brian Ripley
Please read the help for par(mfrow)! AFAICS this is nothing to do with boxplot(). In a layout with exactly two rows and columns the base value of 'cex' is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is

Re: [R] Improving data processing efficiency

2008-06-06 Thread Greg Snow
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns Sent: Friday, June 06, 2008 12:04 PM To: Daniel Folkinshteyn Cc: r-help@r-project.org Subject: Re: [R] Improving data processing efficiency That is going to be situation dependent, but

Re: [R] Improving data processing efficiency

2008-06-06 Thread Gabor Grothendieck
On Fri, Jun 6, 2008 at 2:28 PM, Greg Snow [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns Sent: Friday, June 06, 2008 12:04 PM To: Daniel Folkinshteyn Cc: r-help@r-project.org Subject: Re: [R] Improving data

[R] Random Forest

2008-06-06 Thread Bertrand Pub Michel
Hello Is there exists a package for multivariate random forest, namely for multivariate response data ? It seems to be impossible with the randomForest function and I did not find any information about this in the help pages ... Thank you for your help Bertrand

[R] mean

2008-06-06 Thread Marco Chiapello
Hi, I have a simple question. If I have a table and I want to have the mean for each row, how can I do?! Es: c1 c2 c3 mean 1 12 13 14 ?? 2 15 24 10 ?? ... Thanks, Marco __

Re: [R] Java to R interface

2008-06-06 Thread madhura
The path to R/bin is in the Windows PATH variable. Yet I get this error. On Jun 6, 10:37 am, Dumblauskas, Jerry [EMAIL PROTECTED] suisse.com wrote: Try and make sure that R is in your windows Path variable I got your message when I first did this, but when I did the about it then worked...

[R] R (D)COM Server not working on windows domain account

2008-06-06 Thread Evans_CSHL
I have installed R (D)COM on a (windows) machine that is part of a windows domain. if I run the test file in a local (log into this machine) administrative account it works fine. If I run the test file on a domain account with administrative rights it will not connect to the server, even is I

[R] Random Forest and for multivariate response data

2008-06-06 Thread Bertrand Pub Michel
Hello Is there exists a package for multivariate random forest, namely for multivariate response data ? It seems to be impossible with the randomForest function and I did not find any information about this in the help pages ... Thank you for your help Bertrand

Re: [R] Improving data processing efficiency

2008-06-06 Thread Patrick Burns
My guess is that number 2 is closest to the mark. Typing too fast is unfortunately not one of my habitual attributes. Gabor Grothendieck wrote: On Fri, Jun 6, 2008 at 2:28 PM, Greg Snow [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

[R] Random Forest

2008-06-06 Thread Bertrand Pub Michel
Hello Is there exists a package for multivariate random forest, namely for multivariate response data ? It seems to be impossible with the randomForest function and I did not find any information about this in the help pages ... Thank you for your help Bertrand

[R] R + Linux

2008-06-06 Thread steven wilson
Dear all; I'm planning to install Linux on my computer to run R (I'm bored of W..XP). However, I haven't used Linux before and I would appreciate, if possible, suggestions/comments about what could be the best option install, say Fedora, Ubuntu or OpenSuse which to my impression are the most

Re: [R] Improving data processing efficiency

2008-06-06 Thread Greg Snow
-Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2008 12:33 PM To: Greg Snow Cc: Patrick Burns; Daniel Folkinshteyn; r-help@r-project.org Subject: Re: [R] Improving data processing efficiency On Fri, Jun 6, 2008 at 2:28 PM, Greg Snow

Re: [R] mean

2008-06-06 Thread ctu
TABLE-matrix(data=c(12,13,14,15,24,10),byrow=T,nrow=2,ncol=3) TABLE [,1] [,2] [,3] [1,] 12 13 14 [2,] 15 24 10 apply(TABLE,1,mean) [1] 13.0 16.3 Chunhao Quoting Marco Chiapello [EMAIL PROTECTED]: Hi, I have a simple question. If I have a table and I want to have

Re: [R] ggplot questions

2008-06-06 Thread Thompson, David (MNR)
OK, The original ggplot() construct (below) on the following two dataframes (test1, test2) generate different outputs, which I have attached. The output that I expect is that shown in test2.png. My expectations are that I have set the plotting limits with 'scale_x_continuous(lim = c(0, 360)) +

  1   2   >