Re: [R] Google, hard disc drives and R

2007-02-19 Thread Dieter Menne
Tim Churches tchur at optushome.com.au writes: A recent paper from Google Labs, interesting in many respects, not the least the exclusive use of R for data analysis and graphics (alas not cited in the approved manner): http://labs.google.com/papers/disk_failures.pdf ... For all of you

[R] Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit(2SLS) without this error message !!!!!!!!!!!!!

2007-02-19 Thread Guillermo Julián San Martín
Hi, I am trying to obtain the heteroskedasticity consitent standard errors (HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or systemfit: tsls library (sem) Reg2SLS -tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D) summary (Reg2SLS) systemfit

[R] Data frame: how to create list of row max?

2007-02-19 Thread Johannes Graumann
Dear all, Can anyone please shed some light onto how to do this? This will give me all intensity columsn in my data frame: intensityindeces - grep(^Intensity,names(dataframe),value=TRUE) This will give me the maximum intensity for the first row: intensityone - max(dataframe[1,intensityindeces])

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread Chuck Cleland
Johannes Graumann wrote: Dear all, Can anyone please shed some light onto how to do this? This will give me all intensity columsn in my data frame: intensityindeces - grep(^Intensity,names(dataframe),value=TRUE) This will give me the maximum intensity for the first row: intensityone -

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread Prof Brian Ripley
do.call(pmax, dataframe[,intensityindeces]) if I understand you aright. On Mon, 19 Feb 2007, Johannes Graumann wrote: Dear all, Can anyone please shed some light onto how to do this? This will give me all intensity columsn in my data frame: intensityindeces -

Re: [R] printing intermediate lines while in a function

2007-02-19 Thread Bart Joosen
I've read the Windows FAQ, I tried flush.console(), but then it continious with the calculations, while I didn't select a range for the graphics. Is there a possibility to wait for user input or something? Thanks Bart From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC:

Re: [R] help with loop over data frame

2007-02-19 Thread Gabor Grothendieck
Try this: DF[c(FALSE, tail(DF$Open, -1) head(DF$High, -1)), ] or using zoo objects just compare the Open to the reverse lag of the High. Lines - Date Open HighLowClose 1/15/2000 10 11 8 10 1/16/2000 12 12 10 11 1/17/2000 12 12 10

[R] Rcpp

2007-02-19 Thread jacinthe
Hello all, using GNU WinGW under Windows, I have experimented with the Rcpp package. Powerful package. Many thanks to Dominick Samperi. Now I have tried to modify the RccpExample.cpp file in order to calculate two different moving averages, a simple moving average and an exponential moving

[R] problem in reading TOMS observed ASCII data file

2007-02-19 Thread Yogesh Tiwari
Hello R Users, I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS ozone(O3). AOD data is on 1x1 grid and O3 data is on 5x5 grid. First I want to read AOD and O3 as it is and then I want to regrid AOD on 5x5 grid as O3. Reading is first problem. FIRST PROBLEM READING AOD:

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread Johannes Graumann
On Monday 19 February 2007 11:53, Prof Brian Ripley wrote: do.call(pmax, dataframe[,intensityindeces]) Thank you very much for your help! Any idea why do.call(pmax,list(na.rm=TRUE),dataframe[,intensityindeces]) would give me Error in if (quote) { : argument is not interpretable as logical In

[R] need help in reading TOMS observed ASCII data file

2007-02-19 Thread Yogesh Tiwari
Hello R Users, I am new to R. I have two data sets i) TOMS aerosol optical depth(AOD) and ii) TOMS ozone(O3). AOD data is on 1x1 grid and O3 data is on 5x5 grid. First I want to read AOD and O3 as it is and then I want to regrid AOD on 5x5 grid as O3. Reading is first problem. FIRST

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread Prof Brian Ripley
On Mon, 19 Feb 2007, Johannes Graumann wrote: On Monday 19 February 2007 11:53, Prof Brian Ripley wrote: do.call(pmax, dataframe[,intensityindeces]) Thank you very much for your help! Any idea why do.call(pmax,list(na.rm=TRUE),dataframe[,intensityindeces]) You want something like

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread David Barron
Try do.call(pmax,c(dataframe[,intensityindices],na.rm=TRUE)) This is like the second example in the help page for do.call On 19/02/07, Johannes Graumann [EMAIL PROTECTED] wrote: On Monday 19 February 2007 11:53, Prof Brian Ripley wrote: do.call(pmax, dataframe[,intensityindeces]) Thank you

Re: [R] Google, hard disc drives and R

2007-02-19 Thread Ben Bolker
Tim Churches tchur at optushome.com.au writes: A recent paper from Google Labs, interesting in many respects, not the least the exclusive use of R for data analysis and graphics (alas not cited in the approved manner): http://labs.google.com/papers/disk_failures.pdf Perhaps some of the

Re: [R] Google, hard disc drives and R

2007-02-19 Thread Roger Bivand
On Mon, 19 Feb 2007, Ben Bolker wrote: Tim Churches tchur at optushome.com.au writes: A recent paper from Google Labs, interesting in many respects, not the least the exclusive use of R for data analysis and graphics (alas not cited in the approved manner):

Re: [R] Ubuntu Linux and X11

2007-02-19 Thread Barry Rowlingson
Oleg Sklyar wrote: The problem occurs after updating from Dapper to Edgy. Dapper had font paths: /usr/share/X11/fonts and Edgy, to make the whole font system unified, moved X11 fonts to /usr/share/fonts/X11. Oleg I think I changed the font path in the X config file *and* added a symlink

Re: [R] Data frame: how to create list of row max?

2007-02-19 Thread Johannes Graumann
Thanks to you and Brian Ripley. Quite confusing all this ... Thanks again. Joh On Monday 19 February 2007 13:42, David Barron wrote: Try do.call(pmax,c(dataframe[,intensityindices],na.rm=TRUE)) This is like the second example in the help page for do.call On 19/02/07, Johannes Graumann

[R] categorical column to numeric column

2007-02-19 Thread Shubha Vishwanath Karanth
Hi R, Let 'dd' be a data frame given as: dd=data.frame(aa=c(a,a,b,a,b,b),bb=c(1,1,1,2,3,4)) Now I want to create a column 'g' such that if dd$aa=a then dd$g=1 else dd$g= -1 . So, I gave the below syntax: if((dd$aa)==a) dd$g=1 else dd$g= -1 But I get the error message as:

[R] Calculating the Sharpe ratio

2007-02-19 Thread Bernd Dittmann
Hi useRs, I am trying to calculate the Sharpe ratio with sharpe of the library tseries. The documentation requires the univariate time series to be a portfolio's cumulated returns. In this case, the example given data(EuStockMarkets) dax - log(EuStockMarkets[,FTSE]) is however not the

[R] Start and Restart R over SSH

2007-02-19 Thread Nils Höller
Hi, I have some big calculations in R to be done. Since I can use R on a server with ssh, i was wondering if I can reopen a R Shell after exiting ssh. I don't want to use the batch mode and nohup doesn't work. I want to use something like ssh [EMAIL PROTECTED] R ---do something in R and start

Re: [R] categorical column to numeric column

2007-02-19 Thread ONKELINX, Thierry
Maybe this isn't the most elegant way, but it should work. dd$g - -1 dd$g[dd$aa == a] - 1 Cheers, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature and Forest Cel

Re: [R] categorical column to numeric column

2007-02-19 Thread Duncan Murdoch
On 2/19/2007 8:36 AM, Shubha Vishwanath Karanth wrote: Hi R, Let 'dd' be a data frame given as: dd=data.frame(aa=c(a,a,b,a,b,b),bb=c(1,1,1,2,3,4)) Now I want to create a column 'g' such that if dd$aa=a then dd$g=1 else dd$g= -1 . So, I gave the below syntax:

Re: [R] categorical column to numeric column

2007-02-19 Thread Stephen Tucker
try dd$g - ifelse(dd$aa==a,1,-1) and in general, you can convert categorical data (factors) into integers with as.integer(), though the values will be positive: dd$f - as.integer(factor(dd$aa)) --- Shubha Vishwanath Karanth [EMAIL PROTECTED] wrote: Hi R, Let 'dd' be a data frame

[R] Documenting options specific to a package.

2007-02-19 Thread rolf
If one specifies new options in a package, using the options() function, where does/should one document these new options? E.g. suppose that I put the line options(melvin=42) in a file zzz.R in the R directory of the package source, where the package contains functions foo(), bar(),

[R] User defined split function in rpart

2007-02-19 Thread Tobias Guennel
Maybe I should explain my Problem a little bit more detailed. The rpart package allows for user defined split functions. An example is given in the source/test directory of the package as usersplits.R. The comments say that three functions have to be supplied: 1. The 'evaluation' function. Called

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Douglas Bates
On 2/19/07, Nils Höller [EMAIL PROTECTED] wrote: Hi, I have some big calculations in R to be done. Since I can use R on a server with ssh, i was wondering if I can reopen a R Shell after exiting ssh. I don't want to use the batch mode and nohup doesn't work. I want to use something like

[R] Need to find most likely betas

2007-02-19 Thread Pierre Lapointe
Hello, I have a particular situation where a single wrong observation is impacting the results of a traditional regression to the point that betas become unreliable. I need a way to calculate the most likely betas. Here's an example: set.seed(1) unknownbeta -

Re: [R] categorical column to numeric column

2007-02-19 Thread Philipp Pagel
Let 'dd' be a data frame given as: dd=data.frame(aa=c(a,a,b,a,b,b),bb=c(1,1,1,2,3,4)) Now I want to create a column 'g' such that if dd$aa=a then dd$g=1 else dd$g= -1 . You need to use ifelse instead of the if ... else construction: dd$g = ifelse(dd$a=='a', 1, -1) cu Philipp

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Rainer M Krug
Douglas Bates wrote: On 2/19/07, Nils Höller [EMAIL PROTECTED] wrote: Hi, I have some big calculations in R to be done. Since I can use R on a server with ssh, i was wondering if I can reopen a R Shell after exiting ssh. I don't want to use the batch mode and nohup doesn't work. I want

[R] Another subsetting enigma

2007-02-19 Thread Johannes Graumann
Hello again, I'm trying to do the following: subset(dataframe,list %in% strsplit(dataframe[[Field]],,)) But This returns always the complete dataframe, since the strsplit(dataframe[[Field]],,) is evaluated as one big list for the whole data frame rather than one list per row. How can I have

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Benilton Carvalho
Hi Nils, if the server you're using is *NIX, this is what you can do: example ssh [EMAIL PROTECTED] screen R do what you need in R close the terminal without quitting R ssh [EMAIL PROTECTED] screen -r continue working in R %% end example the problem is if you need X... it works

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Andris Jankevics
Hi, You can take a look at GNU screen programm: http://www.gnu.org/software/screen/ Andris Jankevics On Pirmdiena, 19. Februāris 2007 15:56, Nils Höller wrote: Hi, I have some big calculations in R to be done. Since I can use R on a server with ssh, i was wondering if I can reopen a R Shell

Re: [R] Documenting options specific to a package.

2007-02-19 Thread Prof Brian Ripley
(An R-devel topic, I believe.) I would have documentation for options() in the package that documented the additional options and linked to \code{\link[base]{options}}. Users will be given a choice of which page to view on most systems, so just make sure the title makes clear that this is

Re: [R] Start and Restart R over SSH

2007-02-19 Thread Mark Wardle
Nils Höller wrote: Hi, I have some big calculations in R to be done. Since I can use R on a server with ssh, i was wondering if I can reopen a R Shell after exiting ssh. I don't want to use the batch mode and nohup doesn't work. I want to use something like ssh [EMAIL PROTECTED] R

[R] summary polr

2007-02-19 Thread Paolo Accadia
Hi all, I have a problem to estimate Std. Error and t-value by “polr” in library Mass. They result from the summary of a polr object. I can obtain them working in the R environment with the following statements: temp - polr(formula = formula1, data = data1) coeff - summary(temp),

Re: [R] Start and Restart R over SSH

2007-02-19 Thread David Forrest
On Mon, 19 Feb 2007, Benilton Carvalho wrote: Hi Nils, if the server you're using is *NIX, this is what you can do: example ssh [EMAIL PROTECTED] screen R do what you need in R close the terminal without quitting R ssh [EMAIL PROTECTED] screen -r continue working in R

Re: [R] need help in reading TOMS observed ASCII data file

2007-02-19 Thread jim holtman
Here is a script that will read in you O3 data. It assumes that the data is perfect. You will have to either prescan the data for errors, or add code to catch them. # setup to read your file # this procedure works if the data is 'perfect'; it does not catch errors # 'result' is a list of

Re: [R] advanced plotting

2007-02-19 Thread Greg Snow
try: plot(..., type='p',pch='.',...) you can also use the cex parameter to change the size of points. Also, look at the hexbin package for an alternative. Hope this helps, From: [EMAIL PROTECTED] on behalf of downunder Sent: Tue 11/21/2006 1:55 PM To:

Re: [R] advanced plotting

2007-02-19 Thread jim holtman
Also try the 'hexbin' package which is a good way of showing the 'density' of the points. On 2/19/07, Greg Snow [EMAIL PROTECTED] wrote: try: plot(..., type='p',pch='.',...) you can also use the cex parameter to change the size of points. Also, look at the hexbin package for an

[R] Help for constrained linear regression

2007-02-19 Thread Mesomeris, Spyros [CIR]
Hello, I am trying to run a constrained linear regression of a dependent variable y on three explanatory variables x1, x2, and x3. However, I need to constrain the coefficients of the explanatory variables as follows: b10, b20, and b30. Does anyone know how to do this within the lm/glm

Re: [R] Another subsetting enigma

2007-02-19 Thread Marc Schwartz
On Mon, 2007-02-19 at 16:13 +0100, Johannes Graumann wrote: Hello again, I'm trying to do the following: subset(dataframe,list %in% strsplit(dataframe[[Field]],,)) But This returns always the complete dataframe, since the strsplit(dataframe[[Field]],,) is evaluated as one big list for

Re: [R] Need to find most likely betas

2007-02-19 Thread Marc Schwartz
On Mon, 2007-02-19 at 09:58 -0500, Pierre Lapointe wrote: Hello, I have a particular situation where a single wrong observation is impacting the results of a traditional regression to the point that betas become unreliable. I need a way to calculate the most likely betas. Here's an

Re: [R] Another subsetting enigma

2007-02-19 Thread Johannes Graumann
On Monday 19 February 2007 17:49, jim holtman wrote: have you tried 'unlist(strsplit())'?The 'unlist' will probably give you more values than you have rows, so it would be good if you could explain what it is you are trying to do. I want to isolate a data frame containing all rows of

[R] multiple comparisons

2007-02-19 Thread Petra Finkenbein
Dear R users, I need a professional help: i am a relatively new R user and I am just writing my diploma tesis where I have to conduct some multiple comparison. I am searching a method which include interaction between fixed factors. The following is my model:

Re: [R] Another subsetting enigma

2007-02-19 Thread jim holtman
try this: my.list - c(7,12,3)# set of matching numbers set.seed(1) result - character(40) # create empty vector # create some comma separated data for(i in 1:40) result[i] - paste(sample(1:20,6), collapse=',') # just leave it as a character vector for testing == you can convert your

[R] Lengend function and moving average plot

2007-02-19 Thread amna khan
Sir I am very new user of R. I am not understanding the how to write the plot description in box outside the plot. And how we can plot the moving averages on the plot having regression line and time series. Please guide me in this regard AMINA GC University, Lahore [[alternative HTML

[R] memory management uestion

2007-02-19 Thread Federico Calboli
Hi All, I would like to ask the following. I have an array of data in an objetct, let's say X. I need to use a for loop on the elements of one or more columns of X and I am having a debate with a colleague about the best memory management. I believe that if I do: col1 = X[,1] col2 = X[,2]

Re: [R] Need to find most likely betas

2007-02-19 Thread Pierre Lapointe
Hi Mark, In my example, there has been a regime change at time 25 and I'd like to find a way to discover 1- what has changed and 2- when it did. The problem is all that is observed are the x and y values. unknownbetas are... unknown. If you look at x and y, you can't really tell something has

[R] Help on prediction intervals

2007-02-19 Thread Ricardo Bessa
I am trying to estimate prediction intervals for wind power production, it is a times series of wind power production. I’m using neural networks for prediction, but I need to estimate the uncertainly in the prediction. How can I do this in R if I have a probability distribution that is right

Re: [R] Need to find most likely betas

2007-02-19 Thread Marc Schwartz
Pierre, Unfortunately, I don't have much in the way of hands on experience with these, but conceptually, latent variable analysis/SEM methods seem like they might be apropos. If so, John Fox' SEM package might be of value here. More information here:

[R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Rick Bilonick
I'm running R 2.4.1 (with the latest versions of all packages) on an FC6 32-bit system. When I try to install the rgl package, compilation fails: install.packages(rgl) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL

Re: [R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Oleg Sklyar
Check again your error message: opengl.hpp:24:20: error: GL/glu.h: No such file or directory you need to install mesa-libGLU-devel FC6 version is 6.5.1-7 which will provide development files for glut3. Needless to say the above will probably pool some dependencies and (-devel) means it will

Re: [R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Ranjan Maitra
As the error message indicates, there is no GL/glu.h file installed in the system. If it is, the path is not properly set. % yum provides GL/glu.h on FC6 should give you some clues and tell you what to install, and also whether it should be installed. Ranjan On Mon, 19 Feb 2007 14:35:29

Re: [R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Prof Brian Ripley
You are missing the OpenGLU headers. On FC5 they are in mesa-libGLU-devel From the README: REQUIREMENTS Windowing System (osx/carbon, unix/x11 or win32) OpenGL Library OpenGL Utility Library (GLU) On Mon, 19 Feb 2007, Rick Bilonick wrote: I'm running R 2.4.1 (with the

Re: [R] memory management uestion

2007-02-19 Thread Charles C. Berry
On Mon, 19 Feb 2007, Federico Calboli wrote: Hi All, I would like to ask the following. I have an array of data in an objetct, let's say X. I need to use a for loop on the elements of one or more columns of X and I am having a debate with a colleague about the best memory management.

Re: [R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Rick Bilonick
On Mon, 2007-02-19 at 19:56 +, Oleg Sklyar wrote: Check again your error message: opengl.hpp:24:20: error: GL/glu.h: No such file or directory you need to install mesa-libGLU-devel FC6 version is 6.5.1-7 which will provide development files for glut3. Needless to say the above

Re: [R] memory management uestion

2007-02-19 Thread Federico Calboli
Charles C. Berry wrote: Whoa! You are accessing one ROW at a time. Either way this will tangle up your cache if you have many rows and columns in your orignal data. You might do better to do Y - t( X ) ### use '-' ! for (i in whatever ){ do something using Y[ , i ] } My

Re: [R] Installing Package rgl - Compilation Fails

2007-02-19 Thread Ranjan Maitra
The error is different now. It now cannot find Xext library. Do a yum search on this and install that. yum provides libXext which will give you the package Xext which needs to be installed. You may also need to install the libXext-devel.i386 package. HTH. Ranjan On Mon, 19 Feb 2007

[R] Installing Rmpi on FC5 with lam

2007-02-19 Thread Thomas Mangold
After several trial and error attempts, I managed to install the Rmpi package without error on my Linux machine, running Fedora 5. I installed lam-7.1.2, lam-devel-7.1.2 and R-2.4.1, R-devel-2.4.1 The Package Rmpi_5.0-3.tar.gz, I installed once from within R and once from the command line to

[R] random effect nested within fixed effects (binomial lmer)

2007-02-19 Thread Daniel Ezra Johnson
I have a large dataset where each Subject answered seven similar Items, which are binary yes/no questions. So I've always used Subject and Item random effects in my models, fit with lmer(), e.g.: model-lmer(Response~Race+Gender+...+(1|Subject_ID)+(1| Item_ID),data,binomial) But I recently

Re: [R] Installing Rmpi on FC5 with lam

2007-02-19 Thread Prof Brian Ripley
Is /usr/lib/lam in your ld search path? This sort of message usually means a shared library cannot be found. You do need lam-libs as well according to yum. R CMD ldd /usr/lib/R/library/Rmpi/libs/Rmpi.so /sbin/ldconfig -p | grep /usr/lib/lam might be illuminating. There are various problems

Re: [R] RSNPper SNPinfo and making it handle a vector

2007-02-19 Thread David Duffy
Farrel Buchinsky [EMAIL PROTECTED] wrote: I tried biomaRt library(biomaRt) ensnp = useMart(snp, dataset = hsapiens_snp) snp = getSNP(chromosome = 17, start = 73649033, end = 73679033, mart = ensnp) show(snp) Gave me a nice table but it did not seem to permit starting from the point

[R] bootstrapping Levene's test

2007-02-19 Thread parsons
Hello all, I am low down on the learning curve of R but so far I have had little trouble using most of the packages. However, recently I have run into a wall when it comes to bootstrapping a Levene's test (from the car package) and thought you might be able to help. I have not been able

[R] tree()

2007-02-19 Thread stephenc
Hi I am trying to use tree() to classify movements in a futures contract. My data is like this: diff dip dim adx 1 0100.08650.100.0 2 0 93.185402044.5455 93.18540 3 0 90.30995

[R] How to avoid sort of x values in dotplot?

2007-02-19 Thread Rene Braeckman
I am trying to avoid that dotplot sorts my x-values. They are in the correct order in the data.frame and the connections between the x-y values follows this order, but the placement of the x-values on the x-axis is re-ordered. In the following example, the order should be d1, d8 and d15. However,

Re: [R] How to avoid sort of x values in dotplot?

2007-02-19 Thread Bernd Weiss
Am 19 Feb 2007 um 20:28 hat Rene Braeckman geschrieben: From: Rene Braeckman [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Date sent: Mon, 19 Feb 2007 20:28:01 -0800 Subject:[R] How to avoid sort of x values in dotplot? I am

Re: [R] categorical column to numeric column

2007-02-19 Thread Petr Pikal
Hi On 19 Feb 2007 at 9:11, Duncan Murdoch wrote: Date sent: Mon, 19 Feb 2007 09:11:52 -0500 From: Duncan Murdoch [EMAIL PROTECTED] To: Shubha Vishwanath Karanth [EMAIL PROTECTED] Copies to: r-help R-help@stat.math.ethz.ch Subject:

Re: [R] Any packages for conducting AHP( Analytic Hierarchy Process) data

2007-02-19 Thread Kum-Hoe Hwang
I have so far had the only return to my query from Steve Dutky. I am familir with matrix eigen value and vector manipulation. If you have anything to share with me, it would be good chance for me to follow up the AHP-related thing. Furthermore, I am good at statistics fairely. Thanks for your