Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Poizot Emmanuel
Brian Edward a écrit : Hello all, I have been a R user for about a year now, running on a MS Windows machine. I am in the process of making a complete switch to open-source. Linux is a new world to me. Ubuntu was my selection of the various distributions. Please pardon this very basic

Re: [R] Pooled Covariance Matrix

2006-09-20 Thread Prof Brian Ripley
On Wed, 20 Sep 2006, Murray Jorgensen wrote: I am in a discriminant analysis situation with a frame containing several variables and a grouping factor, if you like: set.seed(200906) exampledf - as.data.frame(matrix(rnorm(50,5,2),nrow=10,ncol=5)) exampledf$Group -

Re: [R] currency or stock trading strategy

2006-09-20 Thread Diethelm Wuertz
Darren Weber wrote: Hi Patrick, thanks for pointing me to your work and Rmetrics. I have a few questions on my mind right now. Do you have methods for automatic download of price quote histories? Rmetrics and tseries I can use python to get XML data on FOREX price quotes from the NYRB and

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Uwe Ligges
Poizot Emmanuel wrote: Brian Edward a écrit : Hello all, I have been a R user for about a year now, running on a MS Windows machine. I am in the process of making a complete switch to open-source. Linux is a new world to me. Ubuntu was my selection of the various distributions.

Re: [R] multiple lines and plot

2006-09-20 Thread David Barron
?lines On 20/09/06, Mauricio Cardeal [EMAIL PROTECTED] wrote: Hi. Please, how can I put together 2 or more lines at the same scatterplot ? Example: measures of protein intake (quantitative) of 4 children over 30 days, by day. How to plot all children at same graphic: Protein X Time ? Is there

Re: [R] about BATCH and parameter file

2006-09-20 Thread Uwe Ligges
XinMeng wrote: Hello sir: I use Rcmd to execute R code,such as : C:\\Program Files\\R\\R-2.2.1\\bin\\Rcmd.exe BATCH globalLowessRun.r globalLowessRun.r is a R function written by myself. But I wanna make the globalLowessRun.r changeable,such as globalLinearRun.r or

[R] tcltk problem

2006-09-20 Thread Dina Said
Hi, I'm using fedora core 3. I downloaded R and installed it. After that, I invoked R by the root user and write the command install.packages(Rcmdr, dependencies=TRUE). This command installs Rcmdr automatically. However, whenever I type library(Rcmdr), it tells me that Loading required

Re: [R] multiple lines and plot

2006-09-20 Thread Uwe Ligges
Mauricio Cardeal wrote: Hi. Please, how can I put together 2 or more lines at the same scatterplot ? Example: measures of protein intake (quantitative) of 4 children over 30 days, by day. How to plot all children at same graphic: Protein X Time ? Is there any command like overlay ? Make

Re: [R] [Rd] Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)

2006-09-20 Thread Antonio, Fabio Di Narzo
Hi. 2006/9/20, Marc Schwartz [EMAIL PROTECTED]: Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file: \documentclass[10pt]{article} \begin{document} This line should print '2':

Re: [R] multiple lines and plot

2006-09-20 Thread Petr Pikal
Hi Have you searched the R-project web? There are plenty of overlay commands. Have you looked at plot help page? The first example shows you how to put line on existing scatterplot. So plot, lines and points are the basics for standard plot customisation. HTH Petr On 19 Sep 2006 at 22:50,

Re: [R] estimating state space with exogenous input in measurement eq.

2006-09-20 Thread Spencer Graves
With a bit more details: RSiteSearch(kalman, functions) produced for me just now 29 hits. The second hit there mentions package 'sspir'. After installing it, I tried help(package=sspir). The Description suggested I try 'help(sspir)', which briefly summarizes what it does and does not

Re: [R] Wilcoxon Rank-Sum Test with Bonferroni's correction

2006-09-20 Thread Spencer Graves
Consider the following: l0 - list(1:3, 4:5) l1 - list(6:8, 9:11, 12:16) WT - mapply(function(x,y)wilcox.test(x,y)$p.value, l0, l1) The simplest Bonferroni for this case would be as follows: length(WT)*WT Greater numerical precision could be obtained as follows:

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Prof Brian Ripley
On Wed, 20 Sep 2006, Uwe Ligges wrote: Poizot Emmanuel wrote: R under linux (Ubuntu or other distributions) is not exactly as it is under windows. Under linux, you have to use a shell (or a terminal) to launch R and use it. The main difference between windows and linux version of R, is

Re: [R] tcltk problem

2006-09-20 Thread Prof Brian Ripley
On Wed, 20 Sep 2006, Dina Said wrote: Hi, I'm using fedora core 3. I downloaded R and installed it. After that, I invoked R by the root user and write the command install.packages(Rcmdr, dependencies=TRUE). This command installs Rcmdr automatically. However, whenever I type library(Rcmdr),

[R] Call for Abstracts: Tools for Intelligent Data Analysis (GfKl 07)

2006-09-20 Thread Michael Hahsler
*** Call for Abstracts *** Tools for Intelligent Data Analysis Session at the 31th Annual Conference of the German Classification Society (GfKl): Data Analysis, Machine Learning, and Applications March 7-9, 2007 University of Freiburg Providing innovative tools for

Re: [R] RODBC Connections closed automatically in background

2006-09-20 Thread ONKELINX, Thierry
Usually I try to do all data import before I do long calculations. A simple workaround for your problem would be: foo - function(dsn) { db - odbcConnect(dsn) odbcSetAutoCommit(db, FALSE) data - someDatabaseOperation(db) odbcClose(db) data2 - someLongCalculation(data) db -

[R] random number generation from a-/symmetric distribution

2006-09-20 Thread Garbade, Sven
Hi list, are there any functions or ideas to compute random numbers with a specific population mean and standard deviation from symmetric (but not normal) and asymmetric distributions? My first idea was to use e.g. rf() (and other R-functions for random number generation) and then scale the

Re: [R] random number generation from a-/symmetric distribution

2006-09-20 Thread mel
Garbade, Sven a écrit : Hi list, are there any functions or ideas to compute random numbers with a specific population mean and standard deviation from symmetric (but not normal) and asymmetric distributions? My first idea was to use e.g. rf() (and other R-functions for random number

Re: [R] looking for some functions to analyze a data set.

2006-09-20 Thread Anupam Tyagi
Taka Matzmoto sell_mirage_ne at hotmail.com writes: Hi R-users I have a data set. There are 10 products and the numbers of people who ranked the products. ... Is there any other way I can summarize this data? Be sure to know what assumptions are implicit in the procedures you are

Re: [R] multiple lines and plot

2006-09-20 Thread Mauricio Cardeal
Ok. I´ve already tried ?lines. An example: x - c(1,2,3,4,5,6) y - c(3,5,2,4,1,4) z - c(2,3,4,3,2,1) plot(x,y) lines(x,y) lines(x,z) Here is the point: how to show the points under the second line (x,z) ? Thanks Mauricio David Barron escreveu: ?lines On 20/09/06, Mauricio Cardeal [EMAIL

Re: [R] multiple lines and plot

2006-09-20 Thread David Barron
You can specify the same type parameter in either lines() or points() that can be used in plot(). So, if you want to show points as well as lines, use the following: x - c(1,2,3,4,5,6) y - c(3,5,2,4,1,4) z - c(2,3,4,3,2,1) plot(x,y,type=b) lines(x,z,col=red,type=b) On 20/09/06, Mauricio

Re: [R] Need help to estimate the Coef matrices in mAr

2006-09-20 Thread Arun Kumar Saha
Dear Spencer, Thank you very much for your attention on my problem. According to your advice I did some home work on this problem, but unfortunately I could not solve my problem. Suppose I have a dataset of length 300 with 2 variables. And I want to fit a VAR model on this of order 2. I

Re: [R] How to draw a per mille symbol?

2006-09-20 Thread Gavin Simpson
On Tue, 2006-09-19 at 17:53 +0100, Prof Brian Ripley wrote: On Tue, 19 Sep 2006, Gavin Simpson wrote: Dear list, Following advice posted to this list a while back by Prof Ripley [1], I have been trying to draw a per mille character [2] in an axis label. This should give the correct

[R] How to compare contours

2006-09-20 Thread Landini Massimiliano
dear All can anybody point me in to the right direction for this kind of operation?? Here an example. Please consider an hilly matematical landscapa as i-1 X- runif(i, min=0, max=4*pi) Y- runif(i, min=0, max=4*pi) Z-(cos(X)+cos(Y))/2 plot(X,Y,xlim=c(0,4*pi),ylim=c(0,4*pi), xlab=X,ylab=Y,

[R] Variable im Data Frame Namen

2006-09-20 Thread Thorsten Muehge
Hello R Experts, how can I incorporate a variable in a data frame definition? Example: week - 28 test(week) - data.frame(a,b,s,c); test28 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Stats question - cox proportional hazards adjustments

2006-09-20 Thread Geoff Russell
Hi useRs, Many studies of the link between red meat and colorectal cancer use Cox proportional hazards with (among other things) a gender covariate. If it is true that men eat more red meat, drink more alcohol and smoke more than women, and if it is also true that alcohol and tobacco are known

Re: [R] How to draw a per mille symbol?

2006-09-20 Thread Gavin Simpson
On Wed, 2006-09-20 at 15:28 +1200, Paul Murrell wrote: Hi Gavin Simpson wrote: Dear list, Following advice posted to this list a while back by Prof Ripley [1], I have been trying to draw a per mille character [2] in an axis label. This should give the correct character:

Re: [R] R CMD check fails at package dependencies check on Fedora Core 5, works on other systems

2006-09-20 Thread Kurt Hornik
Marc Schwartz (via MN) writes: On Tue, 2006-09-19 at 22:16 +1000, Robert King wrote: Here is another thing that might help work out what is happening. If I use --no-install, ade4 actually fails as well, in the same way as zipfR. [Desktop]$ R CMD check --no-install ade4 * checking for

[R] Step procedure and Akaike information criterion

2006-09-20 Thread Emilia Rocco
Please can you help me I have the following problem: I have selected an lm model through the step procedure which visualize for each step the AIC value; then I have calculated for the initial model and the selected one the AIC using the funnction AIC. The results are different.What's happened?

Re: [R] Step procedure and Akaike information criterion

2006-09-20 Thread David Barron
compare ?AIC with ?extractAIC, which explains the difference. On 20/09/06, Emilia Rocco [EMAIL PROTECTED] wrote: Please can you help me I have the following problem: I have selected an lm model through the step procedure which visualize for each step the AIC value; then I have calculated for

Re: [R] problem in font

2006-09-20 Thread Ronaldo Reis-Jr.
Em Segunda 18 Setembro 2006 10:02, Uwe Ligges escreveu: Ronaldo Reis-Jr. wrote: Hi, But, I have this warning in the enviromnent that have this problem: During startup - Warning message: using .GlobalEnv instead of 'package:lattice' So, can you please be a bit more specific? R

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Frank E Harrell Jr
Uwe Ligges wrote: Brian Edward wrote: Hello all, I have been a R user for about a year now, running on a MS Windows machine. I am in the process of making a complete switch to open-source. Linux is a new world to me. Ubuntu was my selection of the various distributions. Please pardon

Re: [R] Stats question - cox proportional hazards adjustments

2006-09-20 Thread Peter Dalgaard
Geoff Russell [EMAIL PROTECTED] writes: Hi useRs, Many studies of the link between red meat and colorectal cancer use Cox proportional hazards with (among other things) a gender covariate. If it is true that men eat more red meat, drink more alcohol and smoke more than women, and if

Re: [R] Variable im Data Frame Namen

2006-09-20 Thread Richard M. Heiberger
assign(paste(week, 28, sep=), data.frame(a=1:2, b=3:4, cc=letters[5:6])) week28 a b cc 1 1 3 e 2 2 4 f __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Rainer M Krug
Frank E Harrell Jr wrote: SNIP After R starts you can manage help files nicely using help.start() to use a browser. I often use dillo, the world's fastest graphical browser, by specifying options(browser='dillo') before help.start(). WOW - dillo is BRILLIANT for this purpose. Thanks for

[R] Simulation help

2006-09-20 Thread Zodet, Marc W. (AHRQ)
I'm trying to simulate trend data over a five year period. I want different trend profiles...the simplest being a linear trend. I've been using the following code: patBdta1 - NULL for(i in 1:100) patBdta1 - rbind(patBdta1,c(yr1= mean(rbinom(50,1,.50)), yr2

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Martin Maechler
UweL == Uwe Ligges [EMAIL PROTECTED] on Wed, 20 Sep 2006 01:03:30 +0200 writes: UweL Brian Edward wrote: Hello all, I have been a R user for about a year now, running on a MS Windows machine. I am in the process of making a complete switch to open-source. Linux

[R] Calculating mean together with split

2006-09-20 Thread Rainer M Krug
Hi I have a table called npl containing results of simulations. It contains about 19000 entries and the structure looks like this: NoPlants sim run year DensPlants 16 lng_cs99_renosterbos 140.00192 . . . it has 43 different entries for sim and year goes

Re: [R] Stats question - cox proportional hazards adjustments

2006-09-20 Thread Geoff Russell
Peter et al, Thanks for the reply, I did reread the posting guide before posting and figured it was a short question and might just have a short answer. I have Therneau's book on order, which will probably clarify the matter in time. I understand stratifying to deal with confounding, but not

Re: [R] Calculating mean together with split

2006-09-20 Thread David Barron
Have a look at the function aggregate.table in the package gtools (part of the gregmisc bundle). On 20/09/06, Rainer M Krug [EMAIL PROTECTED] wrote: Hi I have a table called npl containing results of simulations. It contains about 19000 entries and the structure looks like this: NoPlants

Re: [R] Calculating mean together with split

2006-09-20 Thread David Barron
Sorry, that should have been package gdata, not gtools...they're both in the same bundle, though. On 20/09/06, Rainer M Krug [EMAIL PROTECTED] wrote: Hi I have a table called npl containing results of simulations. It contains about 19000 entries and the structure looks like this:

Re: [R] Simulation help

2006-09-20 Thread ONKELINX, Thierry
This should work. I try to avoid for loops because large (or nested) for loops tend to consume a lot of memory. one.dataset - function(dummy = 0, slope = 0.01){ return(c(yr1= mean(rbinom(50,1,.5)), yr2 =mean(rbinom(50,1,.5 + slope)), yr3 =mean(rbinom(50,1,.5 + 2 * slope)), yr4

Re: [R] Calculating mean together with split

2006-09-20 Thread David Barron
Of course, aggregate will work too, depends on how you want the output to be formatted. You could also look at summarize in the Hmisc package. On 20/09/06, David Barron [EMAIL PROTECTED] wrote: Sorry, that should have been package gdata, not gtools...they're both in the same bundle, though.

Re: [R] Stats question - cox proportional hazards adjustments

2006-09-20 Thread John Sorkin
Geroff, The answer to your question is that the answer depends on the question that you wish to ask. If you want to know if men have a higher probability of mortality (or mortality rate) than women after taking into account differential alcohol use, red meat consumption, etc. by sex then you

Re: [R] Calculating mean together with split

2006-09-20 Thread Rainer M Krug
Hi David aggregate is what I was looking for, as I wanted to have it in the tabular format to plot it. Thanks Rainer David Barron wrote: Of course, aggregate will work too, depends on how you want the output to be formatted. You could also look at summarize in the Hmisc package. On

[R] Beginners manual for emacs and ess

2006-09-20 Thread Rainer M Krug
Hi I heard so much about Emacs and ESS that I decided to try it out - but I am stuck at the beginning. Is there anywhere a beginners manual for Emacs ESS to be used with R? even M-x S tells me it can't start S-Plus - obviously - but I want it to start R... Any help welcome (otherwise I

[R] variance functions in glmmPQL or glm?

2006-09-20 Thread Gretchen
Hello R users- I am new to R, and tried searching the archives and literature for an answer to this - please be patient if I missed something obvious. I am fitting a logistic regression model, and would like to include variance functions (specifically the varIdent function). I cannot figure out

[R] local intallation of MSBVAR_0.2.0.tar.gz

2006-09-20 Thread pchen
Hello, can someone tell me how to install a package like MSBVAR_0.2.0.tar.gz locllay ? thanks __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] R CMD check fails at package dependencies check on Fedora Core 5, works on other systems

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 13:20 +0200, Kurt Hornik wrote: Marc Schwartz (via MN) writes: On Tue, 2006-09-19 at 22:16 +1000, Robert King wrote: Here is another thing that might help work out what is happening. If I use --no-install, ade4 actually fails as well, in the same way as zipfR.

Re: [R] Beginners manual for emacs and ess

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 17:03 +0200, Rainer M Krug wrote: Hi I heard so much about Emacs and ESS that I decided to try it out - but I am stuck at the beginning. Is there anywhere a beginners manual for Emacs ESS to be used with R? even M-x S tells me it can't start S-Plus - obviously -

Re: [R] [Rd] Sweave processes \Sexpr in commented LaTeX source (2.3.1patched and 2.4.0)

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 09:09 +0200, Antonio, Fabio Di Narzo wrote: Hi. 2006/9/20, Marc Schwartz [EMAIL PROTECTED]: Hi all, On FC5, using: Version 2.3.1 Patched (2006-08-06 r38829) and today's R version 2.4.0 alpha (2006-09-19 r39397) with the following .Rnw file:

[R] local intallation of MSBVAR_0.2.0.tar.gz

2006-09-20 Thread pchen
Hello, can someone tell me how to install a package like MSBVAR_0.2.0.tar.gz locllay ? thanks - Originalnachricht - Von: Rainer M Krug [EMAIL PROTECTED] Datum: Mittwoch, September 20, 2006 11:06 am Betreff: Re: [R] Calculating mean together with split An: David Barron [EMAIL

[R] Comment blocks in R programs

2006-09-20 Thread Joe Byers
All, Is there a way to add comment blocks in an R script other than using # at the beginning of each line? Or, is there anything like ndocs for C++ and the markup for Java that can generate documentation? This may be a bad question, but I have searched R documentation and can't seem to find

Re: [R] local intallation of MSBVAR_0.2.0.tar.gz

2006-09-20 Thread Gavin Simpson
On Wed, 2006-09-20 at 11:12 -0400, [EMAIL PROTECTED] wrote: Hello, can someone tell me how to install a package like MSBVAR_0.2.0.tar.gz locllay ? thanks Unix/Linux or Windows? If Windows, forget the tar.gz file (unless you are set up to compile source code), you'd probably be better

Re: [R] Comment blocks in R programs

2006-09-20 Thread Gabor Grothendieck
Try this: if (FALSE) { ... whatever ... } On 9/20/06, Joe Byers [EMAIL PROTECTED] wrote: All, Is there a way to add comment blocks in an R script other than using # at the beginning of each line? Or, is there anything like ndocs for C++ and the markup for Java that can generate

Re: [R] Calculating mean together with split

2006-09-20 Thread hadley wickham
It contains about 19000 entries and the structure looks like this: NoPlants sim run year DensPlants 16 lng_cs99_renosterbos 140.00192 . . . it has 43 different entries for sim and year goes from 1 to 100, and run from 1 to 5. I would like to

Re: [R] Comment blocks in R programs

2006-09-20 Thread Gabor Grothendieck
I should have noted that the ...whatever... must be valid R. You could also do this: Here are some comments. On 9/20/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Try this: if (FALSE) { ... whatever ... } On 9/20/06, Joe Byers [EMAIL PROTECTED] wrote: All, Is there a way to

Re: [R] Comment blocks in R programs

2006-09-20 Thread Romain Francois
Gabor Grothendieck wrote: Try this: if (FALSE) { ... whatever ... } Problem is, ... whatever ... must be syntactically correct to use that trick. Why not using a text editor that does rectangular selection or commenting several lines at a time, there are many out there to propose that

Re: [R] acos(0.5) == pi/3 FALSE

2006-09-20 Thread Charles C. Berry
On Tue, 19 Sep 2006, Johannes H?sing wrote: Peter Dalgaard: Ben Bolker [EMAIL PROTECTED] writes: 1. compose your response I've always wondered why step 1. - often the time-consuming bit - is not listed last. The advice applies to the situation when answering immediately would be

Re: [R] Union of two data frames

2006-09-20 Thread Anupam Tyagi
Kartik Pappu kartik.pappu at gmail.com writes: Essentially, I want to make a union of the two data frames. I hope this question makes sense. See merge(...), and have a look at R intro. Also check documentation for Design package. Anupam. __

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Frank E Harrell Jr
Rainer M Krug wrote: Frank E Harrell Jr wrote: SNIP After R starts you can manage help files nicely using help.start() to use a browser. I often use dillo, the world's fastest graphical browser, by specifying options(browser='dillo') before help.start(). WOW - dillo is BRILLIANT

Re: [R] Beginners manual for emacs and ess

2006-09-20 Thread Anupam Tyagi
Rainer M Krug rkrug at sun.ac.za writes: Is there anywhere a beginners manual for Emacs ESS to be used with R? even M-x S tells me it can't start S-Plus - obviously - but I want it to start R... Please also look at John Fox's Xemacs+ESS intro.

Re: [R] Calculating mean together with split

2006-09-20 Thread hadley wickham
# Then try one of these: cast(dfm, year ~ sim) cast(dfm, year + sim ~ . ) cast(dfm, year ~ sim, margins=TRUE) Oops that should be: dfm - rename(df, c(DensPlants = value)) cast(dfm, year ~ sim, mean) cast(dfm, year + sim ~ . , mean) cast(dfm, year ~ sim, mean, margins=TRUE) (Thanks for

[R] help with function

2006-09-20 Thread Guenther, Cameron
Hello everyone, I have a function here that I wrote but doesn't seem to work quite right. Attached is the code. In the calib funcion under the for loop Bt[i+2]-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i+1] returns NA's for everything after years 1983 and 1984. However the code works when it reads

Re: [R] Linux configuration (Ubuntu)

2006-09-20 Thread Dirk Eddelbuettel
On 20 September 2006 at 15:42, Martin Maechler wrote: | Further note that Ubuntu (as all other Linux distributions | derived from Debian) provides ESS as a standard package you can | simply install, e.g., via Synaptic. | Note that you need to activate the 'Universe' | {in the sources that

Re: [R] Adding percentage to Pie Charts (was (no subject))

2006-09-20 Thread Anupam Tyagi
Greg Snow Greg.Snow at intermountainmail.org writes: Have you read the books by Cleveland? I do not recall reading Cleveland's book; I have read one by Tufte. You raise some interesting issues there. I agree with some, I could not clearly understand some other things you mention. I think

Re: [R] help with function

2006-09-20 Thread Mike Nielsen
Take the case of i==1. Ct[i]-1/Bq*Bt[i]*Cerr # Assign Ct[1] using Bt[1] Rt[i]-Bt[i]/(a+b*Bt[i]) # Assign Rt[1] using Bt[1] Bt[i+2]-(1-m)*Bt[i+1]+Rt[i] *Rerr-Ct[i+1] # Assign Bt[3] using Bt[2] and Rt[1] and **Ct[2]** You're

[R] Comment delay time (was: acos(0.5) == pi/3 FALSE)

2006-09-20 Thread Duncan Murdoch
On 9/20/2006 11:54 AM, Charles C. Berry wrote: On Tue, 19 Sep 2006, Johannes H�sing wrote: Peter Dalgaard: Ben Bolker [EMAIL PROTECTED] writes: 1. compose your response I've always wondered why step 1. - often the time-consuming bit - is not listed last. The advice applies to

Re: [R] Building the call of an arbitrary function

2006-09-20 Thread Vincent Goulet
Le Dimanche 17 Septembre 2006 14:12, Duncan Murdoch a écrit : On 9/17/2006 12:36 PM, Vincent Goulet wrote: Hy all, Is there a direct way to build the complete function call of an arbitrary function? Here's what I want to do. A function will build a function which will itself call a

[R] binom

2006-09-20 Thread Ethan Johnsons
I have this data and calculated binom, but am very confused with the value (at least 5, q =4, q=5, q =6??) and parameters? Can someone explain how to plug in the va;ues and parameters? Hospital # Tested # Positive # Positive (per 1000) A 3741 30 8 C 5006 11 2.2 If 500 newborns are

[R] GLM Question

2006-09-20 Thread Mark Jankowski
Hello, I am trying to formulate a glm model with repeated measures of viral blood counts where animal weight is a covariate. Animal treatment group is the fixed effect and subject is the random effect. I'm thinking this situation calls for a mixed model in the Poisson family with data

Re: [R] Comment blocks in R programs

2006-09-20 Thread Lanre Okusanya
Tinn-R has that functionality. On 9/20/06, Romain Francois [EMAIL PROTECTED] wrote: Gabor Grothendieck wrote: Try this: if (FALSE) { ... whatever ... } Problem is, ... whatever ... must be syntactically correct to use that trick. Why not using a text editor that does

Re: [R] Beginners manual for emacs and ess

2006-09-20 Thread Richard M. Heiberger
I recommend you start with our JCGS article to get a sense of what ESS does and why. An earlier version of the article is in the ESS distribution as file ess-5.3.2/doc/ess-intro-graphs.pdf The manual is in the ESS distribution as file ess-5.3.2/doc/ess.pdf The reference card is file

Re: [R] Beginners manual for emacs and ess

2006-09-20 Thread Richard M. Heiberger
and in answer to your specific question You start R with M-x R __ R-help@stat.math.ethz.ch 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,

[R] hours() in 'chron': output != input

2006-09-20 Thread Glen A Sargeant
I encountered surprising (to me, at least) behavior while using 'hours()' in package 'chron.' I will be grateful if someone can point out my error or provide an explanation and intuitive solution (I suppose I could convert chron to a character vector and use substring, but I deal mostly with

[R] mysterious error on compile R 2.3.1

2006-09-20 Thread Dylan Beaudette
Getting a very strange error with a new install of R from source on x86; make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src' ** R ** data ** moving datasets to lazyload DB Error in factor(c(1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1), : invalid labels; length 2

Re: [R] hours() in 'chron': output != input

2006-09-20 Thread Gabor Grothendieck
I think hours should have a comparison tolerance. Try: hours(x+1e-10) as a workaround. On 9/20/06, Glen A Sargeant [EMAIL PROTECTED] wrote: I encountered surprising (to me, at least) behavior while using 'hours()' in package 'chron.' I will be grateful if someone can point out my error

Re: [R] GLM Question

2006-09-20 Thread David Barron
You can use the lmer function in the Matrix package or glmmPQL in the MASS package. The former would be used like this: p1 - lmer(count ~ treatment + (1|subject), family=poisson) Dave On 20/09/06, Mark Jankowski [EMAIL PROTECTED] wrote: Hello, I am trying to formulate a glm model with

[R] [ROracle] error loading (undefined symbol: sqlclu)

2006-09-20 Thread Mathieu Drapeau
I have this error when I load the library ROracle: library(ROracle) Loading required package: DBI Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library '/usr/local/lib/R/site-library/ROracle/libs/ROracle.so':

Re: [R] mysterious error on compile R 2.3.1

2006-09-20 Thread Prof Brian Ripley
On Wed, 20 Sep 2006, Dylan Beaudette wrote: Getting a very strange error with a new install of R from source on x86; make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src' ** R ** data ** moving datasets to lazyload DB Error in factor(c(1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,

Re: [R] mysterious error on compile R 2.3.1

2006-09-20 Thread Peter Dalgaard
Dylan Beaudette [EMAIL PROTECTED] writes: Getting a very strange error with a new install of R from source on x86; make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src' ** R ** data ** moving datasets to lazyload DB Error in factor(c(1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,

[R] Unexpected behavior of apply() over a 3d array

2006-09-20 Thread Toby Muhlhofer
Dear listeRs, I'm finding that apply() behaves strangely when used on a 3-d array. For example: at - array(1:27,dim=c(3,3,3)) at , , 1 [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 , , 2 [,1] [,2] [,3] [1,] 10 13 16 [2,] 11 14 17 [3,]

[R] Poission distribution

2006-09-20 Thread Ethan Johnsons
The expected number of bladder cancer over next 20 years a tire industry is 1.8. Poission distribution is assumed to hold and 6 reported deaths are caused by bladder cancer among the employees. Trying to find how unusual this event is. ppois(q=6, lambda=1.8, lower.tail = TRUE, log.p = FALSE)

[R] functionality of update in SAS

2006-09-20 Thread Denis Chabot
Dear list, I've tried to search the archives but found nothing, although I may use the wrong wording in my searches. I've also double-checked the upData function in Hmisc, but it does something else. I'm wondering if one can update a dataframe by forcing into it a shorter dataframe

Re: [R] Unexpected behavior of apply() over a 3d array

2006-09-20 Thread Gabor Grothendieck
Read ?apply carefullly.If FUN returns as a scalar as it does here then the result dimensions are dim(X)[MARGIN]. For example, apply(X, 1, max) has three components which are max(X[1,,]), max(X[2,,]) and max(X[3,,]) and apply(X, 3, max) has three components which are max(X[,,1]), max(X[,,2])

Re: [R] [ROracle] error loading (undefined symbol: sqlclu)

2006-09-20 Thread Marc Schwartz (via MN)
On Wed, 2006-09-20 at 15:15 -0400, Mathieu Drapeau wrote: I have this error when I load the library ROracle: library(ROracle) Loading required package: DBI Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library

Re: [R] Unexpected behavior of apply() over a 3d array

2006-09-20 Thread David Barron
It's definitely not random! Try apply(at,3,I) to see what the marginal table is that max operates on, and you'll see where your result comes from. On 20/09/06, Toby Muhlhofer [EMAIL PROTECTED] wrote: Dear listeRs, I'm finding that apply() behaves strangely when used on a 3-d array. For

Re: [R] Unexpected behavior of apply() over a 3d array

2006-09-20 Thread Toby Muhlhofer
It just seemed wierd because over a 2d array, it also returns vectors, but I guess breaking things down into components of the list it makes sense. Besides, using David's suggestion of apply(at, MARGIN, I) also offers the insights I need. Gabor Grothendieck wrote: Read ?apply carefullly.

Re: [R] How to draw a per mille symbol?

2006-09-20 Thread Paul Murrell
Hi Gavin Simpson wrote: On Wed, 2006-09-20 at 15:28 +1200, Paul Murrell wrote: Hi Gavin Simpson wrote: Dear list, Following advice posted to this list a while back by Prof Ripley [1], I have been trying to draw a per mille character [2] in an axis label. This should give the correct

[R] Dennis Chabot poss. answer

2006-09-20 Thread Erin Hodgess
Hi Dennis! Here is a possible solution to consider: a - data.frame(x=1:25,y=rnorm(25)) a x y 1 1 1.38958705 2 2 -0.45165628 3 3 0.86517671 4 4 0.40802481 5 5 -2.00104605 6 6 0.11152748 7 7 1.84400316 8 8 0.80775204 9 9 -0.12510867 10 10 -0.13650037 11 11

[R] ppois

2006-09-20 Thread Ethan Johnsons
A quick question! The number of episodes per year of otitis media follows a Possion distribution with lambda = 1.6 episodes per year. Wouldn't the probability of getting 3 or more episodes of otitis media in the first 2 years of life be: ppois(q=3, lambda=1.6*2, lower.tail = TRUE, log.p =

Re: [R] Poission distribution

2006-09-20 Thread David Barron
Is that 6 deaths over 20 years? If so, the probability of getting exactly 6 deaths is given by dpois(6,1.8) [1] 0.007808587 The probability of getting six or more deaths is 1 minus the result you obtained. On 20/09/06, Ethan Johnsons [EMAIL PROTECTED] wrote: The expected number of bladder

Re: [R] mysterious error on compile R 2.3.1

2006-09-20 Thread Dylan Beaudette
On Wednesday 20 September 2006 12:38, Peter Dalgaard wrote: Dylan Beaudette [EMAIL PROTECTED] writes: Getting a very strange error with a new install of R from source on x86; make[3]: Leaving directory `/tmp/R.INSTALL.r20887/cluster/src' ** R ** data ** moving datasets to lazyload DB

Re: [R] functionality of update in SAS

2006-09-20 Thread Deepayan Sarkar
On 9/20/06, Denis Chabot [EMAIL PROTECTED] wrote: Dear list, I've tried to search the archives but found nothing, although I may use the wrong wording in my searches. I've also double-checked the upData function in Hmisc, but it does something else. I'm wondering if one can update a

[R] Statitics Textbook - any recommendation?

2006-09-20 Thread Iuri Gavronski
I would like to buy a basic statistics book (experimental design, sampling, ANOVA, regression, etc.) with examples in R. Or download it in PDF or html format. I went to the CRAN contributed documentation, but there were only R textbooks, that is, textbooks where R is the focus, not the

[R] how to delete some columns from a matrix based on some other indicator variable

2006-09-20 Thread Ya-Hsiu Chuang
Hello, I am not very familiar with R and need help in deleting a few columns in a matrix. Suppose I have a indicator variable called r and it's defined as r = (0, 0, 1, 1). A matrix D is a 3X4 matrix. If I want a new matrix which contains only the columns of D corresponding to the elements of

Re: [R] How to store an array in MySQL

2006-09-20 Thread Chris Stubben
Hi all, does somebody know how to store an array in MySQL with the package RMySQL. Thanks in advance. A similar question was asked last month. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/81429.html In a normalized database, you should store the index and value in separate columns.

Re: [R] Statitics Textbook - any recommendation?

2006-09-20 Thread Richard M. Heiberger
I recommend mine, which is listed in CRAN, Statistical Analysis and Data Display Richard M. Heiberger and Burt Holland http://springeronline.com/0-387-40270-5 All examples and figures in the book are included in the online files that may be downloaded from the

Re: [R] Statitics Textbook - any recommendation?

2006-09-20 Thread Mitchell Maltenfort
Venables and Ripley's Modern Applied Statistics with S was recommended on the CRAN site, and I like it myself. On 9/20/06, Iuri Gavronski [EMAIL PROTECTED] wrote: I would like to buy a basic statistics book (experimental design, sampling, ANOVA, regression, etc.) with examples in R. Or

Re: [R] Statitics Textbook - any recommendation?

2006-09-20 Thread Berton Gunter
Not withstanding Prof. Heiberger's admirable enthusiasm, I think the canonical answer is probably MASS (Modern Applied Statistics with S) by Venables and Ripley. It is very comprehensive, but depending on your background, you may find it too telegraphic. -- Bert Gunter Genentech Non-Clinical

  1   2   >