Re: [R] How to take the lower triangular part from a full matrix

2010-06-16 Thread Romain Francois
Le 17/06/10 06:44, ZZY ZYBOYS a écrit : Dear all: I have a question regarding on how to take the lower triangular part from a full matrix. for example 1 2 3 1 0 0 3 4 5 to 3 4 0 7 8 9 7 8 9 Thanks, Joey Please take at least th

Re: [R] Function argument as string

2010-06-16 Thread Vishwanath Sindagi
Perfect. Thanks Erik. On Thu, Jun 17, 2010 at 1:07 AM, Erik Iverson wrote: > > > Vishwanath Sindagi wrote: >> >> Hi, >> >> Suppose a write a function >> >> a_fn<-function(arg1) >> { >> >>    return(table(arg1)); >> } >> >> I have a column called AGE. Now I call the function c = a_fn(AGE); >> >> W

[R] Too many columns with prelim.norm

2010-06-16 Thread rockclimber112358
-Original Message- From: rockclimber112...@gmail.com Date: Wed, 16 Jun 2010 23:38:49 To: Reply-To: rockclimber112...@gmail.com Subject: Too many columns with prelim.norm Hi everyone, I'm trying to use prelim.norm with a "big" matrix (36 columns by 1 or so rows). I found that prel

[R] How to take the lower triangular part from a full matrix

2010-06-16 Thread ZZY ZYBOYS
Dear all: I have a question regarding on how to take the lower triangular part from a full matrix. for example 1 2 3 1 0 0 3 4 5 to 3 4 0 7 8 9 7 8 9 Thanks, Joey [[alternative HTML version deleted]] _

Re: [R] sapply or apply

2010-06-16 Thread Joshua Wiley
Hello Roslina, Maybe it is just me, but I have difficulty picking apart what you are trying to do because, the data have the same names as the arguments in your functions, and when you create the function term(), you have two sets of arguments (for term() and for gam_sum() ) that have the same nam

Re: [R] [ADMB Users] an alternative to R for nonlinear stat models

2010-06-16 Thread Rubén Roa
De: users-boun...@admb-project.org [mailto:users-boun...@admb-project.org] En nombre de Chris Gast Enviado el: miércoles, 16 de junio de 2010 21:11 Para: Arni Magnusson CC: r-help@r-project.org; us...@admb-project.org Asunto: Re: [ADMB Users] an alternative to R f

Re: [R] t-test problem

2010-06-16 Thread Joshua Wiley
On Wed, Jun 16, 2010 at 3:30 PM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > > and > > x2,y2 > > I wish to do a test for differences in means of x1 and y1, ditto x2 and y2. > > I am getting odd results.  I am not sure I am using 'pt' properly... > > I have not included the raw v

Re: [R] t-test problem

2010-06-16 Thread Joshua Wiley
Look what happens when you use lower.tail=FALSE (see ?pt ). If that is not your problem, perhaps you can provide a short sample vector that replicates your results? Josh On Wed, Jun 16, 2010 at 10:02 PM, Worik R wrote: > More: > > When the t-stat is > 0 should I use 'pt' differently? > > I have

Re: [R] t-test problem

2010-06-16 Thread Worik R
More: When the t-stat is > 0 should I use 'pt' differently? I have been checking my results and (except for the example I posted) all the inconsistencies occur when t>0 Worik On Thu, Jun 17, 2010 at 10:30 AM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > > and > > x2,y2 > > I

Re: [R] t-test problem

2010-06-16 Thread Worik R
If it were not for the fact that I get inconsistent results I would be sure that I need... 2*pt(stat, df) Section 8.1 of R-intro.pdf is explicit. Problem is it gives inconsistent results Worik On Thu, Jun 17, 2010 at 10:30 AM, Worik R wrote: > I have two pairs of related vectors > x1,y1 > >

[R] how to use sapply code

2010-06-16 Thread Jorge Ivan Velez
Hi Roslina, Try the following instead: # option 1 transform(bt_alp, result = (min(bt)/bt)^alp) # option 2 with(bt_alp, (min(bt)/bt)^alp) HTH, Jorge On Wed, Jun 16, 2010 at 11:17 PM, Roslina Zakaria <> wrote: > Hi, > > I have this code here and try to use sapply code. But I got error messag

Re: [R] how to use sapply code

2010-06-16 Thread Jeff Newmiller
Roslina Zakaria wrote: Hi, I have this code here and try to use sapply code. But I got error message that I don't really understand to correct. bt <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_alp <- data.frame(

Re: [R] Backslash in paste() function

2010-06-16 Thread Nikhil Kaza
On Jun 16, 2010, at 9:23 AM, Stefan Petersson wrote: Just double all the backslashes and you are fine. In order to see the outcome, use cat() (not print). Uwe Ligges On 16.06.2010 09:49, Stefan Petersson wrote: Hi, I'm trying to build a vector of latex commands. However, I need the comm

[R] how to use sapply code

2010-06-16 Thread Roslina Zakaria
Hi, I have this code here and try to use sapply code.  But I got error message that I don't really understand to correct. bt   <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_alp <- data.frame(bt,alp) sapply(bt_alp, f

[R] No graphics capability on fresh install of R2.11.0 on FreeBSD 8.0

2010-06-16 Thread Ben Madin
G'day all, I am working on a new FreeBSD 8.0 Server (remotely located), and have installed (now several times) R 2.11.0 but I cannot get any graphic outputs (everything else seems to be happening fine...) During install I have noticed and checked that png, jpeg, cairo etc libraries are availab

[R] Too many columns with prelim.norm

2010-06-16 Thread rockclimber112358
Hi everyone, I'm trying to use prelim.norm with a "big" matrix (36 columns by 1 or so rows). I found that prelim.norm has a built-in limit of 30 columns, but I'd still really like to use it for my data. Does anyone know of a different way to do the same thing? Or, would it be easier to t

[R] R and LINGO?

2010-06-16 Thread brwin338
Good Evening Does anyone in the R-help list have experience writing an R wrapper that interfaces with the commercial packages LINGO and/or LINDO.api from R? I have a set of nonlinear/mixed integer problems that solve nicely with LINGO but I would like to use R to set the problems up and analyze

Re: [R] Latex and r (using summary from RMS)

2010-06-16 Thread moleps
Dear all, After spending all day and most of the night on this I did a new R-installation and it works. The question now is - upon running this code (from the Hmisc library-latex function) I believe the call to summary.formula is allright, but the latex command results in a totally different tab

Re: [R] working with zoo time index ??

2010-06-16 Thread skan
thanks How can I do it without using "aggregate"? In other languages they use commands like Time[i] or Date[i]<>Date[i-1] were i is the cell -- View this message in context: http://r.789695.n4.nabble.com/working-with-zoo-time-index-tp2255804p2257952.html Sent from the R help mailing list a

Re: [R] working with zoo time index ??

2010-06-16 Thread skan
OK, I've seen now your reply now thanks very much -- View this message in context: http://r.789695.n4.nabble.com/working-with-zoo-time-index-tp2255804p2257958.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org maili

Re: [R] an alternative to R for nonlinear stat models

2010-06-16 Thread Arni Magnusson
It has been brought to my attention that the 1997 benchmark was updated in 2006, using R instead of S-Plus. and a newer computer, obviously. The result was that ADMB converged more than 1000 times faster than R. The model is an ecological population model, not unlike Gove et al. (2002). Anyone

Re: [R] how to 'average' one col wrt to another one

2010-06-16 Thread Jorge Ivan Velez
Hi Yi, Try this: res <- with(data.frame(test), prop.table(table(paste(leave, arrive, sep = ""), line), 1)) rowSums(res^2) HTH, Jorge On Wed, Jun 16, 2010 at 9:28 PM, YI LIU <> wrote: > Hi, folks, > > test=matrix(rep(letters[1:3],6),nrow=6,byrow=T) > test[2,]=letters[5:7] > test[4,]=c('e','f',

Re: [R] how to 'average' one col wrt to another one

2010-06-16 Thread Bill.Venables
Is this the kind of thing you want? > test <- matrix(rep(letters[1:3],6),nrow=6,byrow=T) > test[2,] <- letters[5:7] > test[4,] <- c('e','f','i') > test[1,3] <- 'i' > colnames(test) <- c('leave','arrive','line') > test <- data.frame(test) > tab <- with(test, table(paste(leave, arrive, sep=""), lin

[R] how to 'average' one col wrt to another one

2010-06-16 Thread YI LIU
Hi, folks, test=matrix(rep(letters[1:3],6),nrow=6,byrow=T) test[2,]=letters[5:7] test[4,]=c('e','f','i') test[1,3]='i' colnames(test)=c('leave','arrive','line') The code will generate a sample dataset. I have thousands rows of data. For the same 'leave' and 'arrive', how can I get the sum of squ

Re: [R] Decile

2010-06-16 Thread J. Arturo Coral Alamo
It was a great help Phil! but I was in some doubts with the cut command, so I develop this program using the Ntil formula in this case vigntil or NTIL(20) and NTIL(10) respectively, but definitely thanks again!!! lk<-c(12,23,34,13,45,56) > cut(lk,quantile(lk,(0:20)/20),labels=FALSE,include.lowes

[R] sapply or apply

2010-06-16 Thread Roslina Zakaria
Hi r-users, I have this code here : dt   <- winter_pos_sum bt   <- c(24.96874, 19.67861, 23.51001, 19.86868); round(bt,2) alp  <- c(2.724234, 3.914649, 3.229146, 3.120719); round(alp,2) bt_min  <- min(bt) ; bt_min p   <- alp_sum    ; p t  <- 50 t1 <- t+1     #first get the sum ove

Re: [R] Decile

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 7:10 PM, J. Arturo Coral Alamo wrote: > I'm trying to find a similar function as decile of SPSS, NTILES (10) >  some of you know about  that, I will appreciate your help in advance. See quantcut in the Hmisc package. __ R-help@r

Re: [R] Decile

2010-06-16 Thread Phil Spector
Arturo - Something like cut(x,quantile(x,(0:10)/10),labels=FALSE,include.lowest=TRUE) should give you what you want. - Phil Spector Statistical Computing Facility Depart

Re: [R] Decile

2010-06-16 Thread J. Arturo Coral Alamo
> > Hello comunity, > > I'm trying to find a similar function as decile of SPSS, NTILES (10) > some of you know about that, I will appreciate your help in advance. > > In SPSS > VARIABLES=Sales (A) /NTILES (10) /PRINT=NO > > for example if I have Next data input: > > case IdCustSales Profit

[R] Decile

2010-06-16 Thread J. Arturo Coral Alamo
Hello comunity, I'm trying to find a similar function as decile of SPSS, NTILES (10) some of you know about that, I will appreciate your help in advance. In SPSS VARIABLES=Sales (A) /NTILES (10) /PRINT=NO for example if I have Next data input: case IdCust Sales Profit 1 265 140.81 314.31 2 2

Re: [R] questions on some operators in R

2010-06-16 Thread David Winsemius
On Jun 16, 2010, at 6:33 PM, li li wrote: Hi all, I have two questions. Can some one give some help? The first question is regarding the pair of operators "&" and "&&". What is the difference between the two? & operates on vectors, returns a vector && operates on the first item in ea

[R] questions on some operators in R

2010-06-16 Thread li li
Hi all, I have two questions. Can some one give some help? The first question is regarding the pair of operators "&" and "&&". What is the difference between the two? The second question is regarding "<-" and "=". Usually we use "<-" as the assignment operator. I saw some people use "="

[R] t-test problem

2010-06-16 Thread Worik R
I have two pairs of related vectors x1,y1 and x2,y2 I wish to do a test for differences in means of x1 and y1, ditto x2 and y2. I am getting odd results. I am not sure I am using 'pt' properly... I have not included the raw vectors as they are long. I am interested if I am using R properly..

Re: [R] Accessing the elements of summary(prcomp(USArrests))

2010-06-16 Thread Prof Brian Ripley
Hints: (i) List the function by stats:::summary.prcomp . You will see that the table is component 'importance' of the list result. So take a look at summary(prcomp(USArrests))$importance[2, ] (ii) This looks a lot like screeplot(). (iii) prcomp(USArrests) is inappropriate, as the help file f

Re: [R] working with zoo time index ??

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 4:55 PM, Gabor Grothendieck wrote: > On Wed, Jun 16, 2010 at 1:10 PM, skan wrote: >> >> I said taking the first element everyday, but that was just an example, I >> could need one every 2 hours or something more complicated such as one every >> hour if the former one was n

Re: [R] working with zoo time index ??

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 1:10 PM, skan wrote: > > I said taking the first element everyday, but that was just an example, I > could need one every 2 hours or something more complicated such as one every > hour if the former one was non null. Lines <- "1990-01-01 10:00:00 , 0.900 # eleme

Re: [R] Parallel computing on Windows (foreach) (Sergey Goriatchev)

2010-06-16 Thread Tal Galili
Hi all, Just for the record, this is the link to the blog post: http://www.r-statistics.com/2010/04/parallel-multicore-processing-with-r-on-windows/ You can run work in parallel in multiple processors. Although it is only worthwhile when each "task" takes a long time to run (I give an example to

Re: [R] Sampling with replacement

2010-06-16 Thread Johannes Huesing
Somnath Somnath [Wed, Jun 16, 2010 at 07:27:32PM CEST]: > Thanks for all those reply. Is there any general rule to determine how many > samples I would get from a population of size "n", I draw a sample of size > "m" ("m" may be greater than "n") if sample is drawn with replacement? m^n -- Joh

[R] shrout & fleiss ICC´s with varying numbers of judges

2010-06-16 Thread Helter Two
Win7, R2.11.0 I am working on a report together with several co-authors. The data concern several performance measures on a set of groups. These measures are scored by external judges. We report findings on several datasets, including several of the 6 ICC's discussed by Shrout & Fleiss (1979). We

Re: [R] Parallel computing on Windows (foreach) (Sergey Goriatchev)

2010-06-16 Thread Sergey Goriatchev
John, Steve, thank you for answering my post! On Wed, Jun 16, 2010 at 20:55, Steve Lianoglou wrote: > Hi, > > I think I lost the reference email somewhere, but: > >> Not only is the sequential foreach much slower than the simple >> for-loop (as least in this particular instance), but I am not qui

Re: [R] Parallel computing on Windows (foreach)

2010-06-16 Thread Sergey Goriatchev
Thank you, Mario. On Wed, Jun 16, 2010 at 14:51, Mario Valle wrote: > > > On 15-Jun-10 17:07, Sergey Goriatchev wrote: >> >> Hello, >> >> I am reading "Using The foreach Package" document and I have tried the >> following: >> >>

Re: [R] RegExp question

2010-06-16 Thread Andrej
Thanks Romain, works like a charm! Thanks David! Best, Andrej On Jun 16, 10:15 pm, Romain Francois wrote: > Le 16/06/10 18:54, Andrej a écrit : > > > > > Thanks David for your fast reply, but now I realized tat "string" is > > of type: > > >> class(string) > > [1] "jobjRef" > > attr(,"package")

Re: [R] Reading data from xls..........please help

2010-06-16 Thread Christofer Bogaso
Thanks for your reply. Possibly I donot have perl. I am not sure although. How I can find whether I have it? If I dont have it then where can I download it from? On Thu, Jun 17, 2010 at 12:57 AM, Barry Rowlingson < b.rowling...@lancaster.ac.uk> wrote: > On Wed, Jun 16, 2010 at 7:29 PM, Christofe

Re: [R] Question

2010-06-16 Thread Matt Shotwell
Since there is a simple closed form for the truncated exponential CDF, you can use inverse transform sampling. I believe this is quite common in survival analysis methods. The first step is to compute and write an R function to compute the inverse CDF for the truncated exponential, say itexp <- f

Re: [R] RegExp question

2010-06-16 Thread Romain Francois
Le 16/06/10 18:54, Andrej a écrit : Thanks David for your fast reply, but now I realized tat "string" is of type: class(string) [1] "jobjRef" attr(,"package") [1] "rJava" so I get an error when i try with gsub or sub: sub("^.+\\t(\\d+)\\n.+$", "\\1", string) Error in as.character.default

Re: [R] Sampling with replacement

2010-06-16 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Somnath Somnath > Sent: Wednesday, June 16, 2010 10:28 AM > To: r-help@r-project.org > Subject: Re: [R] Sampling with replacement > > Thanks for all those reply. Is there any gen

Re: [R] qplot

2010-06-16 Thread stephen sefick
Can you make this a reproducible example? On Wed, Jun 16, 2010 at 3:08 PM, Line Andersen wrote: > Hello, > I am a new r-user, and after a great effort I have made this fantastic > figure with qplot: > > qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF, > geom="boxplot",

[R] qplot

2010-06-16 Thread Line Andersen
Hello, I am a new r-user, and after a great effort I have made this fantastic figure with qplot: qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF, geom="boxplot", position="dodge",xlab=NULL,ylab=("CBF,white matter-normalized"),main=("Differences between carriers and non-

[R] Sending a null byte to a socket

2010-06-16 Thread Dan Tenenbaum
Hello, I am trying to write some code in R to communicate over sockets via the STOMP protocol (http://stomp.codehaus.org/Protocol). As you can see, a null byte (ASCII 0) is used as the "over" signal. I'd like to be able to do something like this: write.socket(socket, "CONNECT\nlogin: me\npassco

[R] [R-pkgs] spikeslab 1.1.0 now available on CRAN

2010-06-16 Thread Udaya B. Kogalur
Please find release 1.1.0 of the CRAN package "spikeslab" now available for download. Spike and slab for prediction and variable selection in linear regression models. Uses a generalized elastic net for variable selection. CHANGES TO RELEASE 1.1.0 RELEASE 1.1.0 is a recommended upgrade of the pr

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Bert Gunter
Frank: See section 9.2. "Efficiency and it's Deficiencies" of Cuthbert Daniel's "Application of Statistics to Industrial Experimentation" (1976, Wiley -- alas, probably now out of print). Admittedly a different context, but statistical efficiency (aka "power") is not a transcendent virtue. Robust

Re: [R] working with zoo time index ??

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 12:40 PM, skan wrote: > > Hi > I'll ask in a different way... > > I have all this in a file.txt > > 1990-01-01 10:00:00 ,  0.900          #  element 1 > 1990-01-01 10:01:00 ,  0.910          #  element 2 > 1990-01-01 10:03:00 ,  0.905          #  element 3 > 1990-01-01 10:0

Re: [R] Function argument as string

2010-06-16 Thread Jorge Ivan Velez
Try # data AGE <- rpois(25, 30) # option 1 foo <- function(string) table(get(deparse(substitute(string foo(AGE)# no quotes # option 2 foo2 <- function(string) table(get(string)) foo2('AGE') # note the quotes here HTH, Jorge On Wed, Jun 16, 2010 at 11:30 AM, Vishwanath Sindagi <> wrot

Re: [R] Accessing the elements of summary(prcomp(USArrests))

2010-06-16 Thread Erik Iverson
Josh B wrote: Hello again, I was hoping one of you could help me with this problem. Consider the sample data from R: summary(prcomp(USArrests)) Importance of components: PC1 PC2PC3 PC4 Standard deviation 83.732 14.2124 6.4894 2.48279 Proportion of Variance 0.966 0.0278 0.00

Re: [R] Reading data from xls..........please help

2010-06-16 Thread Barry Rowlingson
On Wed, Jun 16, 2010 at 7:29 PM, Christofer Bogaso wrote: > Can anyone help me how to read xls file into R. I have tried following > > library(gdata) > xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') > read.xls(xlsfile) > > I got following error: > Converting xls file to csv file...

[R] mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-16 Thread Carlo Fezzi
Dear all, I am using the "mgcv" package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals. I would like to test this model vs a standard parametric mixed model, such as the ones which are possible to estimate with "lme". Since the smoothing

Re: [R] Reading data from xls..........please help

2010-06-16 Thread Gabor Grothendieck
On Wed, Jun 16, 2010 at 2:29 PM, Christofer Bogaso wrote: > Can anyone help me how to read xls file into R. I have tried following > > library(gdata) > xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') > read.xls(xlsfile) > > I got following error: > Converting xls file to csv file...

Re: [R] Latex and r

2010-06-16 Thread moleps
xdvi is installed in the same location as yours. I even did a reinstallment of mactex. Still doesnt work. But since I´m now convinced its related to my latex distribution I´ll take the problem elsewhere.. Regards, //M On 16. juni 2010, at 17.19, Prof Brian Ripley wrote: > On Wed, 16 Jun 201

Re: [R] Function argument as string

2010-06-16 Thread Erik Iverson
Vishwanath Sindagi wrote: Hi, Suppose a write a function a_fn<-function(arg1) { return(table(arg1)); } I have a column called AGE. Now I call the function c = a_fn(AGE); When a_fn is called, AGE is received in arg1. My question is, how do I access the actual name of the argument arg1?

Re: [R] Sampling with replacement

2010-06-16 Thread Somnath Somnath
Thanks for all those reply. Is there any general rule to determine how many samples I would get from a population of size "n", I draw a sample of size "m" ("m" may be greater than "n") if sample is drawn with replacement? Thanks, 2010/6/16 Jorge Ivan Velez > Hi Rafael, > > You might try: > > >

Re: [R] working with zoo time index ??

2010-06-16 Thread skan
I said taking the first element everyday, but that was just an example, I could need one every 2 hours or something more complicated such as one every hour if the former one was non null. -- View this message in context: http://r.789695.n4.nabble.com/working-with-zoo-time-index-tp2255804p2257641

[R] Accessing the elements of summary(prcomp(USArrests))

2010-06-16 Thread Josh B
Hello again, I was hoping one of you could help me with this problem. Consider the sample data from R: > summary(prcomp(USArrests)) Importance of components: PC1 PC2PC3 PC4 Standard deviation 83.732 14.2124 6.4894 2.48279 Proportion of Variance 0.966 0

[R] Function argument as string

2010-06-16 Thread Vishwanath Sindagi
Hi, Suppose a write a function a_fn<-function(arg1) { return(table(arg1)); } I have a column called AGE. Now I call the function c = a_fn(AGE); When a_fn is called, AGE is received in arg1. My question is, how do I access the actual name of the argument arg1? i.e, inside the function, i n

Re: [R] working with zoo time index ??

2010-06-16 Thread skan
Hi I'll ask in a different way... I have all this in a file.txt 1990-01-01 10:00:00 , 0.900 # element 1 1990-01-01 10:01:00 , 0.910 # element 2 1990-01-01 10:03:00 , 0.905 # element 3 1990-01-01 10:04:00 , 0.905 # element 4 1990-01-01 10:05:00 , 0.890

Re: [R] Sampling with replacement

2010-06-16 Thread Tom La Bone
How about library(TeachingSampling) SupportWR(20,4) Tom -- View this message in context: http://r.789695.n4.nabble.com/Sampling-with-replacement-tp2257450p2257644.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.or

Re: [R] Latex and r

2010-06-16 Thread Georg Otto
moleps writes: Apparently you don't have xdvi installed on your system. HTH Georg > Dear R´ers > > I´m trying to get a summary table using latex and summary in the rms package > to no avail. I´m running R 2.10.1, Mac OS X snow leopard and I have the > mactex 2009 distribution installed. An

Re: [R] [ADMB Users] an alternative to R for nonlinear stat models

2010-06-16 Thread Chris Gast
Hi Arni (and others), My dissertation work involves use (and extension) of models of the same ilk (sometimes exactly the same) as those described by Nancy Gove and John Skalski in their 2002 article. I began with R, and moved to my own home-brewed C/C++ programs for the sake of of speed when fitt

[R] Help asked for automated generation of ncdf variables

2010-06-16 Thread Adolf STIPS
Hi, I'm using the "ncdf" library for creating ncdf files. But I need to create about 100 variables per file (e.g. single rivers), So I do not like to create each variable separately. Unfortunately I found no way to make this work, as I'm unable to create a correct list of class "var.ncdf". ###co

Re: [R] an alternative to R for nonlinear stat models

2010-06-16 Thread Arni Magnusson
As far as I can tell, Gove et al. (2002) might be a good example for benchmarking the optimization performance of R vs. ADMB. It would be great if expert R users/developers could tweak Beni's model so that the performance comparison is valid. The main purpose is not to see which is faster or m

Re: [R] Parallel computing on Windows (foreach) (Sergey Goriatchev)

2010-06-16 Thread Steve Lianoglou
Hi, I think I lost the reference email somewhere, but: > Not only is the sequential foreach much slower than the simple > for-loop (as least in this particular instance), but I am not quite > sure how to make foreach run parallel. Where would I get this parallel > backend? I looked at doMC and do

[R] Antwort: Re: an alternative to R for nonlinear stat models

2010-06-16 Thread benedikt . gehr
Hi I think my first answer doesn't seem to have gone through due to the attachement. So I copy pasted my last answer including the code below. Sorry about that: Hi Paul Oh ok sorry, I send you below a copy of the R code I was using. It's very possible that my programmi

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Frank E Harrell Jr
The Friedman test lacks power. When there are only 2 blocks it reduces to the inefficient sign test. Frank On 06/16/2010 12:43 PM, Tal Galili wrote: Hello Jeremy, Thank you for replying. I came across friedman test (I even wrote and published R code to easily perform a post-hoc analysis of f

[R] Reading data from xls..........please help

2010-06-16 Thread Christofer Bogaso
Can anyone help me how to read xls file into R. I have tried following library(gdata) xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') read.xls(xlsfile) I got following error: Converting xls file to csv file... Error in system(cmd, intern = !verbose) : perl not found Error in file.ex

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Tal Galili > Sent: Wednesday, June 16, 2010 10:44 AM > To: Jeremy Miles > Cc: r-help@r-project.org > Subject: Re: [R] Is there a non-parametric repeated-measures Anova in R > ? >

Re: [R] Latex and r

2010-06-16 Thread Kevin E. Thorpe
moleps wrote: Dear R´ers I´m trying to get a summary table using latex and summary in the rms package to no avail. I´m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I´m missing? //M options(digits=3) set.seed(173) sex <- f

Re: [R] RegExp question

2010-06-16 Thread David Winsemius
On Jun 16, 2010, at 1:05 PM, Andrej wrote: Sorry, I apologize. Below is the minimal example. library(RWeka) model <- J48(as.factor(Species)~., data = iris) model J48 pruned tree -- Petal.Width <= 0.6: setosa (50.0) Petal.Width > 0.6 | Petal.Width <= 1.7 | | Petal.Lengt

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Tal Galili
Hello Jeremy, Thank you for replying. I came across friedman test (I even wrote and published R code to easily perform a post-hoc analysis of friedman test ). But what I am after is *multi-way* repeated-measures anov

Re: [R] Latex and r

2010-06-16 Thread Erik Iverson
moleps wrote: xdvi is installed in the same location as yours. I even did a reinstallment of mactex. Still doesnt work. But since I´m now convinced its related to my latex distribution I´ll take the problem elsewhere.. And the directory that xdvi is located in is in your path? __

Re: [R] Parallel computing on Windows (foreach) (Sergey Goriatchev)

2010-06-16 Thread Jay Emerson
foreach (or virtually anything you might use for concurrent programming) only really makes sense if the work the "clients" are doing is substantial enough to overwhelm the communication overhead. And there are many ways to accomplish the same task more or less efficiently (for example, doing block

Re: [R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Jeremy Miles
It's possible to use the ordinal regression model if your data are ordered categories. The standard non-parametric test is the Friedman test. ?friedman.test Jeremy On 16 June 2010 10:22, Tal Galili wrote: > Hello Prof. Harrell and dear R-help mailing list, > > I wish to perform a non-parametri

[R] Is there a non-parametric repeated-measures Anova in R ?

2010-06-16 Thread Tal Galili
Hello Prof. Harrell and dear R-help mailing list, I wish to perform a non-parametric repeated measures anova. If what I read online is true, this could be achieved using a mixed Ordinal Regression model (a.k.a: Proportional Odds Model). I found two packages that seems relevant, but couldn't find

Re: [R] RegExp question

2010-06-16 Thread Andrej
Sorry, I apologize. Below is the minimal example. library(RWeka) model <- J48(as.factor(Species)~., data = iris) > model J48 pruned tree -- Petal.Width <= 0.6: setosa (50.0) Petal.Width > 0.6 | Petal.Width <= 1.7 | | Petal.Length <= 4.9: versicolor (48.0/1.0) | | Petal.L

Re: [R] error message stops "for" command

2010-06-16 Thread Steve Lianoglou
Hi, On Wed, Jun 16, 2010 at 11:37 AM, diana buitrago wrote: > Hello all, > I am using a for statement to run a loop in R but I get an error message and > the loop stops. I need that the loop continues til the end. I know I can use > the NEXT command but I don´t know how the sintax woul be for thi

Re: [R] RegExp question

2010-06-16 Thread David Winsemius
Publicly produce something we can work with. I have no idea how to create an example that will match such an object. ?dput ?dump Read Posting Guide. -- David. On Jun 16, 2010, at 12:54 PM, Andrej wrote: Thanks David for your fast reply, but now I realized tat "string" is of type: class(st

Re: [R] RegExp question

2010-06-16 Thread Andrej
Thanks David for your fast reply, but now I realized tat "string" is of type: > class(string) [1] "jobjRef" attr(,"package") [1] "rJava" so I get an error when i try with gsub or sub: > sub("^.+\\t(\\d+)\\n.+$", "\\1", string) Error in as.character.default(x) : no method for coercing this S4 c

Re: [R] RegExp question

2010-06-16 Thread David Winsemius
On Jun 16, 2010, at 12:04 PM, Andrej wrote: Dear all, I'm trying to filter out the "number of leaves" (it should be 1 in the example below) from the following string: string [1] "Java-Object{J48 pruned tree\n--\n: 0 (15.0/3.0)\n \nNumber of Leaves : \t1\n\nSize of the tree

Re: [R] Mean variance plot of a data frame

2010-06-16 Thread Dennis Murphy
Hi: Look at the function plotmeans() in package gplots and run example(plotmeans). I tried something like plotmeans(Relevance ~ round(Position, 3), data = df, xlab = 'Position') but you may want to play with some of the options to get what you want. HTH, Dennis On Wed, Jun 16, 2010 at 8:25 AM,

Re: [R] Is there any function to read genbank flat files.

2010-06-16 Thread Andrej
Hi, I think it's better to ask on Bioconductor mailing list. Regards On Jun 16, 6:19 pm, Fahim Md wrote: > Hi > I am trying to read genbank est flat files. Is there any function in R to do > that. I was looking for something similar to SeqIO.parse(input_handle, > "genbank")  in bioPython that c

[R] Is there any function to read genbank flat files.

2010-06-16 Thread Fahim Md
Hi I am trying to read genbank est flat files. Is there any function in R to do that. I was looking for something similar to SeqIO.parse(input_handle, "genbank") in bioPython that convert the genebank sequence into fasta sequence. (One option is to call biopython from R but I am not familiar with

[R] RegExp question

2010-06-16 Thread Andrej
Dear all, I'm trying to filter out the "number of leaves" (it should be 1 in the example below) from the following string: > string [1] "Java-Object{J48 pruned tree\n--\n: 0 (15.0/3.0)\n \nNumber of Leaves : \t1\n\nSize of the tree : \t1\n}" Any idea how to do that as simple as

Re: [R] Sampling with replacement

2010-06-16 Thread Jorge Ivan Velez
Hi Rafael, You might try: > r <- expand.grid(rep(list(1:20), 4)) > dim(r) [1] 16 4 HTH, Jorge 2010/6/16 Rafael Björk <> > If you for some reason want to be shown all the possible combinations, try > expand.grid(1:20,1:20,1:20,1:20) (ugly code). Don't use this for sampling. > > hth Ra

Re: [R] error message stops "for" command

2010-06-16 Thread Joris Meys
for (i in 1:100){ if (i%%5==0) {print("And provide reproducible code.");next} print("Before posting to the mailing list, I will read the posting guide.") } Cheers Joris On Wed, Jun 16, 2010 at 5:37 PM, diana buitrago wrote: > Hello all, > I am using a for statement to run a loop in R but I g

Re: [R] Question about user define function

2010-06-16 Thread Allan Engelhardt
On 15/06/10 21:39, GL wrote: Have the following function that is called by the statement below. Trying to return the two dataframes, but instead get one large list including both tables. ReadInputDataFrames<- function() { dbs.this= read.delim("this.txt", header = TRUE, sep = "\t", quote="\"

[R] error message stops "for" command

2010-06-16 Thread diana buitrago
Hello all, I am using a for statement to run a loop in R but I get an error message and the loop stops. I need that the loop continues til the end. I know I can use the NEXT command but I don´t know how the sintax woul be for this particular situation. Any suggestions? Thanks, Diana Buitrago

Re: [R] Sampling with replacement

2010-06-16 Thread David Winsemius
On Jun 16, 2010, at 10:20 AM, Somnath Somnath wrote: Dear all, good morning, I have a population, let say members are tagged with some simple number like 1,2,3,...20. I want to draw a sample with replacement of size 4 (say, can be more than 20 also). Already answered on the list. Is t

Re: [R] Sampling with replacement

2010-06-16 Thread Rafael Björk
If you for some reason want to be shown all the possible combinations, try expand.grid(1:20,1:20,1:20,1:20) (ugly code). Don't use this for sampling. hth Rafael 2010/6/16 Jorge Ivan Velez > Try > > sample(20, 4, replace = TRUE) > > HTH, > Jorge > > > On Wed, Jun 16, 2010 at 10:20 AM, Somnath So

[R] Mean variance plot of a data frame

2010-06-16 Thread odif
Hello, I have a data frame that looks like Position, Relevance 0, 0.151531117072265 0, 0.245532564696541 0, 0.285207130323724 0, 0.302718099889669 0, 0.308213700400889 0, 0.341562706518953 0.0151515151515152, 0.368991215730364 0.0263157894736842, 0.256406702156839 0.0263157894736842, 0.3440031570

Re: [R] Multiple regressions

2010-06-16 Thread Steve Lianoglou
Hi, On Mon, Jun 14, 2010 at 4:24 PM, Amy Hessen wrote: > Hi Steve, > > Thank you very much for your reply. > Could you please tell me how I can know that a given dataset is non linear > regression? This is the type of question you should really consult a (local) stat expert for. I have some idea

Re: [R] R software

2010-06-16 Thread Paul Hiemstra
On 06/16/2010 03:08 PM, Gulbanu Rys wrote: Hello, I have downloaded several times your program R-2.11.1 32.exe, after the download when I click on the exe file I always receive the following error: "The setup files are corrupted. Please obtain a new copy of the program". Could you help me to d

Re: [R] Latex and r

2010-06-16 Thread Erik Iverson
moleps wrote: Dear R´ers I´m trying to get a summary table using latex and summary in the rms package to no avail. I´m running R 2.10.1, Mac OS X snow leopard and I have the mactex 2009 distribution installed. Any obvious things I´m missing? file587f83cb.log. sh: xdvi: command not found

  1   2   >