[R] R News, volume 7, issue 2 is now available (fwd)

2007-11-02 Thread Torsten Hothorn
Dear useRs, The October 2007 issue of R News is now available on CRAN under the Documentation/Newsletter link. Torsten (on behalf of the R News Editorial Board) ___ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-announce

[R] Significance-Problems by using arma/xreg.

2007-11-02 Thread Andreas Klein
Hello. I've got a problem with arma/xreg. I would like to get a better model-fit by implenting some external explanatory variable, so I thought I can implement it by expand the arima-function with an xreg-argument: I have two stationary data vectors y and x of length 201: y -

Re: [R] structure data

2007-11-02 Thread Antje
Okay, what I did so far is to create a list of a list of a list... I don't know whether this makes sense... (it's just initialized... I have to change it for individual cases) What do you think about? plate.parameters - c(param1,param2) temp - c(mean,sd) vec -

Re: [R] Permutation test, grouped data

2007-11-02 Thread Achim Zeileis
On Fri, 2 Nov 2007, Tom Backer Johnsen wrote: I am perfectly aware that this question is not an R question, at least not yet, but I have not succeeded in finding what I want in other ways, so ... What I am looking for are two algorithms, preferabley in Pascal, but other languages may do.

Re: [R] R timeDate does not allow seconds?

2007-11-02 Thread B. Bogart
Hello all, Sorry if anyone gets this message twice, as my mailserver may not be working. Thanks for your response. Your idea makes a lot of sense to me, but I've been unable to get seconds to work. I ended up with this format finally: 2007-10-31_16:20:22 Problem is I am unable to get it

Re: [R] R timeDate does not allow seconds?

2007-11-02 Thread B. Bogart
Hello, Sorry if anyone gets this message twice, as my mailserver may not be working. Thanks for your response. Your idea makes a lot of sense to me, but I've been unable to get seconds to work. I ended up with this format finally: 2007-10-31_16:20:22 Problem is I am unable to get it recognized

[R] RMySQL inserting data problem

2007-11-02 Thread James Morris
Hello, I am trying to insert data in a data.frame into a database table using the RMySQL package m - dbDriver(MySQL) con - dbConnect(m, host = blah, user = blah, password = blah, dbname = blah) proid - dbGetQuery(con, select max(processed_data_id)+1 from processed_data)

[R] Odp: Permutation test, grouped data

2007-11-02 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 02.11.2007 15:16:37: I am perfectly aware that this question is not an R question, at least not yet, but I have not succeeded in finding what I want in other ways, so ... What I am looking for are two algorithms, preferabley in Pascal, but other

Re: [R] subsetting problem with multiple criteria: Works in some but not all cases.

2007-11-02 Thread John Kane
Thank you Jim. That seems to work perfectly. I had looked at %in% and apparently misunderstood what it would do. Is there any place where I can read on the various %XX% functions? --- jim holtman [EMAIL PROTECTED] wrote: I think the problem is with your use of == instead of %in%; try

[R] GLS with nlme

2007-11-02 Thread Janmaat, John
Hello All, This is my third time attempting to post this message. I don't see it in the archive, so I'm guessing it is not getting through. If I am wrong, my apologies. I am trying to do a GLS regression, (X'V^-1X)^-1X'V^-1y, using the gls() function from the nlme package. I have the

Re: [R] question on the 'stats' package

2007-11-02 Thread John Kane
It's now part of the base (or default) installation. Do library() and you will see that it is already installed (and search() will show you that it is automatically loaded). --- david csongor [EMAIL PROTECTED] wrote: I can't find the 'stats'- package, has it changed name? Where can I find

[R] Permutation test, grouped data

2007-11-02 Thread Tom Backer Johnsen
I am perfectly aware that this question is not an R question, at least not yet, but I have not succeeded in finding what I want in other ways, so ... What I am looking for are two algorithms, preferabley in Pascal, but other languages may do. For (a) systematic (complete) permutations for

[R] How to see source code of nnet package

2007-11-02 Thread Dajie Luo
Hi, I am working on a project which needs a multinomial logit regression. So I want to reference the code of multinom in nnet package. I found nnet package is no longer in the CRAN list. But I cannot find the source code in R Core source code package either. Anyone knows how to see the

[R] add histograms or distributions on regression line

2007-11-02 Thread Chang jun xiang
hello, does anyone know how to add histograms or distributions on regression like just like quantiles regression in RGraphGallery below, a very delicate codes. Thanks alot. http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=109 __

[R] groups in lattice

2007-11-02 Thread Ruud H. Koning
Hello, I must be missing something very obvious. I have a dataset with consists of three groups, and for each group I would like to draw a regression line in one frame. Something like plot.a - xyplot(result~price,data=nl, xlab=Standardized price,ylab=Outcome,groups=slice,

[R] snow and Rmpi, delayed starting-times at nodes

2007-11-02 Thread Markus Schmidberger
Hello, we use R version 2.6.0, Rmpi_0.5-5 and snow_0.2-9 and have a parallel call like this: clusterApply(cluster, input.list, function(input, data1, type) { }, data1, type ) We now have the problem, that the processes at the nodes start delayed. This means for example, node 4

Re: [R] Rcmdr Plugin and menus.txt

2007-11-02 Thread John Fox
Dear Haris, First, there's nothing wrong (at least that I can see) with your menu file, although I would consider using the activation field to determine whether the menu items should be activated or grayed out in the current context. The problem you encountered is a bug in the Commander()

Re: [R] add histograms or distributions on regression line

2007-11-02 Thread John Kane
If you go to the source code area of the page and click on one of the icons to get the source code for that graph. The code looks a bit complex for me to figure out quickly , but it may give you a start on how to approach it. --- Chang jun xiang [EMAIL PROTECTED] wrote: hello, does anyone

Re: [R] How to test combined effects?

2007-11-02 Thread Gregory Warnes
Ooops. One typo in the estimable command: estimable(ModelFit, c('IQ:age'=1, 'IQ:I(age^2)'= 1, 'IQ:I(age^3)' = 1)) (Remove a trailing space in the second string.) -G On Nov 2, 2007, at 11:51AM , Gregory Warnes wrote: Hello Gang, First, if you would like to performa an overall test of

[R] loading installes package including all needed subpackages

2007-11-02 Thread Schmitt, Corinna
Hallo, I just installed all needed packages for my project on my PC. But I cannot load all at one time. I now want to load limma. How can I realize the following plan: I want to install for example limma inclusive all needed other sub packages (add-on). Can anyone tell me the corresponding

Re: [R] groups in lattice

2007-11-02 Thread Renaud Lancelot
See the argument panel.groups in panel.superpose. library(lattice) dfr - data.frame(y = c(rnorm(10, 5, 1), rnorm(10, -5, 1)), x = rep(runif(10), 2), g = rep(c(a, b), each = 10)) xyplot(y ~ x, groups = g, data = dfr, panel = function(...){

Re: [R] ggplot2 - expand range?

2007-11-02 Thread Pedro de Barros
Thanks! I thought expand was already set to c(0,0) when not specifying it. I agree I must be careful with the space left, but if a scale starts on 0, it becomes somewhat strange to see the axis start somewhere on negatives... This is my problem. Normally the issue with extra space will

[R] counting with factors

2007-11-02 Thread Bernd Jagla
Hi there, I have something that appears to be a factor called drug: Typeof(drug) = Integer As.numeric(drug) gives a long list Levels(drug) gives a long list, too. Now I want something like the summary function does: I want to count how often each level occurs in the given vector. My

Re: [R] snow and Rmpi, delayed starting-times at nodes

2007-11-02 Thread Luke Tierney
On Fri, 2 Nov 2007, Markus Schmidberger wrote: Hello, we use R version 2.6.0, Rmpi_0.5-5 and snow_0.2-9 and have a parallel call like this: clusterApply(cluster, input.list, function(input, data1, type) { }, data1, type ) Most likely the problem is the direct use of

Re: [R] correct wording and notation for R stuff in LaTex

2007-11-02 Thread Katharine Mullen
If you are free to format your references to packages and functions as you please, you might follow the convention used by the Journal of Statistical Software. you can do this by adding the following to your latex file: \newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}

Re: [R] duplicate rows in a matrix

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 09:04 -0700, Silvia Lipski wrote: Hi! Is there a fast way to duplicate rows in a matrix? I would like to do the following: change a matrix A like: [,1] [,2] [1,] Kevin 1 [2,] Alf 2 into : [,1] [,2] [1,] Kevin 1 [2,] Kevin 1 [3,] Alf 2 [4,]

Re: [R] list to Matrix - remove NAs von list.

2007-11-02 Thread jim holtman
Another alternative: do.call('cbind', l[!sapply(l, function(x)all(is.na(x)))]) On 11/2/07, Petr PIKAL [EMAIL PROTECTED] wrote: Hi [EMAIL PROTECTED] napsal dne 02.11.2007 12:00:09: Thanks, I have the case that there is a NA in the list. This should not be a column. But na.omit(l)

Re: [R] How to test combined effects?

2007-11-02 Thread Gang Chen
Thanks a lot for the help! First, if you would like to performa an overall test of whether the IQ interactions are necessary, you may find it most useful to use anova to compare a full and reduced model. Something like: ModelFit.full -lme(mct~ IQ*age+IQ*I(age^2)+IQ*I(age^3),

Re: [R] duplicate rows in a matrix

2007-11-02 Thread Juan Manuel Barreneche
My sugestion (for an alphabetically ordered output) AA - rbind(A,A) AA - AA[order(AA[,1]), ] ## so your matrix gets alphabetically ordered JM On Fri, 2007-11-02 at 09:04 -0700, Silvia Lipski wrote: Hi! Is there a fast way to duplicate rows in a matrix? I would like to do the following:

Re: [R] thicker axis in levelplot

2007-11-02 Thread Jenny Barnes
Deepayan, You are a star - thank you that worked perfectly! Many thanks, Jenny On 11/1/07, Jenny Barnes [EMAIL PROTECTED] wrote: Thank you for your reply - I'm afriad that just doesn't work, any other suggestions or is there something I need to do WITH this command to make it work? I

[R] Sweave, and long lasting scripts

2007-11-02 Thread John Lande
Dear R user, I am using Sweave to write my reports with R code. Unlucly my code take a lot of time to run, and I don't want to run it multiple time, if possible, as I am still developping the tools. It seems that a sweave run does not save the enviroment at the end of the process, is there a way

Re: [R] list to Matrix

2007-11-02 Thread Dimitris Rizopoulos
you can use do.call(), e.g., do.call(cbind, l) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel: +32/(0)16/336899 Fax: +32/(0)16/337015 Web:

[R] function over variables in a list

2007-11-02 Thread mdgi
Hello R-users I nowhere red in tutorials neither in r-help how to access one variable in multiple list objects. p.e i have list of 50 Length Class Mode [1,] 16 data.frame list and i want to check for the max in column 16 of all list objects: I tried max(mylist[[]][,16]) or

[R] Odp: question on the 'stats' package

2007-11-02 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 02.11.2007 15:11:28: I can't find the 'stats'- package, has it changed name? Where can I find the na.omit() function if not in 'stats'? On my computer it is installed in library folder named stats. What about yours? It shall be installed together with base R.

Re: [R] textplot() in gplots causes problems (0x9)

2007-11-02 Thread Gregory Warnes
Hi Jonas, You are correct that manually setting cex won't entirely remove the warning messages (note: these are *warnings* not *errors*). It will reduce them greatly, from, perhaps 40, down to 3 or so. Since the tab character won't be properly displayed anyway, you can use gsub or similar

Re: [R] structure data

2007-11-02 Thread Antje
Yes, I know, that these methods might help to calculate but my question was more about how to structure the data that I can realize this easy computation afterwards. Due to the flexibility I need, I would like to avoid calculations I don't need... Antje John Kane schrieb: Have a look at

Re: [R] cluster analysis

2007-11-02 Thread paulandpen
AMINA SHAHZADI, The eternal question. What I do is that I generate a range of solutions, profile them on variables used to cluster the data into groups and any other information I have to profile the cluster groups on and then present the solutions to a group of others to assess

Re: [R] counting with factors

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 12:01 -0400, Bernd Jagla wrote: Hi there, I have something that appears to be a factor called drug: Typeof(drug) = Integer This is because the underlying data type of a factor is an integer. As.numeric(drug) gives a long list This gives you the integer storage code

Re: [R] Shading area under PDF of t -distribution

2007-11-02 Thread Dimitris Rizopoulos
try this: curve(dt(x, 74), from = -4, to = 4) x - seq(-1.96, 1.96, len = 100) y - dt(x, 74) polygon(c(x[1], x, x[100]), c(dt(-4, 74), y, dt(4, 74)), col = red, border = NA) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public

[R] list to Matrix

2007-11-02 Thread Markus Schmidberger
Hello, I have a list of vectors (all the same length). How to convert the list to a matrix? Each vector should be a column. I tried this: l - list(c(1,2,3),c(1,2,3),c(1,2,3)) mat - matrix( unlist(l), nrow=length(l) ) But I think this is not very efficient. Is there a better solution? Thanks

Re: [R] Shading area under PDF of t -distribution

2007-11-02 Thread Dieter Menne
Chung-hong Chan chainsawtiney at gmail.com writes: I have plot the PDF of t distribution with df = 74. curve(dt(x,df=74),from=-4, to=4) how can I shade the area under curve (for example, col=red) from t=+- 1.996? If you could used lattice plots instead, below is a modified version of the

Re: [R] coef se in lme

2007-11-02 Thread Irene Mantzouni
Thank you very much for the reply (and hopefully I am replying back in the proper way). Do you think the delta method would be an acceptable way to estimate approximate confidence intervals for the resulting group specific coefficients (combining fixed effects and BLUPS)? Regarding the MCMC

Re: [R] Sweave, and long lasting scripts

2007-11-02 Thread Thibaut Jombart
John Lande wrote: Dear R user, I am using Sweave to write my reports with R code. Unlucly my code take a lot of time to run, and I don't want to run it multiple time, if possible, as I am still developping the tools. It seems that a sweave run does not save the enviroment at the end of the

Re: [R] correct wording and notation for R stuff in LaTex

2007-11-02 Thread Duncan Murdoch
Edna Bell wrote: Hi R Gurus: I'm putting together an article about some R stuff in Latex. I refer to packages and functions. I think that I use {\em} for packages and {\tt} for functions. Is that correct, please? I think that decision depends on the editorial policies of whoever

[R] useR! 2008 - last call for tutorial proposals

2007-11-02 Thread Uwe Ligges
As most of you already know from a previous announcement, the R user conference useR! 2008 is scheduled for August 12-14, 2008, and will take place at the University of Dortmund. PRE-CONFERENCE TUTORIALS Before the official program, half-day tutorials will be offered on Monday,

[R] duplicate rows in a matrix

2007-11-02 Thread Silvia Lipski
Hi! Is there a fast way to duplicate rows in a matrix? I would like to do the following: change a matrix A like: [,1] [,2] [1,] Kevin 1 [2,] Alf 2 into : [,1] [,2] [1,] Kevin 1 [2,] Kevin 1 [3,] Alf 2 [4,] Alf 2 i.e. double all rows. The only way I could think off was:

[R] lme model with replicates within a random factor

2007-11-02 Thread Stéphanie Gascón Garcia
Dear all, I wonder if anyone can help me with specifying a right model for my analysis. I am a beginner to lme methods. I was unfortunately not able to find a solution to my problem on my own. Data structure: I have sampled monthly 6 basins during two hydrological cycles, and I have taken

Re: [R] when deleting a row from a matrix gives a vector

2007-11-02 Thread Sarah Goslee
x - x[1, drop=FALSE] Is there any way to force the result to remain a matrix, even if it has only one row or column, or even only one entry? Thanks, -- Sarah Goslee http://www.functionaldiversity.org __ R-help@r-project.org mailing list

[R] when deleting a row from a matrix gives a vector

2007-11-02 Thread Gabriel Valiente
Deleting a row from a matrix turns it into a vector (and dim names are lost) if the resulting matrix has only one row or column. For instance: x - matrix(1:10, ncol=2) x - x[1,] turns x into [1] 1 6 instead of [,1] [,2] [1,]16 Is there any way to force the result to

Re: [R] when deleting a row from a matrix gives a vector

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 20:47 +0100, Gabriel Valiente wrote: Deleting a row from a matrix turns it into a vector (and dim names are lost) if the resulting matrix has only one row or column. For instance: x - matrix(1:10, ncol=2) x - x[1,] turns x into [1] 1 6 instead of

Re: [R] when deleting a row from a matrix gives a vector

2007-11-02 Thread Vijay Vaidyanathan
On Nov 2, 2007, at 12:50 PM, Sarah Goslee wrote: x - x[1, drop=FALSE] Is there any way to force the result to remain a matrix, even if it has only one row or column, or even only one entry? Thanks, I think you might have meant ... x - x[1,,drop=FALSE] Note the double commas ... - VV

[R] writing a categorical var. with condition

2007-11-02 Thread sigalit mangut-leiba
Hello, I want to create a new variable which includes 4 age categories in this way: if (age=12 age32) age1==1 if (age=32 age52) age1==2 if (age=52 age72) age1==3 if (age=72 age100) age1==4 but I get the results only for the first observation. how can I apply this condition to all

[R] [OT] vista question

2007-11-02 Thread Edna Bell
This is way off topic, but I'll try: On a windows vista machine, how can you run commands from the command prompt as administrator, please? tia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] hide or minimize graphics

2007-11-02 Thread Felipe Carrillo
Hello all: Is there a way to create a graph and then hide it or just make a graph in the background (invisible). Thanks Felipe D. Carrillo Fishery Biologist US Fish Wildlife Service Red Bluff, California 96080 __ R-help@r-project.org mailing

Re: [R] writing a categorical var. with condition

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 22:02 +0200, sigalit mangut-leiba wrote: Hello, I want to create a new variable which includes 4 age categories in this way: if (age=12 age32) age1==1 if (age=32 age52) age1==2 if (age=52 age72) age1==3 if (age=72 age100) age1==4 but I get the results

Re: [R] hide or minimize graphics

2007-11-02 Thread Marc Schwartz
On Fri, 2007-11-02 at 13:29 -0700, Felipe Carrillo wrote: Hello all: Is there a way to create a graph and then hide it or just make a graph in the background (invisible). Thanks I think that we will need more information here, notably what you want to ultimately do with the graph. You could

[R] [R-pkgs] gplots 2.5.0

2007-11-02 Thread Gregory. R. Warnes
Announcing gplots 2.5.0 - gplots provides additional plotting functions, including several enhanced versions of base R functions. Provided functions include: balloonplot, bandplot, barplot2, boxplot.n, colorpanel, heatmap.2, hist2d, lowess,

Re: [R] lme model with replicates within a random factor

2007-11-02 Thread Bert Gunter
1. Consult the Pinheiro and Bates, MIXED EFFECTS MODELS ... book, especially if you will continue to use such methodology as part of your professional work. 2. I think the model you want is: Model1-lme(shannon ~ log(chla+1)*toc*hyd_cycle,random = ~time|basin) You don't need to include the

Re: [R] Permutation test, grouped data

2007-11-02 Thread Tom Backer Johnsen
Brian S Cade wrote: Tom: Paul Mielke, emeritus professor at Colorado State University, probably has some of the most efficient Fortran programs for enumerating all possible permutations of small sample sizes for grouped comparisons and Monte Carlo random sampling of the possible

Re: [R] writing a categorical var. with condition

2007-11-02 Thread sigalit mangut-leiba
Thank you! Sigalit. On 11/2/07, Marc Schwartz [EMAIL PROTECTED] wrote: On Fri, 2007-11-02 at 22:02 +0200, sigalit mangut-leiba wrote: Hello, I want to create a new variable which includes 4 age categories in this way: if (age=12 age32) age1==1 if (age=32 age52) age1==2 if

Re: [R] R timeDate does not allow seconds?

2007-11-02 Thread jim holtman
Seems to work fine with this call: inputdate = 2007-10-31_16.20.22 timeDate(as.character(inputdate),format=%Y-%m-%d_%H.%M.%S) GMT [1] [2007-10-31 16:20:22] On 11/2/07, B. Bogart [EMAIL PROTECTED] wrote: Hello all, Sorry if anyone gets this message twice, as my mailserver may not be

Re: [R] when deleting a row from a matrix gives a vector

2007-11-02 Thread Thomas Lumley
On Fri, 2 Nov 2007, Gabriel Valiente wrote: Is there any way to force the result to remain a matrix, even if it has only one row or column, or even only one entry? Thanks, Yes. See the FAQ entry or the help page. -thomas Thomas Lumley Assoc. Professor,

Re: [R] R timeDate does not allow seconds?

2007-11-02 Thread B. Bogart
Hi Jim, Yes that works!!! Why the heck do I need to put %H.%M.%S when the input format is %H:%M:%S ? (. in place of :. I see in the help(timeDate) examples where the format is properly written as %Y-%m-%d %H:%M:%S So why does this not work: date =

Re: [R] R timeDate does not allow seconds?

2007-11-02 Thread jim holtman
This is what your example had in it. You can format the data in any format that you want. This is nothing special about ':'. On 11/2/07, B. Bogart [EMAIL PROTECTED] wrote: Hi Jim, Yes that works!!! Why the heck do I need to put %H.%M.%S when the input format is %H:%M:%S ? (. in place of

Re: [R] writing a categorical var. with condition

2007-11-02 Thread Ted Harding
On 02-Nov-07 21:02:57, sigalit mangut-leiba wrote: Hello, I want to create a new variable which includes 4 age categories in this way: if (age=12 age32) age1==1 if (age=32 age52) age1==2 if (age=52 age72) age1==3 if (age=72 age100) age1==4 but I get the results only for the first

Re: [R] How to see source code of nnet package

2007-11-02 Thread Bill.Venables
It is one of the packages in the VR bundle. You will find the sources in the source version of the bundle. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dajie Luo Sent: Saturday, 3 November 2007 12:16 AM To: [EMAIL PROTECTED] Subject: [R] How to see

Re: [R] [OT] vista question

2007-11-02 Thread Gabor Grothendieck
Try runas /? On Nov 2, 2007 4:05 PM, Edna Bell [EMAIL PROTECTED] wrote: This is way off topic, but I'll try: On a windows vista machine, how can you run commands from the command prompt as administrator, please? tia __ R-help@r-project.org

Re: [R] duplicate rows in a matrix

2007-11-02 Thread Bill.Venables
... but you may not want the rows re-ordered. Here is a possible modification that uses a similar idea: m - matrix(1:(2*nrow(A)), ncol = 2, byrow = TRUE) AA - rbind(A, A)[order(m), ] Bill Venables -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juan