Re: [R] updating contents of a package

2009-02-08 Thread Tobias Verbeke
Hi Markus, I read through the Writing R Extensions document and am able to now create my own packages/libraries which so far are just well documented collections of my own R functions. I use package.skeleton() and the tools package to build these packages. However, it is not clear to me how to

Re: [R] updating contents of a package

2009-02-08 Thread Dieter Menne
Markus Loecher markus.loecher at gmail.com writes: I read through the Writing R Extensions document and am able to now create my own packages/libraries which so far are just well documented collections of my own R functions. I use package.skeleton() and the tools package to build these

Re: [R] Problems installing/updating packages in Linux

2009-02-08 Thread Paul Heinrich Dietrich
Thanks for the replies, they are helping. I downloaded the recommended manual, and I'm sure that will help too. When I installed R, I did not (previously) obtain the R-2.8.1.tar.gz, but tried to follow some instructions I found elsewhere online (which apparently weren't right). I did have the

[R] R solve equation

2009-02-08 Thread oryie
Hello! I want to use R to calculate the variable x which is in some eqation, give an example: 3*x-log(x)+1=0, how to solve equation to get the exact x in R? Thank you very much! -- View this message in context: http://www.nabble.com/R-solve-equation-tp21886831p21886831.html Sent from the R

Re: [R] Rmpi Segmentation fault

2009-02-08 Thread Jeff Squyres
Doh! I should have added Paul to the CC of the mail I just sent (I don't know if my mail will go through to r-help since I'm not subscribed)... I'll re-send to Paul. This *appears* to be some deep linker voodoo. Our other thread reveals that this works for 32 bit and not for 64 bit,

[R] Using panel.grid in barchart

2009-02-08 Thread Christopher Jones
Hi all, I'm trying to do an example in Deepayan Sarkar's Lattice book. It involves making a barchart based on the Titanic dataset. I can get the barchart to plot fine; however, when I try to edit panel.grid, I get an error: titan-barchart(Class ~ Freq | Age + Sex, data =

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
I've read some of R's literature on Linux, including the R Admin manual, and didn't find it very useful, which is probably my own limitation. But I did finally manage to get it working well. I'm posting this to help others. The following worked when installing R 2.8.1 on Ubuntu 8.04 Hardy

[R] paraPen in gam [mgcv 1.4-1.1] and centering constraints

2009-02-08 Thread Daniel Sabanés Bové
Dear Mr. Simon Wood, dear list members, I am trying to fit a similar model with gam from mgcv compared to what I did with BayesX, and have discovered the relatively new possibility of incorporating user-defined matrices for quadratic penalties on parametric terms using the paraPen argument. This

Re: [R] Plot multiple lines, same plot, different axes?

2009-02-08 Thread Steve
Ron It's Steve Thornton here from Leicester in the UK. Hope you are well. I got your card and newsletter. It sounds like you're still travelling. If you get this E-mail please mail me back as I'd like to keep in touch. I've been trying to find your E-mail but you seem to have several. My

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
I've read some of R's literature on Linux, including the R Admin manual, and didn't find it very useful, which is probably my own limitation. But I did finally manage to get it working well. I'm posting this to help others. The following worked when installing R 2.8.1 on Ubuntu 8.04 Hardy

Re: [R] installing R on Ubuntu

2009-02-08 Thread cruz
nice:) The next step is to install Emacs, because we need a editor as we code, we need to run the line as we go, so here is a very good guide for the complete starter: http://www.stat.rice.edu/~helpdesk/tutorial/ess.html The official ESS manual does not bother to go into this brief, I can't

Re: [R] R solve equation

2009-02-08 Thread Paul Smith
On Sat, Feb 7, 2009 at 10:20 AM, oryie 43248...@qq.com wrote: I want to use R to calculate the variable x which is in some eqation, give an example: 3*x-log(x)+1=0, how to solve equation to get the exact x in R? You could use uniroot(), but your equation has no real solution. Paul

[R] recursive derivative a list of polynomials

2009-02-08 Thread baptiste auguie
Dear list, This is quite a specific question requiring the package orthopolynom. This package provides a nice implementation of the Legendre polynomials, however I need the associated Legendre polynomial which can be readily expressed in terms of the mth order derivative of the

[R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread John Poulsen
Hello, I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I am trying to specify the response variable, /yseed/, as # of successes out of total

Re: [R] Question about ROCR package

2009-02-08 Thread Tobias Sing
Waverley, you can also use p...@y.values to access the slot (see help(performance-class) for a description of the slots). You might also want have a look at the code for demo(ROCR) and at this slide deck: http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt HTH, Tobias On Sat, Feb 7,

Re: [R] how to make this qq plot in lattice and/or ggplot2

2009-02-08 Thread hadley wickham
On Sat, Feb 7, 2009 at 9:25 PM, Juliet Hannah juliet.han...@gmail.com wrote: Hi Group, Here is some data. p - runif(1000) # sample data groups - rep(c(1,2),each=500) #conditioning variable mydata - cbind(p,groups) n - length(p) u - (1:n)/(n + 1) # uniform distribution reference for qqplot

Re: [R] updating contents of a package

2009-02-08 Thread hadley wickham
On Sun, Feb 8, 2009 at 4:26 AM, Dieter Menne dieter.me...@menne-biomed.de wrote: Markus Loecher markus.loecher at gmail.com writes: I read through the Writing R Extensions document and am able to now create my own packages/libraries which so far are just well documented collections of my own

Re: [R] Question about ROCR package

2009-02-08 Thread Frank E Harrell Jr
Tobias Sing wrote: Waverley, you can also use p...@y.values to access the slot (see help(performance-class) for a description of the slots). You might also want have a look at the code for demo(ROCR) and at this slide deck: http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt HTH,

Re: [R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread Dieter Menne
John Poulsen jpoulsen at zoo.ufl.edu writes: I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I am trying to specify the response variable,

Re: [R] Using panel.grid in barchart

2009-02-08 Thread Dieter Menne
Christopher Jones c_jones at MIT.EDU writes: I'm trying to do an example in Deepayan Sarkar's Lattice book. It involves making a barchart based on the Titanic dataset. I can get the barchart to plot fine; however, when I try to edit panel.grid, I get an error:

Re: [R] Using panel.grid in barchart

2009-02-08 Thread David Winsemius
On Feb 7, 2009, at 8:05 PM, Christopher Jones wrote: Hi all, I'm trying to do an example in Deepayan Sarkar's Lattice book. It involves making a barchart based on the Titanic dataset. I can get the barchart to plot fine; however, when I try to edit panel.grid, I get an error:

[R] Modifying forestplot function in rmeta

2009-02-08 Thread Gerard Smits
All, I am using the forestplot function in rmeta. I was able to modify the x axis range by commenting out one line and feeding it two new parameters (I wanted to set zero as the axis start point). #xrange - c(max(min(lower, na.rm = TRUE), clip[1]), min(max(upper, na.rm = TRUE), clip[2]))

Re: [R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread David Winsemius
On Feb 8, 2009, at 10:46 AM, Dieter Menne wrote: John Poulsen jpoulsen at zoo.ufl.edu writes: I am trying to run a logistic regression with random effects on proportional data in glmmBUGS. I am a newcomer to this package, and wondered if anyone could help me specify the model correctly. I

Re: [R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread David Winsemius
Installing the glmmBUGS package and a bit of experimentation produces this minor modification of your code that seems to run without error. It's back to you to see if the output is sensible. library(glmmBUGS) Newdat-data.frame(Newtree=rep(1:3, each=20), Newsect=rep(c(a,b), each=10),

[R] How to print console output statements from within script or function?

2009-02-08 Thread Suresh_FSFM
Dear R-Experts, Seek your help. I am calling say 20 functions one by one in one script. To reach the end, it takes approximately one hour. While R is performing calculations, I would like to print console output statements to track the progress.(e.g. Result of function-1 is done) Note: I have

Re: [R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread Dieter Menne
David Winsemius dwinsemius at comcast.net writes: Newdat-data.frame(Newtree=rep(1:3, each=20), Newsect=rep(c(a,b), each=10), Newdist=rep(1:5, 2), y=rpois(60,2), tot=rep(c(14,12,10,8,6), 12)) yseed-cbind(Newdat$y, Newdat$tot) mod-glmmBUGS(yseed~Newsect + Newdist,

[R] Tip for performance improvement while handling huge data?

2009-02-08 Thread Suresh_FSFM
Hello All, For certain calculations, I have to handle a dataframe with say 10 million rows and multiple columns of different datatypes. When I try to perform calculations on certain elements in each row, the program just goes in busy mode for really long time. To avoid this busy mode, I split

Re: [R] How to print console output statements from within script or function?

2009-02-08 Thread jim holtman
Are you running on Windows? Is our output buffered? Are you using the 'flush.console' function to make sure the output gets to the console if buffereing is enabled? On Sun, Feb 8, 2009 at 12:33 PM, Suresh_FSFM suresh.ghals...@gmail.com wrote: Dear R-Experts, Seek your help. I am calling

[R] library vegan - cca - versus CANOCO

2009-02-08 Thread Alberto Maceda
Hi R users, I have two data matrix, one with community data and another with environmental data. Prior to preform the CCA, I have used PCA to select some environmental variables and to avoid redundance information. The result is that I have 4 environmental variables and my community data matrix

Re: [R] Tip for performance improvement while handling huge data?

2009-02-08 Thread Philipp Pagel
For certain calculations, I have to handle a dataframe with say 10 million rows and multiple columns of different datatypes. When I try to perform calculations on certain elements in each row, the program just goes in busy mode for really long time. To avoid this busy mode, I split the

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
I would really like to see a good introduction to Emacs, and will check out that link. I know that Emacs and ESS are supposed to be the best, and are the most customizable. The reason I put the R Commander GUI instead of Emacs/ESS is because in my first attempt to get R on Ubuntu Linux, I did

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Amendment/Question #1: When I update.packages(), it tells me that rgl fails to update because it can't find X11. Again, I'm pretty new to Ubuntu, but it looks like X comes with Ubuntu. I see files under /etc/X11. Does this mean I need to download x11-common (or x11-apps, or x11-utils, or one

[R] Error installing rjags in Ubuntu Linux

2009-02-08 Thread Paul Heinrich Dietrich
Hi, Here is a step-by-step guide to exactly how I've installed R in Ubuntu: http://www.nabble.com/installing-R-on-Ubuntu-td10025949.html#a21894865 Regarding rjags, here is what happened: This webpage (http://yusung.blogspot.com/2009/01/install-jags-and-rjags-in-fedora.html) recommends logging

[R] Fwd: Using panel.grid in barchart

2009-02-08 Thread Christopher Jones
I forgot to reply this to the list; my (apparently quite trivial) problem is solved. Begin forwarded message: It just doesn't seem to do anything useful when I do it. If the goal were to learn how not to annoy the syntax engine in R, I guess the goal was accomplished, but not much beyond

Re: [R] installing R on Ubuntu

2009-02-08 Thread Tom Backer Johnsen
Dear me. Is the installation of R under Ubuntu really that complex? I have a dual boot machine (Linux / Windows, where I use the latter the most) and have plans to try R under Linux, but have not done so yet. Is it possible to simplify the Linux install procedure to make R more accessible

Re: [R] installing R on Ubuntu

2009-02-08 Thread Joseph Magagnoli
When I use ubuntu linux and R I use komodo edit with an R extension. Seems really similar to tinn-R. http://www.sciviews.org/SciViews-K/index.html joe On Sun, Feb 8, 2009 at 8:56 AM, Paul Heinrich Dietrich paul.heinrich.dietr...@gmail.com wrote: Amendment/Question #1: When I

Re: [R] installing R on Ubuntu

2009-02-08 Thread Prof Brian Ripley
On Sun, 8 Feb 2009, Paul Heinrich Dietrich wrote: I would really like to see a good introduction to Emacs, and will check out that link. I know that Emacs and ESS are supposed to be the best, and are the most customizable. The reason I put the R Commander GUI instead of Emacs/ESS is because

Re: [R] installing R on Ubuntu

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 20:36, Tom Backer Johnsen wrote: | Dear me. Is the installation of R under Ubuntu really that complex? I | have a dual boot machine (Linux / Windows, where I use the latter the | most) and have plans to try R under Linux, but have not done so yet. Is | it possible to

Re: [R] installing R on Ubuntu

2009-02-08 Thread Dirk Eddelbuettel
Paul, Very nice! Comments below. On 7 February 2009 at 17:12, Paul Heinrich Dietrich wrote: | | I've read some of R's literature on Linux, including the R Admin manual, and | didn't find it very useful, which is probably my own limitation. But I did | finally manage to get it working well.

Re: [R] installing R on Ubuntu

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 06:56, Paul Heinrich Dietrich wrote: | | Amendment/Question #1: | | When I update.packages(), it tells me that rgl fails to update because it | can't find X11. Again, I'm pretty new to Ubuntu, but it looks like X comes | with Ubuntu. I see files under /etc/X11. Does

Re: [R] How to print console output statements from within script or function?

2009-02-08 Thread Suresh_FSFM
Yes. I am running R on windows. However, I did not understand your question Is our output buffered? No. I did not use flush.console function. Suppose I am handling dataframe with 10 million rows, and performing some calculations using For loop from row 1 to end, then where should I use this

Re: [R] Tip for performance improvement while handling huge data?

2009-02-08 Thread Suresh_FSFM
Ok. Thank you. As of now, vectorization option is feasible. Was not sure to handle this way. would try. Regards, Suresh Philipp Pagel-5 wrote: For certain calculations, I have to handle a dataframe with say 10 million rows and multiple columns of different datatypes. When I try to

[R] general inverse solver?

2009-02-08 Thread Carl Witthoft
Just wondering if there's an R package which does tricks similar to what TK!Solver does. TK!Solver, for those not lucky enough to have found it, basically allows one to define a bunch of equations, assign values to an arbitrary subset of the variables, from which it calculates (either

Re: [R] installing R on Ubuntu

2009-02-08 Thread John Fox
Dear Paul, I haven't read everything in this thread, but have a couple of comments relative to using the R Commander: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Paul Heinrich Dietrich Sent: February-08-09 9:08 AM To:

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Hi Dirk, Sorry, I'm not trying to drag out the installation process here, but just trying to get it to work right in Linux. Dirk Eddelbuettel wrote: What is wrong with $ sudo apt-get install r-cran-rgl I tried this suggestion, and here was the terminal output: r-cran-rgl is

[R] Embedding fonts in pdf graphics

2009-02-08 Thread Frank E Harrell Jr
I know you can control this with the cairo package, but I was hoping that embedFonts( ) would provide a way to embed all fonts, not just the non-standard ones. I'm submitting graphics to a journal that wants Helvetica and Helvetica-bold embedded for some reason. Is there an easy way to do

Re: [R] Error installing rjags in Ubuntu Linux

2009-02-08 Thread Frank E Harrell Jr
See if this helps:http://biostat.mc.vanderbilt.edu/JAGSInstallExample Improvements to this approach are welcomed. Frank Paul Heinrich Dietrich wrote: Hi, Here is a step-by-step guide to exactly how I've installed R in Ubuntu:

Re: [R] How to print console output statements from within script or function?

2009-02-08 Thread jim holtman
On the Misc tab there is an option called Buffered Output. I usually have this unchecked so that output will go immediately to the console. You should put the flush.console() after the print functions that you want to appear on the console. If you are marking progress with the print statement,

Re: [R] Embedding fonts in pdf graphics

2009-02-08 Thread Gábor Csárdi
Although I haven't tried it, but this might work: http://colinm.org/tips/latex Best, Gabor On Sun, Feb 8, 2009 at 9:18 PM, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: I know you can control this with the cairo package, but I was hoping that embedFonts( ) would provide a way to embed all

Re: [R] glmmBUGS: logistic regression on proportional data

2009-02-08 Thread David Winsemius
Just make sure it IS help. Following Dieter's advice I checked to see what format VR use to pass data as success/failure and now wonder if the the proper invocation following their examples on pg 49, 59 and 134 in http://cran.r-project.org/web/packages/VR/VR.pdf would be: mod-glmmBUGS(

Re: [R] Embedding fonts in pdf graphics

2009-02-08 Thread Prof Brian Ripley
On Sun, 8 Feb 2009, Frank E Harrell Jr wrote: I know you can control this with the cairo package, but I was hoping that embedFonts( ) would provide a way to embed all fonts, not just the non-standard ones. I'm submitting graphics to a journal that wants Helvetica and Helvetica-bold embedded

Re: [R] general inverse solver?

2009-02-08 Thread Gabor Grothendieck
Check out the Ryacas package. There is a vignette with some examples. On Sun, Feb 8, 2009 at 3:11 PM, Carl Witthoft c...@witthoft.com wrote: Just wondering if there's an R package which does tricks similar to what TK!Solver does. TK!Solver, for those not lucky enough to have found it,

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
I'm definitely out of my league here, but I think that if someone only enters that code in an Ubuntu system, then they will have only the latest version of R in Ubuntu, which at this time I think is 2.6.2, instead of 2.8.1, and Ubuntu only maintains a handful of packages, instead of 1600+ right

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Thanks John, I appreciate it. It sounds like Emacs is the way to go for an editor. John Fox-6 wrote: Dear Paul, I haven't read everything in this thread, but have a couple of comments relative to using the R Commander: ... The R Commander isn't meant to be a serious programming

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Hi Dirk, Many thanks for your insight. Dirk Eddelbuettel wrote: Paul, Very nice! Comments below. On 7 February 2009 at 17:12, Paul Heinrich Dietrich wrote: | | I've read some of R's literature on Linux, including the R Admin manual, and | didn't find it very useful, which is

Re: [R] Error installing rjags in Ubuntu Linux

2009-02-08 Thread Paul Heinrich Dietrich
Hi Frank, Thanks for the suggestion. It looks like that is an excellent way to install JAGS. I've also been successful with installing JAGS, but cannot get the rjags package to install, so I can call JAGS from R. Any suggestions there? Thanks. Frank E Harrell Jr wrote: See if this

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Hi Brian, I'm sure buttons are slow compared to keystrokes, but how do you stop R with a keystroke, similar to the R interface in Windows? Thanks. Sorry about the JGS-JGR goof...just coming across too many new things right now. JGR it is. -- View this message in context:

Re: [R] installing R on Ubuntu

2009-02-08 Thread Tom Backer Johnsen
Dirk Eddelbuettel wrote: On 8 February 2009 at 20:36, Tom Backer Johnsen wrote: | Dear me. Is the installation of R under Ubuntu really that complex? I | have a dual boot machine (Linux / Windows, where I use the latter the | most) and have plans to try R under Linux, but have not done so

[R] Initial values of the parameters of a garch-Model

2009-02-08 Thread Thomas Schwander
Dear all, I'm using R 2.8.1 under Windows Vista on a dual core 2,4 GhZ with 4 GB of RAM. I'm trying to reproduce a result out of Analysis of Financial Time Series by Ruey Tsay. In R I'm using the fGarch library. After fitting a ar(3)-garch(1,1)-model

Re: [R] installing R on Ubuntu

2009-02-08 Thread Jonathan Baron
For those reading this thread who might be thinking of trying Linux, I would like to point out that, with Fedora (another distribution of Linux aside from Ubuntu), the repositories are up to date, and there seems to be someone connected with Fedora (as well as the R core team) who is interested in

Re: [R] installing R on Ubuntu

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 12:14, Paul Heinrich Dietrich wrote: | Hi Dirk, | Sorry, I'm not trying to drag out the installation process here, but just | trying to get it to work right in Linux. | | | Dirk Eddelbuettel wrote: | | What is wrong with | | $ sudo apt-get install r-cran-rgl |

Re: [R] installing R on Ubuntu

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 12:23, Paul Heinrich Dietrich wrote: | | I'm definitely out of my league here, but I think that if someone only enters | that code in an Ubuntu system, then they will have only the latest version | of R in Ubuntu, which at this time I think is 2.6.2, instead of 2.8.1, and

Re: [R] Error installing rjags in Ubuntu Linux

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 14:22, Frank E Harrell Jr wrote: | See if this helps:http://biostat.mc.vanderbilt.edu/JAGSInstallExample | | Improvements to this approach are welcomed. Also note that sudo apt-get install jags works on Debian (so far only unstable) and will probably work for the

Re: [R] plm package

2009-02-08 Thread Achim Zeileis
Kirsten: additionally to the question below, how I can get data into the pdata.frame format, I have another question: Why doen't R recognize the function plm.data (), when calling it? I did load the plm library before... I suspect that you have an outdated version of plm and possibly R as

Re: [R] R solve equation

2009-02-08 Thread rafamoral
If you are looking for a solution to a polynomial equation with imaginary solutions you could use polyroot(). Example: To solve the equation: 1 + x + x^3 + 2*x^4 = 0 you create a vector with the coefficients of x and use polyroot: z - matrix(c(1,1,0,1,2), ncol=1) polyroot(z) Also try ?polyroot

[R] Best 64-bit Linux distro for R?

2009-02-08 Thread Stavros Macrakis
The R FAQ is very helpful about installing R on various Linuxes, but doesn't seem to discuss the advantages of one distribution over another. I am new to Linux (though not to Unix!), and would appreciate some guidance from those with experience. I plan to set up a headless Linux x86 server for

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread krzysztof . sakrejda
I'm running R on the current version of Gentoo and had no trouble building the complete system required. The only problem is that the current version in portage (stable) is 2.7.2. I would be curious to hear what insightful responses you get. Best, Krzysztof Sent via BlackBerry by ATT

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 17:27, Stavros Macrakis wrote: | The R FAQ is very helpful about installing R on various Linuxes, but doesn't | seem to discuss the advantages of one distribution over another. I am new | to Linux (though not to Unix!), and would appreciate some guidance from | those with

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Shige Song
I have been compiling R from source tar balls on Ubuntu for many years and like the way Ubuntu manges dependency. Best, Shige On Sun, Feb 8, 2009 at 3:09 PM, Dirk Eddelbuettel e...@debian.org wrote: On 8 February 2009 at 17:27, Stavros Macrakis wrote: | The R FAQ is very helpful about

[R] Help on computing Geary's C statistic to test for Spatial Autocorrelation

2009-02-08 Thread R User
Dear Users: I have been trying to use the geary.test() function in *R*, but am having slight difficulty understanding how I am to apply it in my context. I have 2 matrices: 1) *n x p* matrix of *n* observations with *p* measurements each. It may be noted that this matrix has a spatial dimension

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Stavros Macrakis
Thanks for your help! You mention amd64 -- I didn't realize that AMD and Intel were different for this purpose. I will actually be installing on a VM on top of an Intel box. Does that change things? Thanks again, -s [[alternative HTML version deleted]]

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 18:35, Stavros Macrakis wrote: | Thanks for your help! | | You mention amd64 -- I didn't realize that AMD and Intel were different for | this purpose. I will actually be installing on a VM on top of an Intel | box. Does that change things? No. And they are not different.

[R] sapply

2009-02-08 Thread glenn
Newbie question sorry (have tried the help pages I promise) I have a dataframe (date,stockprice) say and looking how I might get the return of: dataframe (difference in days, change in stock price) using sapply - I require a very simple function and don't really want to go down the zoo and

Re: [R] sapply

2009-02-08 Thread Sundar Dorai-Raj
I'm not sure what you really want, so perhaps a simple example would help (i.e. what a sample of the input looks like and what the output you need looks like). My guess would be sapply(df, diff) but again, I'm not sure. --sundar On Sun, Feb 8, 2009 at 4:24 PM, glenn

Re: [R] sapply

2009-02-08 Thread glenn
Bullseye ! thanks a lot Sundar -Original Message- From: Sundar Dorai-Raj [mailto:sdorai...@gmail.com] Sent: 09 February 2009 00:31 To: glenn Cc: r-help@r-project.org Subject: Re: [R] sapply I'm not sure what you really want, so perhaps a simple example would help (i.e. what a sample of

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread M. Edward (Ed) Borasky
On Sun, Feb 8, 2009 at 3:54 PM, Dirk Eddelbuettel e...@debian.org wrote: To differentiate the then-different chips of AMD from Intels Itanium ia64 line, the 'amd64' name was introduced. These days ia64 is ancient history and we're all amd64 users. By the way, if you decide to go with Ubuntu

Re: [R] Error installing rjags in Ubuntu Linux

2009-02-08 Thread Frank E Harrell Jr
Paul Heinrich Dietrich wrote: Hi Frank, Thanks for the suggestion. It looks like that is an excellent way to install JAGS. I've also been successful with installing JAGS, but cannot get the rjags package to install, so I can call JAGS from R. Any suggestions there? Thanks. After getting

[R] subsets problem

2009-02-08 Thread glenn
Help with this much appreciated I have a large dataframe that I would like to subset where the constraint Test1 - subset(df, date == uniques[[1]]), where uniques is a list of dates that must be matched to create Test1. I would like to perform an operation on Test1 that results in a

Re: [R] subsets problem

2009-02-08 Thread Sundar Dorai-Raj
you can try lapply(lapply(uniques, function(x) subset(df, date == x)), myfun) or possibly more accurate (subset may be finicky due to scoping): lapply(lapply(uniques, function(x) df[df$date == x, ]), myfun) or use ?split lapply(split(df, df$date), myfun) HTH, --sundar On Sun, Feb 8, 2009

Re: [R] how to delete specific rows in a data frame where the first column matches any string from a list

2009-02-08 Thread Andrew Choens
Interesting. Thanks. On Sat, 2009-02-07 at 02:36 +0100, Wacek Kusnierczyk wrote: Andrew Choens wrote: I regularly deal with a similar pattern at work. People send me these big long .csv files and I have to run them through some pattern analysis to decide which rows I keep and which rows I

Re: [R] subsets problem

2009-02-08 Thread David Winsemius
See if this illustration using the %in% operator within subset() is helpful: df1 - data.frame(x=1:10, y=sample(c(a,b,c), 10, replace=TRUE) ) uniques - list(a,b) Test1 - subset(df1, y %in% uniques) Test1 x y 1 1 b 4 4 a 5 5 b 6 6 b 7 7 a 9 9 a Next question of course is whether you

Re: [R] beanplot, Error in shapiro.test(x)

2009-02-08 Thread Peter Kampstra
On Fri, 6 Feb 2009, Markus Loecher wrote: I am getting the following error message: Error in shapiro.test(x) : sample size must be between 3 and 5000 I am not even sure why the shapiro.test is being used, but is there any workaround ? Yes, use log=. (ex: beanplot(rnorm(5001),log=) ) The

Re: [R] installing R on Ubuntu

2009-02-08 Thread Paul Heinrich Dietrich
Thanks Dirk, it worked like a charm :) Dirk Eddelbuettel wrote: On 8 February 2009 at 12:14, Paul Heinrich Dietrich wrote: | Hi Dirk, | Sorry, I'm not trying to drag out the installation process here, but just | trying to get it to work right in Linux. | | | Dirk Eddelbuettel

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Girish A.R.
So, does that mean I can install Ubuntu 64-bit amd64 server edition on a machine that has Intel Xeon processor without much of a problem? Thanks, -Girish On Feb 9, 5:33 am, M. Edward (Ed) Borasky zzn...@gmail.com wrote: On Sun, Feb 8, 2009 at 3:54 PM, Dirk Eddelbuettel e...@debian.org wrote:

Re: [R] Cluster analysis question

2009-02-08 Thread Stephen Weigand
Dan, I don't use the flexclust package, but if I understand your question correctly, you can use your own distance measure to calculate a dissimilarity matrix and pass that to, e.g., agnes() in the cluster package. Stephen On Fri, Feb 6, 2009 at 9:42 AM, Jim Porzak jpor...@gmail.com wrote:

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Dirk Eddelbuettel
On 8 February 2009 at 18:29, Girish A.R. wrote: | So, does that mean I can install Ubuntu 64-bit amd64 server edition | on a machine that has Intel Xeon processor without much of a problem? Yes it should work. You have a choice of 32bit and 64bit OS for these. Background details are at

[R] question about mean

2009-02-08 Thread cindy Guo
Hello, everyone, I have a matrix like following: school value A .1 A .2 A .15 A .2 B .3 B .5 C .3 C .3 C .4 C .5 C .6 C .9 C 1 I want to get the mean 'value' for each 'school',

Re: [R] question about mean

2009-02-08 Thread Bill.Venables
Store your 'matrix' as a data frame. Call it 'SchoolVals' say. Then SchoolMeans - with(SchoolVals, tapply(value, school, mean)) should do it. If you have missing values you want to ignore: SchoolMeans - with(SchoolVals, tapply(value, school, mean, na.rm = TRUE)) Bill Venables

Re: [R] question about mean

2009-02-08 Thread Rolf Turner
On 9/02/2009, at 4:40 PM, bill.venab...@csiro.au wrote: Store your 'matrix' as a data frame. Surely it's a data frame already, since ``school'' is character or factor, and ``value'' is (must be?) numeric. People have this unfortunate predilection to refer to data frames

Re: [R] Best 64-bit Linux distro for R?

2009-02-08 Thread Girish A.R.
Thanks, All! -Girish On Feb 9, 7:49 am, Dirk Eddelbuettel e...@debian.org wrote: On 8 February 2009 at 18:29, Girish A.R. wrote: | So, does that mean I can install Ubuntu 64-bit amd64 server edition | on a machine that has Intel Xeon processor without much of a problem? Yes it should work.