Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Barry Rowlingson
On Tue, Aug 24, 2010 at 7:18 AM, veepsirtt wrote: > > I could not install Rmail Package . > I got the following errors. > Then how to do.please > >  library("caTools") >> install.packages("Rmail",contriburl="http://www.math.mcmaster.ca/~bolker/R/src/contrib";) > > Warning: dependency ‘caTools’ is

[R] Odp: "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.08.2010 21:50:01: > I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel? (I am familiar with

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread veepsirtt
I could not install Rmail Package . I got the following errors. Then how to do.please library("caTools") > install.packages("Rmail",contriburl="http://www.math.mcmaster.ca/~bolker/R/src/contrib";) Warning: dependency ‘caTools’ is not available trying URL 'http://www.math.mcmaster.ca/~bolker/R/s

Re: [R] Read data in R

2010-08-23 Thread jim holtman
I sounds as if your data is encode as UTF-8. You may need to specify the fileEncoding parameter on the read.table function. On Mon, Aug 23, 2010 at 9:00 PM, Allie818 wrote: > > I have a txt file with column data separated by commas. > > Subject,Sessionblock,LotteryImg,SubjectResp,Pictime,Bidtime

Re: [R] Read data in R

2010-08-23 Thread Dennis Murphy
Hi: Here's one way, but there may be better options: de <- read.table(textConnection(" + Subject,Sessionblock,LotteryImg,SubjectResp,Pictime,Bidtime,Voltage,ForcedAns + 10816,Session1,75_C2.jpg,No,7095,9548,Mid,Yes + 10816,Session1,25_C1.jpg,No,16629,18130,Low,Yes + 10816,Session1,5_C1.jpg,No,232

Re: [R] Plotting multiple histograms on same panel

2010-08-23 Thread Dennis Murphy
Hi: On Mon, Aug 23, 2010 at 9:27 AM, LCOG1 wrote: > > Hey everyone, > So i cant figure this out. when using histogram() from lattice instead > of hist() i get what i want as far as output. But using histogram i can > seem to be able to figure out how to get multiple plots on the same panel.

Re: [R] forest plot

2010-08-23 Thread C.H.
The correct command for forest plot should be "plot" (instead of "forest") if you are using metagen from meta package. For help: ?plot.meta On Tue, Aug 24, 2010 at 11:03 AM, zhangweiwei wrote: > > Dear Sir or Madam, > > > > I am trying to plot forest plot. I extracted odds ratio and their > co

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread Dennis Murphy
Hi Jane: On Mon, Aug 23, 2010 at 8:05 PM, rusers.sh wrote: > Hi, > If you see the link http://www.stata.com/help.cgi?drawnorm, and you can > see an example, > #draw a sample of 1000 observations from a bivariate standard > normal distribution, with correlation 0.5. > #drawnorm x y, n(1000) cor

[R] forest plot

2010-08-23 Thread zhangweiwei
Dear Sir or Madam, I am trying to plot forest plot. I extracted odds ratio and their corresponding 95% confidence interval from papers, then I calculated the log(OR) and standard error using the following command OR<-metagen(logOR,selogOR,sm="OR") forest(OR,comb.fixed=TRUE,comb.random=TRU

[R] Read data in R

2010-08-23 Thread Allie818
I have a txt file with column data separated by commas. Subject,Sessionblock,LotteryImg,SubjectResp,Pictime,Bidtime,Voltage,ForcedAns 10816,Session1,75_C2.jpg,No,7095,9548,Mid,Yes 10816,Session1,25_C1.jpg,No,16629,18130,Low,Yes 10816,Session1,5_C1.jpg,No,23217,24276,Low,Yes 10816,Session1,75_C1.j

Re: [R] An example of using bootrap to find confidence interval from a corrected correlation value

2010-08-23 Thread minh
Good afternoon Mr. William, Hope you had a wonderful weekend. I am reading material on Splus to try to find a example of how to find confidence interval from a corrected correlation value. I saw example in R but i have not found yet an example in Splus to show how to do it. If you hap

[R] Draw a perpendicular line?

2010-08-23 Thread CZ
Hi, I am trying to draw a perpendicular line from a point to two points. Mathematically I know how to do it, but to program it, I encounter some problem and hope can get help. Thanks. I have points, A, B and C. I calculate the slope and intercept for line drawn between A and B. I am trying to

[R] How to remove all objects except a few specified objects?

2010-08-23 Thread Cheng Peng
How to remove all R objects in the RAM except for a few specified ones? rm(list=ls()) removes all R objects in the R work space. Another question is that whether removing all R objects actually releases the RAM? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-remov

[R] : Automatic Debugging

2010-08-23 Thread ArtemisIrvine
Hi, I need help executing the debug() function automatically, as opposed to line-by-line execution. Essentially I want to create something like this: execute <- function(fname , farguments) { debug(fname) undebug(fname) } Where "..." is a process which automatically runs debug until an e

[R] Plotting multiple histograms on same panel

2010-08-23 Thread LCOG1
Hey everyone, So i cant figure this out. when using histogram() from lattice instead of hist() i get what i want as far as output. But using histogram i can seem to be able to figure out how to get multiple plots on the same panel. So par(mfrow=c(3,2)) for (i in 1:20) hist(rnorm(100),ma

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 11:05 PM, rusers.sh wrote: Hi, If you see the link http://www.stata.com/help.cgi?drawnorm, and you can see an example, #draw a sample of 1000 observations from a bivariate standard normal distribution, with correlation 0.5. #drawnorm x y, n(1000) corr(0.5) This is what S

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread rusers.sh
Hi, If you see the link http://www.stata.com/help.cgi?drawnorm, and you can see an example, #draw a sample of 1000 observations from a bivariate standard normal distribution, with correlation 0.5. #drawnorm x y, n(1000) corr(0.5) This is what Stata software did. What i hope to do in R should be

Re: [R] Adding column to dataframe

2010-08-23 Thread Matt Cooper
> > Provide and 'str' and 'object.size' of the object > so that we can see what you are working with. My rule of thumb is > that no single object should take more than 25-30% of memory since > copies may be made. So the reasons things are taking 20 minutes is > you might be paging. It is always

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread Ben Bolker
rusers.sh gmail.com> writes: > rmvnorm()can be used to generate the random numbers from a multivariate > normal distribution with specified means and covariance matrix, but i want > to specify the correlation matrix instead of covariance matrix for the > multivariate > normal distribution. > Do

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Dennis Murphy
Hi: I think it would be tough to do that in qplot(), but it's easier in ggplot(), even if you don't add the mean information to the data frame. Here's one way - use the three person data frame (call it dat1) and the mean.y data frame that you created from aggregate() without adding the factor info

[R] Rotate x-axis label on log scale

2010-08-23 Thread Tim Elwell-Sutton
Hi I'd appreciate some help with plotting odds ratios. I want to rotate the labels on the x-axis by 45 degrees. The usual way of doing this, using text - e.g. text(1, par('usr')[3]-2.25..) - gives no result when the y-axis is a log scale. I guess this is because, as the par help says, for a

[R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread rusers.sh
Hi all, rmvnorm()can be used to generate the random numbers from a multivariate normal distribution with specified means and covariance matrix, but i want to specify the correlation matrix instead of covariance matrix for the multivariate normal distribution. Does anybody know how to generate the

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
On Mon, Aug 23, 2010 at 6:19 PM, Dennis Murphy wrote: > > This is an excellent idea - the only snag might occur if someone wants > the mean line to be thicker :) fortunately, with your lattice solution this is easily accomplished by passing a vector to lwd: i <- c(1, 1, 1, 3) mykey <- list(spac

Re: [R] unexpected subset select results?

2010-08-23 Thread Dennis Murphy
And, of course, there's transform, as David knows very well: d <- transform(d, c = (a + b) > 25) > head(d) abzc 1 1 2001 5001 TRUE 2 2 2002 5002 TRUE 3 3 2003 5003 TRUE 4 4 2004 5004 TRUE 5 5 2005 5005 TRUE 6 6 2006 5006 TRUE As far as David's 'wrong way' is concerned, I think he ma

Re: [R] unexpected subset select results?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 6:28 PM, David Winsemius wrote: On Aug 23, 2010, at 5:51 PM, ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c <- (a+b)>25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mis

Re: [R] 3D stariway plot

2010-08-23 Thread Ben Bolker
mauede alice.it alice.it> writes: > > > Please, is there an R function /package that allows for 3D stairway plots like the attached one ? > In addition, how can I overlay a parametric grid plot?? Not exactly, that I know of, but maybe you can adapt library(rgl) demo(hist3d) to do what

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Dennis Murphy
Hi: On Mon, Aug 23, 2010 at 4:19 PM, Kingsford Jones wrote: > Hi Lei, > > Hope you don't mind I'm moving this back to the list in case others > may benefit. Answers below... > > On Mon, Aug 23, 2010 at 3:37 PM, Lei Liu wrote: > > Hi Kingsford, > > > > Thanks a lot! I got some help from my colle

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Thanks a lot! It sure helped. also thanks to all other repliers. kind regards Johan Op 23/08/2010 23:53, John Fox schreef: Dear Johan, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Johan Steen Sent: August-23-10 3:02 PM To:

Re: [R] Memory Issue

2010-08-23 Thread Dennis Murphy
Hi: Are you running 32-bit or 64-bit R? For memory-intensive processes like these, 64-bit R is almost a necessity. You might also look into more efficient ways to invert the matrix, especially if it has special properties that can be exploited (e.g., symmetry). More to the point, you want to compu

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
Hi Lei, Hope you don't mind I'm moving this back to the list in case others may benefit. Answers below... On Mon, Aug 23, 2010 at 3:37 PM, Lei Liu wrote: > Hi Kingsford, > > Thanks a lot! I got some help from my colleague by using the following code: > > xyplot(y~month,group=id, type="l"), the

Re: [R] Aspect Ratio

2010-08-23 Thread Peter Ehlers
On 2010-08-19 16:36, r.ookie wrote: This example definitely clarified a situation where 'asp' is useful/helpful. Thanks! Ted's last example is a bit misleading. You don't get the same result from setting xlim and ylim equal as you do from using 'asp'. Indeed, this should help you to understan

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Erich Neuwirth
Search for an older message with the subject line [R] export tables to excel files on multiple sheets with titles for each table On 8/23/2010 11:41 PM, Erik Iverson wrote: > In addition to the Wiki already mentioned, the following may be > useful: > > http://learnr.wordpress.com/2009/10/06/expo

Re: [R] unexpected subset select results?

2010-08-23 Thread Henrique Dallazuanna
Try this: subset(d, TRUE, select=c( 'a', 'b', 'c' )) On Mon, Aug 23, 2010 at 7:15 PM, ivo welch wrote: > I would not have wanted a data set with 1000 variables, but an error > message. the intent was > > d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) >attach(d); d$c <- (a+b)>25; det

Re: [R] unexpected subset select results?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 5:51 PM, ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c <- (a+b)>25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 5:35 PM, Johan Steen wrote: Thanks for your replies, but unfortunately none of them seem to help. I do get p-values in the output, but can't seem to locate them anywhere in these objects via the str() function. That is because in the case of Anova.mlm objects ... they a

Re: [R] unexpected subset select results?

2010-08-23 Thread ivo welch
I would not have wanted a data set with 1000 variables, but an error message. the intent was d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); d$c <- (a+b)>25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) -iaw On Mon, Aug 23, 2010 at 6:04 PM, Erik Iverson wrote: > >

Re: [R] unexpected subset select results?

2010-08-23 Thread Erik Iverson
ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c <- (a+b)>25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably would have wanted. Wh

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Stuart Luppescu
On Mon, 2010-08-23 at 15:58 -0400, Lei Liu wrote: > That is, I will plot a growth curve for each subject ID, with y in > the y axis, and time in the x axis. I would like to have all growth > curves in the same plot. Is there a simple way in R to do it? Thanks a > lot! This article, entitled, "F

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread John Fox
Dear Johan and Dennis, I believe that the source of confusion is the difference between Anova.lm(), the Anova method for a linear-model object, which indeed has a summary method that returns an object from which you can extract p-values, and Anova.mlm(), which passes the multivariate-linear-model

[R] unexpected subset select results?

2010-08-23 Thread ivo welch
quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c <- (a+b)>25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably would have wanted. it does seem like unexpect

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread John Fox
Dear Johan, > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Johan Steen > Sent: August-23-10 3:02 PM > To: r-help@r-project.org > Subject: [R] extracting p-values from Anova objects (from the car library) > > Dear all, > > is

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Sarah Goslee
I didn't follow the earlier replies, but since you still can't seem to get p-values, what about this: (I also couldn't run your sample code, so this is a toy example; and do you mean anova() - I'm not familiar with Anova(), and didn't see anything with ??Anova) > x <- runif(100) > y <- runif(100)

Re: [R] R reports

2010-08-23 Thread Kevin Wright
I'm mindful of the volunteer nature of R-core, but I'm also sympathetic to Donald. I use Sweave to create documents, though I tend to view Sweave as a typesetter, not a report writer. What do I see as the difference? Sweave typesets _raw_ R output. A report writer makes it easier to quickly gras

[R] Memory Issue

2010-08-23 Thread Cuckovic Paik
Dear All, I have an issue on memory use in R programming. Here is the brief story: I want to simulate the power of a nonparameteric test and compare it with the existing tests. The basic steps are 1. I need to use Newton method to obtain the nonparametric MLE that involves the inversion of a l

[R] 3D stariway plot

2010-08-23 Thread mau...@alice.it
Please, is there an R function /package that allows for 3D stairway plots like the attached one ? In addition, how can I overlay a parametric grid plot?? Thank you Maura Alice body {margin:0;padding:0;} #footer { height:13

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Thanks for your replies, but unfortunately none of them seem to help. I do get p-values in the output, but can't seem to locate them anywhere in these objects via the str() function. I also get very different output using str() than you obtained from the lm help page Here's my output: > A <-

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Erik Iverson
In addition to the Wiki already mentioned, the following may be useful: http://learnr.wordpress.com/2009/10/06/export-data-frames-to-multi-worksheet-excel-file/ Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message " In syst

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Marc Schwartz
On Aug 23, 2010, at 4:22 PM, David Winsemius wrote: > > On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote: > >> On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: >> >>> I am using R 2.11.1 in a Microsoft Windows 7 environment. >>> >>> I tried using WriteXLS, but get the message " In system(cmd

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
and some more options... dat <- structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c("1", "2"), class = "factor"), time = c(1, 2, 3, 1.5, 4, 5.5, 6), y = c(1.4, 2, 2.5, 2.3, 4.5, 1.6, 2)), .Names = c("ID", "time", "y"), row.names = c(NA, -7L), class = "data.frame") li

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote: On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message " In system(cmd) : perl not found" Snipped muc useful information If you have probl

[R] Problem with step.gam

2010-08-23 Thread mahesh samtani
Hello, I am running a step.gam with 21 explanatory variables. I run into a problem with the "Error: cannot allocate vector of size 437.9 Mb" if the list of explanatory variables is longer than 17. I have to comment out 4 of the variables and can't test than 17 variables (see below). I am wondering

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Marc Schwartz
On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: > I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel? (I am familiar > with > WriteXLS,

Re: [R] Sum a list of tables

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 12:39 PM, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote: Perfectly, works as expected. Regarding the other questions, can anybody point me to the right direction? So first question: where is the `+` operation defined for tables? tables are a modification vi

Re: [R] Regex exercise

2010-08-23 Thread Greg Snow
How about: x <- "1 2 -5, 3- 6 4 8 5-7 10"; x library(gsubfn) strapply( x, '(([0-9]+) *- *([0-9]+))|([0-9]+)', function(one,two,three,four) { if( nchar(four) > 0 ) return(as.numeric(four) ) return( seq( from=as.numeric(two), to=as.numeric(three) ) )

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 4:16 PM, Gabor Grothendieck wrote: > On Mon, Aug 23, 2010 at 3:58 PM, Lei Liu wrote: >> Hi there, >> >> I want to make trajectory plots for data as follows: >> >> ID      time    y >> 1       1       1.4 >> 1       2       2.0 >> 1       3       2.5 >> 2       1.5     2.3

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 3:58 PM, Lei Liu wrote: > Hi there, > > I want to make trajectory plots for data as follows: > > ID      time    y > 1       1       1.4 > 1       2       2.0 > 1       3       2.5 > 2       1.5     2.3 > 2       4       4.5 > 2       5.5     1.6 > 2       6       2.0 > > .

Re: [R] Coinertia randtest

2010-08-23 Thread Mark Difford
Hi Petar, >> I dunno why, but I cannot make randtes[t].coinertia() from ade4 package >> working. I have two nice distance matrices (Euclidean): >> Could anyone help with this? Yes (sort of). The test has not yet been implemented for dudi.pco, as the message at the end of your listing tells you.

Re: [R] change order of plot panels in faceted ggplot/qplot

2010-08-23 Thread Bert Gunter
This is easy to do in xyplot (latice package) via the index.cond and skip arguments. Don't know about ggplot though. -- Bert On Mon, Aug 23, 2010 at 11:02 AM, Alison Macalady wrote: > Hi, > > I have a 5-paneled figure that i made using the facet function in qplot > (ggplot).  I've managed to ar

[R] trajectory plot (growth curve)

2010-08-23 Thread Lei Liu
Hi there, I want to make trajectory plots for data as follows: ID timey 1 1 1.4 1 2 2.0 1 3 2.5 2 1.5 2.3 2 4 4.5 2 5.5 1.6 2 6 2.0 ... That is, I will plot a growth curve for each subject ID, with y in t

Re: [R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Liviu Andronic
On Mon, Aug 23, 2010 at 10:50 PM, Eva Nordstrom wrote: > I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel?  (I am familiar > with > WriteXLS,

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 3:01 PM, Johan Steen wrote: Dear all, is there anyone who can help me extracting p-values from an Anova object from the car library? I can't seem to locate the p-values using str(result) or str(summary(result)) in the example below > A <- factor( rep(1:2,each=3) ) > B

[R] "easiest" way to write an R dataframe to excel?

2010-08-23 Thread Eva Nordstrom
I am using R 2.11.1 in a Microsoft Windows 7 environment.   I tried using WriteXLS, but get the message " In system(cmd) : perl not found"   What is the "easiest" way to write an R dataframe to Excel?  (I am familiar with WriteXLS, but I do not have PERL installed, and if not needed, do not wish

[R] Coinertia randtest

2010-08-23 Thread Petar Milin
Hello! I dunno why, but I cannot make randtes.coinertia() from ade4 package working. I have two nice distance matrices (Euclidean): dist1 1 2 3 4 5 6 7 2 2.5776799 3 1.7892825 1.0637487 4 1.0557991 2.4270728 2.0626604 5 1.6745483 4

Re: [R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 11:01 AM, Veronesi, Fabio wrote: > Hi, > I have a problem fitting the following Weibull Model to a set of data. > The model is this one: a-b*exp(-c*x^d) > If I fitted the model with CurveExpert I can find a very nice set of > coefficients which create a curve very close to

[R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Dear all, is there anyone who can help me extracting p-values from an Anova object from the car library? I can't seem to locate the p-values using str(result) or str(summary(result)) in the example below > A <- factor( rep(1:2,each=3) ) > B <- factor( rep(1:3,times=2) ) > idata <- data.frame(

Re: [R] Quantile Regression and Goodness of Fit

2010-08-23 Thread nikhil kaza
http://www.econ.uiuc.edu/~roger/research/R1/R1.html On Mon, Aug 23, 2010 at 2:15 PM, Steven Ranney wrote: > All - > > Does anyone know if there is a method to calculate a goodness-of-fit > statistic for quantile regressions with package quantreg? > Specifically, I'm wondering if anyone has imple

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Ben Bolker
No, alas. It would have been nice but I decided I didn't need it that badly/need to spend time reinventing that many wheels. (It does do mail-merge, though, which is what I developed it for in the first place.) It seemed to me that a more sensible solution would have been to find a Perl or Pyth

[R] Quantile Regression and Goodness of Fit

2010-08-23 Thread Steven Ranney
All - Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Specifically, I'm wondering if anyone has implemented the goodness-of-fit process developed by Koenker and Machado (1999) for R? Though I have used package quantreg

[R] change order of plot panels in faceted ggplot/qplot

2010-08-23 Thread Alison Macalady
Hi, I have a 5-paneled figure that i made using the facet function in qplot (ggplot). I've managed to arrange the panels into two rows/ three columns, but for the sake of easy visual comparisons between panels in my particular dataset, I want to have the two plots on the bottom align on t

Re: [R] Aspect Ratio

2010-08-23 Thread Greg Snow
A couple of additional examples of when asp is important to use: The command abline(0,1) adds a line to the current plot, this line is often referred to as the 45 degree line, but the angle with the axes is only 45 degrees when asp==1, setting asp=1 will enforce this. There are multiple package

[R] Kalman Filtering with Singular State Noise Covariance Matrix

2010-08-23 Thread Scott Stephens
Since notation for state-space models vary, I'll use the following convention: x(t) indicates the state vector, y(t) indicates the vector of observed quantities. State Transition Equation: x(t+1) = Fx(t) + v(t) Observation Equation: y(t) = Gx(t) + w(t) Cov[v(t)] = V Cov[w(t)] = W I've found mysel

Re: [R] R Package about Variable Selection for GLMM (Generalized Linear Mixed Model)?

2010-08-23 Thread Ben Bolker
Jun Bum Kwon uwm.edu> writes: [lightly edited] > I saw several great R packages for Variable Selection. > I also found several R packages for GLMM. But, I > did not find yet R package about Variable Selection for > GLMM even though several  papers about it have > been published. Such methods

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Ben Bolker
Barry Rowlingson lancaster.ac.uk> writes: > > On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy gmail.com> wrote: > > Hello Chris Campbell , > > I just posted my embryonic 'Rmail' package, which does a form of SMTP authentication (maybe not the version you want), to http://www.mathserv.mcm

Re: [R] lmer() causes segfault

2010-08-23 Thread Ben Bolker
Bertolt Meyer sozpsy.uzh.ch> writes: > > Hello lmer() - users, > > A call to the lmer() function causes my installation of R (2.11.1 on > Mac OS X 10.5.8) to crash and I am trying to figure out the problem. [snip snip] > detach("package:nlme") > library(lme4) > > mod1 <- lmer(performance

Re: [R] Sum a list of tables

2010-08-23 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Perfectly, works as expected. Regarding the other questions, can anybody point me to the right direction? BR Thorn From: RICHARD M. HEIBERGER [mailto:r...@temple.edu] Sent: lundi 23 août 2010 18:36 To: Thaler,Thorn,LAUSANNE,Applied Mathematics Cc: r-help@r-project.org Subject: Re: [R] Sum

Re: [R] Sum a list of tables

2010-08-23 Thread RICHARD M. HEIBERGER
sorry, cancel that. I will try again. On Mon, Aug 23, 2010 at 12:35 PM, RICHARD M. HEIBERGER wrote: > Reduce(`+`, k) > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

Re: [R] Sum a list of tables

2010-08-23 Thread RICHARD M. HEIBERGER
Reduce(`+`, k) On Mon, Aug 23, 2010 at 12:18 PM, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote: > Hi all, > > In R it is possible to sum tables: > > > (a <- table(rep(1:3, sample(10,3 > > 1 2 3 > 2 5 7 > > > a+a > > 1 2 3 > 4 10 14 > > Now suppose that I have a list of tables, wher

[R] (no subject)

2010-08-23 Thread Hongying Li
Hi all, I have a question about survplot in Design package. There is an option to print the number of subjects at risk at the start of each time interval. But I do not know how the time interval is decided, i.e. I do not know the correspoding time to the number at risk printed. How can I get the

Re: [R] Recyclable

2010-08-23 Thread Hadley Wickham
I should note that I realise this function is pretty trivial to write (see below), I just want to avoid reinventing the wheel. recyclable <- function(...) { lengths <- vapply(list(...), length, 1) all(max(lengths) %% lengths == 0) } Hadley On Mon, Aug 23, 2010 at 10:33 AM, Hadley Wickham w

[R] Problems installing JRI on Macintosh/Snowleopard

2010-08-23 Thread Lars Beckmann
Dears, I have a problem to install JRI on a Macintosh with Snowleopard OS. runs without error message but gives the following error message: $ make make -C src JRI.jar gcc -arch i386 -arch ppc -c -o Rengine.o Rengine.c -g -Iinclude -fno-common -I/System/Library/Frameworks/JavaVM.framewor

[R] Sum a list of tables

2010-08-23 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Hi all, In R it is possible to sum tables: > (a <- table(rep(1:3, sample(10,3 1 2 3 2 5 7 > a+a 1 2 3 4 10 14 Now suppose that I have a list of tables, where each table counts the same things > k <- list(a,a,a) How can I sum all tables in k? > do.call(sum, k) [1] 42 does not

[R] lmer() causes segfault

2010-08-23 Thread Bertolt Meyer
Hello lmer() - users, A call to the lmer() function causes my installation of R (2.11.1 on Mac OS X 10.5.8) to crash and I am trying to figure out the problem. I have a data set with longitudinal data of four subsequent performance measures of 1133 individuals nested in 88 groups. The data

[R] Problems with Tinn-R

2010-08-23 Thread jim holtman
A co-worker has been having problems with using Tinn-R and has posted to their help forum and got no response. So I am asking if anyone else who might be using Tinn-R has seen the problems that he is experiencing. I am using the same version of R and Tinn-R that he is, and I have not seen it. I

[R] Recyclable

2010-08-23 Thread Hadley Wickham
Hi all, Is there a function to determine whether a set of vectors is cleanly recyclable? i.e. is there a common function for detecting the error/warnings that underlie the following two function calls? > 1:3 + 1:2 [1] 2 4 4 Warning message: In 1:3 + 1:2 : longer object length is not a multiple

[R] Strange space characters in character strings

2010-08-23 Thread Mark Breman
Hello everyone, I am reading a HTML table from a website with readHTMLTable() from the XML package: > library(XML) > moose = readHTMLTable("http://www.decisionmoose.com/Moosistory.html";, header=FALSE, skip.rows=c(1,2), trim=TRUE)[[1]] > moose V1

Re: [R] DNA sequence Fst

2010-08-23 Thread Keo Ormsby
Hi Blue Jay, If your sequences are small (<10Kb) and you have a few samples (~100) the seqinr package from CRAN itself is a very straightforward way of handling DNA sequences, but if you plan to do more sophisticated things that can drain your RAM and processor time, I would definitely recomm

Re: [R] Fitting VAR and doing Johansen's cointegration test in R

2010-08-23 Thread Owe Jessen
Am 23.08.2010 05:09, schrieb Aditya Damani: Hi, Could someone please tell me the R codes for fitting VAR(p) (Vector Auto Regressive) models and doing the Johansen’s cointegration tests. TIA Aditya __ R-help@r-project.org mailing list https://stat.et

Re: [R] AUC

2010-08-23 Thread Frank Harrell
Samuel, Since the difference in AUCs has insufficient power and doesn't really take into account the pairing of predictions, I recommend the Hmisc package's rcorrp.cens function. Its method has good power and asks the question "is one predictor more concordant than the other in the same pa

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Barry Rowlingson
On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy wrote: > Hello Chris Campbell , > > I tried this for my email id it give me errors > >> from <- sprintf("", Sys.info()[4]) >> to <- "< veepsi...@gmail.com>" >> subject <- "Hello from R" >> msg <- "It works!" >> sendmail(from, to, subject, >> msg

Re: [R] Fatal Error

2010-08-23 Thread Petr PIKAL
Hi Another possibility could be that .RData was saved when some packages were used and are not installed in this R version (I often percieve it when I migrate among different computers). If the complete error message suggests it you can install that package and you may open your .RData again wi

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Chris Campbell
Hi veepsirtt This code is fragmented due to the syntax of the example not being parsed as intended to text. The source of \examples for sendmail.Rd is: from <- sprintf("", Sys.info()[4]) to <- "< ol...@datensplitter.net>" subject <- "Hello from R" msg <- "It works!" sendmail(from, to, subject, ms

[R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Veronesi, Fabio
Hi, I have a problem fitting the following Weibull Model to a set of data. The model is this one: a-b*exp(-c*x^d) If I fitted the model with CurveExpert I can find a very nice set of coefficients which create a curve very close to my data, but when I use the nls.lm function in R I can't obtain th

[R] AUC

2010-08-23 Thread Samuel Okoye
Hello, Is there is any R function computes the AUC for paired data? Many thanks, Samuel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Velappan Periasamy
Hello Chris Campbell , I tried this for my email id it give me errors > from <- sprintf("", Sys.info()[4]) > to <- "< veepsi...@gmail.com>" > subject <- "Hello from R" > msg <- "It works!" > sendmail(from, to, subject, msg,control=list(smtpServer="ASPMX.L.GOOGLE.COM")) Error in waitFor(code) :

[R] Cran-packages-ProfessoR- how to Automatically email a file to an address using the perl program.

2010-08-23 Thread Velappan Periasamy
AutoEmail autoemail Description Automatically email a file to an address using the perl program. Usage autoemail(eadd, sfile, hnote = "Exam Results") Arguments eaddEmail address sfile file to be sent hnotesubject line Det

[R] Maria Teresa Torres Muñoz/Control/Gestión de Accidentes/LineaDirecta está ausente de la oficina.

2010-08-23 Thread Maria Teresa Torres Muñoz
Estaré ausente de la oficina desde el 23/08/2010 y no volveré hasta el 06/09/2010. Responderé a su mensaje cuando regrese, si es urgente enviar mail a Estadisticas GDA Visítenos en: www.lineadirecta.com "Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener informaci

Re: [R] problems with merge() - the output has many repeated lines

2010-08-23 Thread Cecilia Carmo
Thank you all for your help and patience. I’have done table(duplicated(df1[, c("firm","year")])) as William Dunlap suggested and I find repeated rows in df1. R is always right! I really believed that my data could not be repeated lines. I now have another problem which is to discover why thi

Re: [R] manual update Agilent oligo probes

2010-08-23 Thread David Winsemius
Try BioC? -- View this message in context: http://r.789695.n4.nabble.com/manual-update-Agilent-oligo-probes-tp2334869p2335106.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm

Re: [R] Fitting VAR and doing Johansen's cointegration test in R

2010-08-23 Thread John C Frain
Look at the econometrics and time series Task wiew on the CRAN web site John On 23 August 2010 04:09, Aditya Damani wrote: > Hi, > > Could someone please tell me the R codes for fitting VAR(p) (Vector > Auto Regressive) models and doing the Johansen’s cointegration tests. > > TIA > Aditya > > _

Re: [R] problems with merge() - the output has many repeated lines

2010-08-23 Thread Michael Dewey
At 18:23 22/08/2010, Cecilia Carmo wrote: I have done intersect(names(df1), names(df2)) [1] "firm" "year" This is the key I used to merge merge(df1,df2,by=c("firm","year")) And there is just one row firm/year in df1 that matches with another firm/year row in df2. Df1 has more firm/year rows t

  1   2   >