[R] coxph | anova results

2007-10-17 Thread Daniel Malter
Hi, I ran a coxph model and in the summary the independent variables are reported highly significant. However, if I run anova() on that model, some of the variables are reported to explain basically no deviance and other variables which are reported insignificant in the model summary are reported

Re: [R] problem with anova() and syntax in lmer

2007-10-17 Thread David C. Howell
The answer to your first question is "yes, the order does make a difference." I have not worked with lmer, but the standard anova applied to lm() will provide what are called Type I sums of squares. Each effect is adjusted for all prior effects. Look at John Fox's car package. I don't know if i

[R] [R-pkgs] homals-0.9.0

2007-10-17 Thread Jan de Leeuw
homals-0.9.0 is on CRAN -- by Jan de Leeuw and Patrick Mair This package implements the methods discussed in Gifi, Nonlinear Multivariate Analysis, Wiley, 1990. In the Gifi terminology it covers homals, princals, canals, morals, criminals, and overals. The R implementation fills several gaps

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread James
On Oct 17, 2007, at 4:36 PM, James wrote: > On Oct 17, 2007, at 10:18 AM, Waterman, DG ((David)) wrote: > >> I agree. Avoid the lines like: >> iv = c( iv, min(i, j) ) >> >> I had code that was sped up by 70 times after fixing the size of my >> output object before entering a loop. > > I'm in t

[R] polygon overlapping

2007-10-17 Thread adrian
Haiyong Xu <[EMAIL PROTECTED]> writes: > Is there any package which can calculate the overlapping area of two > polygons or output the coordinates of the overlapping of two polygons? The function overlap.xypolygon(A,B) in package 'spatstat' calculates the area of overlap between two polygons A an

Re: [R] Multi-objective optimization

2007-10-17 Thread Duncan Murdoch
Paul Smith wrote: > On 10/17/07, Ravi Varadhan <[EMAIL PROTECTED]> wrote: > >> What if simultaneously maximizing f(x,y) and g(x,y) is an incompatible >> objective? >> >> Modifying Duncan's example slightly, What if: >> >> f(x,y) = -(x-y)^2 and >> g(x,y) = -(x-2)^2-(y-x-1)^2? >> >> Here: >> (1) =

Re: [R] R and TeraData

2007-10-17 Thread Vadim Kutsyy
David, Thank you for the idea, I didn't think about it. TeraData does have Linux ODBC drivers. Thanks again. Vadim David Scott wrote: > On Wed, 17 Oct 2007, Vadim Kutsyy wrote: > >> Hello, >> >> Does anyone know a way to connect from R on Linux box to TeraData >> server? I can use ODBC conne

[R] Using R.dll in .NET IPC

2007-10-17 Thread adschai
Hi - I wrapped R.dll up using somebody code online (see below). I am comparing R on .NET IPC with R(D)COM. I got it all working. Except, I realize that in my client code of the IPC remoting, if I call 'plot' function in R via EvaluateNoReturn, I don't seem to see any results on the R plot window

Re: [R] Multi-objective optimization

2007-10-17 Thread Daniel Lakeland
On Wed, Oct 17, 2007 at 06:54:31PM +0100, Paul Smith wrote: > Dear All, > > Is there any package to do multi-objective optimization? For instance, > consider the following problem: > > maximize f(x,y) in order to x > > and > > maximize g(x,y) in order to y, > > simultaneously, with x and y bei

[R] Correlation matrices comparison

2007-10-17 Thread Jorge Ivan Velez Valbuena
Hi all, Somebody knows how to compare 2 correlation matrices using R? Any suggestion would be appreciate. Thanks in advance, Jorge __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide htt

[R] modeling large data

2007-10-17 Thread Wensui Liu
Hi, Dear Listers, I am just curious if R is able to model a logistic regression with 2-3000 variables and 30-40 million records. I know R is good but just want to know how good is to use it in a business envirnment such as database marketing. Thank you so much for you insight! -- ===

Re: [R] R and TeraData

2007-10-17 Thread David Scott
On Wed, 17 Oct 2007, Vadim Kutsyy wrote: > Hello, > > Does anyone know a way to connect from R on Linux box to TeraData > server? I can use ODBC connection on Windows box, but with amount of > data I need (and prefer) to use large Linux box. > Well I am not sure about the TeraData server bit, but

Re: [R] Multi-objective optimization

2007-10-17 Thread Paul Smith
On 10/17/07, Ravi Varadhan <[EMAIL PROTECTED]> wrote: > What if simultaneously maximizing f(x,y) and g(x,y) is an incompatible > objective? > > Modifying Duncan's example slightly, What if: > > f(x,y) = -(x-y)^2 and > g(x,y) = -(x-2)^2-(y-x-1)^2? > > Here: > (1) => x = y > (2) => y = x + 1 > (3) =>

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread James
On Oct 17, 2007, at 10:18 AM, Waterman, DG ((David)) wrote: > I agree. Avoid the lines like: > iv = c( iv, min(i, j) ) > > I had code that was sped up by 70 times after fixing the size of my > output object before entering a loop. I'm in the process of replacing that very kind of command. In

Re: [R] Trouble with R CMD INSTALL

2007-10-17 Thread Liviu Andronic
On 10/17/07, Gang Chen <[EMAIL PROTECTED]> wrote: > Thanks for pointing out that my original was unclear. Here is the > error message: > > > R CMD INSTALL nlme Try and see if it works. From within R run: install.packages("nlme", dep = TRUE) Just tried it here, and it works. Regards, Liviu ___

Re: [R] Multi-objective optimization

2007-10-17 Thread Ravi Varadhan
What if simultaneously maximizing f(x,y) and g(x,y) is an incompatible objective? Modifying Duncan's example slightly, What if: f(x,y) = -(x-y)^2 and g(x,y) = -(x-2)^2-(y-x-1)^2? Here: (1) => x = y (2) => y = x + 1 (3) => x = y => no solution! In order for a solution to necessarily exist, one

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Bartjoosen
Maybe I'm wrong, but aren't you calculating just the same as cor(data frame,method ="spearman"), with some further parameters being monitored? Could you please provide a commented, minimal, self-contained, reproducible code, so that we can see what is actually going on and what is the way you wa

Re: [R] Multi-objective optimization

2007-10-17 Thread Paul Smith
On 10/17/07, Alberto Monteiro <[EMAIL PROTECTED]> wrote: > >> Is there any package to do multi-objective optimization? For instance, > >> consider the following problem: > >> > >> maximize f(x,y) in order to x > >> > >> and > >> > >> maximize g(x,y) in order to y, > >> > >> simultaneously, with x a

Re: [R] coef se in lme

2007-10-17 Thread Douglas Bates
On 10/15/07, Doran, Harold <[EMAIL PROTECTED]> wrote: > ?vcov The vcov method returns the estimated variance-covariance matrix of the fixed-effects only. I think Irene's question is about the combination of the fixed-effects parameters and the BLUPs of the random effects that is returned by the c

Re: [R] type conversion

2007-10-17 Thread jim holtman
Your data in the dataframe is really a factor; you can see that with 'str'. Here is an outline of what you can do to remove the extra characters and then convert to a number. > x <- data.frame(actual06="$146,990.33") > str(x) 'data.frame': 1 obs. of 1 variable: $ actual06: Factor w/ 1 level "

Re: [R] type conversion

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 17:20 -0230, Roger Mason wrote: > Hello, > > I am trying to do arithmetic on numbers extracted from a PostgreSQL > database, wherein the numbers are stored as type "money". The > transcript below illustrates the problem. > > > Membersind06 <- sqlQuery(channel,"select * from

[R] problem with anova() and syntax in lmer

2007-10-17 Thread Gilles San Martin
Dear R user I have 2 problems with lmer. The statistical consultance service of my university has recomended to me to expose those problems here. Sorry for this quite long message. Your help will be greatly appreciated... Gilles San Martin 1) anova() I fit a first model : model1 <- lmer(eclw

[R] type conversion

2007-10-17 Thread Roger Mason
Hello, I am trying to do arithmetic on numbers extracted from a PostgreSQL database, wherein the numbers are stored as type "money". The transcript below illustrates the problem. > Membersind06 <- sqlQuery(channel,"select * from income where rowname like > '%Membersind%'") > names(Memb

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Earl F. Glynn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'll try the odbcDriverConnect and let you know. Thanks. odbcDriverConnect worked fine for me, too, with new Excel 2007 formats: library(RODBC) channel <- odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.x

Re: [R] Multi-objective optimization

2007-10-17 Thread Peter Dalgaard
Alberto Monteiro wrote: > Duncan Murdoch wrote: > >>> Is there any package to do multi-objective optimization? For instance, >>> consider the following problem: >>> >>> maximize f(x,y) in order to x >>> >>> and >>> >>> maximize g(x,y) in order to y, >>> >>> simultaneously, with x and y being the

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Marc Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This might be a question along the lines of "is it plugged in?", but do > you have the Office 2007 version of the ODBC drivers installed? > > If not, then your results would not be a surprise. > > If you do, then we shou

Re: [R] Import from excel 2007

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 20:53 +0200, kees wrote: > For me, it works. That is to say, not the simple way, which gave the error: > odbcConnectExcel("C:\\Users\\Kees\\Desktop\\Map1.xlsx") > > But it does when you ask the correct driver > odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx,

[R] R and TeraData

2007-10-17 Thread Vadim Kutsyy
Hello, Does anyone know a way to connect from R on Linux box to TeraData server? I can use ODBC connection on Windows box, but with amount of data I need (and prefer) to use large Linux box. Thanks, Vadim __ R-help@r-project.org mailing list https:

[R] Problem loading spatstat.

2007-10-17 Thread Rolf Turner
I upgraded to R version 2.6.0 yesterday; now I find that I can't load spatstat. I re-installed spatstat (that part seemed to work without complaint) but when I execute > library(spatstat) I get the error message Error in dyn.load(file, ...) : unable to load shared library '/User

Re: [R] how to repeat the results of a generated probabilities

2007-10-17 Thread sigalit mangut-leiba
It does! thank you very much. Sigalit. On 10/17/07, Peter McMahan <[EMAIL PROTECTED]> wrote: > > There are two things that will help you out. > > First, instead of getting the individual z1 and x1 one at a time and > then multiplying them you can call rbinom(200,1,p) to get a vector of > 200 inde

Re: [R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Duncan, Thanks for your reply. Here is a simplified version. What I really want to be able to do is summarize same data (using 'summarize') and pass those results to 'xYplot' for plotting, all in one wrapper. For this example, I am simply trying to call 'summarize' from within another fun

Re: [R] Import from excel 2007

2007-10-17 Thread kees
For me, it works. That is to say, not the simple way, which gave the error: odbcConnectExcel("C:\\Users\\Kees\\Desktop\\Map1.xlsx") But it does when you ask the correct driver odbcDriverConnect("DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);DBQ=C:\\Users\\Kees\\Desktop\\Map1.xlsx

Re: [R] Multi-objective optimization

2007-10-17 Thread Alberto Monteiro
Duncan Murdoch wrote: > >> Is there any package to do multi-objective optimization? For instance, >> consider the following problem: >> >> maximize f(x,y) in order to x >> >> and >> >> maximize g(x,y) in order to y, >> >> simultaneously, with x and y being the same both for f and g. Can R do >

Re: [R] Multi-objective optimization

2007-10-17 Thread Ravi Varadhan
Hi Paul, I know very little about multi-objective optimization. Further, I don't understand what "in order to" means. In multi-objective optim problems, don't you almost always end up reducing it to standard optimization by combining the multiple objectives into a single objective function? Then

Re: [R] Multi-objective optimization

2007-10-17 Thread Duncan Murdoch
On 10/17/2007 1:54 PM, Paul Smith wrote: > Dear All, > > Is there any package to do multi-objective optimization? For instance, > consider the following problem: > > maximize f(x,y) in order to x > > and > > maximize g(x,y) in order to y, > > simultaneously, with x and y being the same both fo

[R] Multi-objective optimization

2007-10-17 Thread Paul Smith
Dear All, Is there any package to do multi-objective optimization? For instance, consider the following problem: maximize f(x,y) in order to x and maximize g(x,y) in order to y, simultaneously, with x and y being the same both for f and g. Can R do it numerically? Thanks in advance, Paul __

Re: [R] passing arguments to functions within functions

2007-10-17 Thread Duncan Murdoch
On 10/17/2007 1:12 PM, Daniel E. Bunker wrote: > Dear R Users, > > I am trying to write a wrapper around summarize and xYplot from Hmisc > and am having trouble understanding how to pass arguments from the > function I am writing to the nested functions. > > There must be a way, but I have n

Re: [R] Trouble with R CMD INSTALL

2007-10-17 Thread Gang Chen
Thanks for pointing out that my original was unclear. Here is the error message: > R CMD INSTALL nlme WARNING: invalid package 'nlme' * Installing to library '/Library/Frameworks/R.framework/Resources/ library' ERROR: no packages specified And the following works just fine: > R CMD INSTALL

Re: [R] Import from excel 2007

2007-10-17 Thread Marc Schwartz
On Wed, 2007-10-17 at 11:53 -0500, Earl F. Glynn wrote: > "Marc Schwartz" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > On Tue, 2007-10-16 at 14:38 +0100, Arnold Akem wrote: > >> Hey Seniors, > >> > >> Really new to R, please has anyone imported a dataset from MS office > >>

Re: [R] Trouble with R CMD INSTALL

2007-10-17 Thread Liviu Andronic
On 10/17/07, Gang Chen <[EMAIL PROTECTED]> wrote: > Why does R CMD INSTALL work for some packages (e.g., lme4) but not > others (e.g., nlme)? If you don't provide any code or error message, I doubt anyone on this list will be willing to be of help. Regards, Liviu

Re: [R] Import from excel 2007

2007-10-17 Thread Earl F. Glynn
"Marc Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Tue, 2007-10-16 at 14:38 +0100, Arnold Akem wrote: >> Hey Seniors, >> >> Really new to R, please has anyone imported a dataset from MS office >> excel 2007 into R yet? It seem to be giving me hard times which I did

[R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Dear R Users, I am trying to write a wrapper around summarize and xYplot from Hmisc and am having trouble understanding how to pass arguments from the function I am writing to the nested functions. There must be a way, but I have not been able to figure it out. An example is below. Any advi

Re: [R] R-2.6.0 - packages installation through a proxy - not working

2007-10-17 Thread Liviu Andronic
On 10/17/07, Dirk Eddelbuettel <[EMAIL PROTECTED]> wrote: > Hmm, I haven't had to do that in a while. What happens if you do > > > update.packages(method="wget") > > ie use an explicit setting of method? This exact way of manually specifying the method within the command (as opposed to set

[R] Error message in GAM

2007-10-17 Thread Francesc Montan
Hello useRs! I have % cover data for different plant species in 300 plots, and I use the ARCSINE transformation (to deal with % cover data). When I use a GLM I do not have any problem. But when I am trying to use a GAM model using mgcv package, to account for non-linearity I get an “error messa

Re: [R] Import from excel 2007

2007-10-17 Thread J . delasHeras
Quoting Scionforbai <[EMAIL PROTECTED]>: >> It would be dumb to ignore the fact that Excel is a very widespread >> program, and therefore in the real world we are very likely to >> encounter data formatted by Excel. > > Of course I know the widespreading of such programs. But the point is: > how c

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Bert Gunter
... which is tip 2 in Section 7.7, "Tips," of V&R's S PROGRAMMING. Although this is now somewhat dated, it is still worthwhile if you do any serious S language programming (IMO, of course). Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:

[R] passing arguments to functions within functions

2007-10-17 Thread Daniel E. Bunker
Dear R Users, I am trying to write a wrapper around summarize and xYplot from Hmisc and am having trouble understanding how to pass arguments from the function I am writing to the nested functions. There must be a way, but I have not been able to figure it out. An example is below. Any advi

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Waterman, DG (David)
I agree. Avoid the lines like: iv = c( iv, min(i, j) ) I had code that was sped up by 70 times after fixing the size of my output object before entering a loop. Cheers David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Burns Sent: 17 Octo

Re: [R] wilcox.test test statistic

2007-10-17 Thread Thomas Lumley
On Wed, 17 Oct 2007, [iso-8859-1] João Fadista wrote: > When we perform a Wilcoxon rank sum test (on two samples with different > sizes) > we get a test statistic. My question is, as the value of test statistic > increases the difference between the distributions of the two samples also > increa

Re: [R] wilcox.test test statistic

2007-10-17 Thread Peter Dalgaard
João Fadista wrote: > Dear all, > > When we perform a Wilcoxon rank sum test (on two samples with different > sizes) we get a test statistic. My question is, as the value of test > statistic increases the difference between the distributions of the two > samples also increase, right? > Wrong

Re: [R] Import from excel 2007

2007-10-17 Thread Scionforbai
> It would be dumb to ignore the fact that Excel is a very widespread > program, and therefore in the real world we are very likely to > encounter data formatted by Excel. Of course I know the widespreading of such programs. But the point is: how can we start to change this in the real world? Peop

[R] curly bracket in plot (reply)

2007-10-17 Thread Jonathan Baron
I used the wrong address. This was meant as a reply to another post. On 10/17/07 10:55, [EMAIL PROTECTED] wrote: > Hi Jonathan, > > I read your post in the R-Help. Did you get rid off the problem? I'm standing > inf > ront of the same problem... If you've got an answer to me to drae a curly >

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread Patrick Burns
I suspect the vast majority of time is because of growing objects. Preallocate 'iv', 'jv', 'rho_sv' and 'rho_pv' to be their final length and then subscript into them with their values. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide f

Re: [R] correlated data

2007-10-17 Thread Sarah Goslee
Hi, What's "properly"? What are you trying to do - you don't ever say. I think you need to set population=TRUE to get the result you appear to want (sorry, that's not entirely clear in the docs, I see). > x <- 1:100 > y <- corgen(x=x, r=.8, epsilon=.01, population=TRUE)$y > cor(x, y) [

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Art Owen
Ravi Varadhan wrote: > Up to R version 2.3.0, La.svd had an argument called "method" which allowed > one to choose between "dgesvd" and "dgesdd", but the later versions only use > "dgesdd", which is supposed to be faster for larger matrices. > > I wonder if the convergence problem goes away when "d

[R] wilcox.test test statistic

2007-10-17 Thread João Fadista
Dear all, When we perform a Wilcoxon rank sum test (on two samples with different sizes) we get a test statistic. My question is, as the value of test statistic increases the difference between the distributions of the two samples also increase, right? Thanks in advance, João Fadista

[R] Trouble with R CMD INSTALL

2007-10-17 Thread Gang Chen
Why does R CMD INSTALL work for some packages (e.g., lme4) but not others (e.g., nlme)? Thanks, Gang __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-gu

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Ravi Varadhan
Up to R version 2.3.0, La.svd had an argument called "method" which allowed one to choose between "dgesvd" and "dgesdd", but the later versions only use "dgesdd", which is supposed to be faster for larger matrices. I wonder if the convergence problem goes away when "dgesvd", which uses the Lapack

[R] correlated data

2007-10-17 Thread Nair, Murlidharan T
Hi!! I am trying to generate data with specific correlation using corgen method from the ecodist package. It does not seem to generate the data properly. I am listing the code below. Secondly, when I put the code given below all in one file and source it, it is unable to complete the task. But

Re: [R] Observations on SVD linpack errors, and a workaround

2007-10-17 Thread Peter Dalgaard
Art Owen wrote: > Lately I'm getting this error quite a bit: > Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd' > > I'm running R 2.5.0 on a 64 bit Intel machine running Fedora (8 I think). > Maybe the 64 bit platform is more fragile about declaring convergence. > I'm seeing

Re: [R] Import from excel 2007

2007-10-17 Thread J . delasHeras
Quoting Scionforbai <[EMAIL PROTECTED]>: > I just wonder: why should R and its community try to support such an > awful program, with its protected formats and unmantained > features/bugs? > I mean, from both philosophical and technical point of view: R is free > software and should rather try to

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
Dirk Eddelbuettel wrote: > On 17 October 2007 at 10:44, Rainer M Krug wrote: > | I create one pdf file with plots via pdf() and one text file with text > | via sink() that works very nice. But I would prefer to have one pdf file > | with plots and the text which I store in the te=xt file via sink

Re: [R] How to speed up multiple for loop over list of data frames

2007-10-17 Thread jim holtman
First thing to do is to use Rprof (?Rprof) on a subset of your data to see where time is being spent. My guess is that most of it is in the calls to 'cor' and if this is the case, they you have to figure out some other algorithm. Also if these dataframes all contain numeric information, convert t

[R] power law fit with unknown zero

2007-10-17 Thread Thomas Hoffmann
Dear R-helpers I would like to do a fit of the form: y = a (x+c)**b, where a, b and c are unknown. Does anybody know how to do it? Thanks Thomas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the post

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Dirk Eddelbuettel
On 17 October 2007 at 10:44, Rainer M Krug wrote: | I create one pdf file with plots via pdf() and one text file with text | via sink() that works very nice. But I would prefer to have one pdf file | with plots and the text which I store in the te=xt file via sink(). I.e. | | x.lm<-lm(...) | pd

[R] question about mclust and prior probabilities

2007-10-17 Thread Jocelyn Holden
I'm sorry, this is probably a very simple question. I am relatively new to R and am having difficulty understanding how to use the mclust options to change the prior probabilities for a mixture model. I am dealing with a situation where I have 2 groups of data and it is known that the sample

Re: [R] One pdf file with plots and text output

2007-10-17 Thread tom sgouros
Latex has its own search path for packages like sweave.sty. Run the texconfig program and look at the configuration. The TEXMF variable is the one you're interested in. Search your system for a file called texmf.cnf, and edit that to change the TEXMF. It sounds like the sweave installation doe

Re: [R] Canberra distance

2007-10-17 Thread Stéphane Dray
Frédéric Chiroleu wrote: > PS : Be careful with function dudi.pca() from ade4 ; in values, "norm" > doesn't give you what is written in the help page : "norm" returns the > vector of standard deviations of initial variables when you choose > "normed" PCA and the vector of standard deviations of

Re: [R] Need help with function that includes 2 summation

2007-10-17 Thread Henrique Dallazuanna
Perhaps: r <- function(n, k, theta){ return(sqrt((sum(cos(k*theta))^2 + sum(sin(k*theta))^2)/n)) } On 17/10/2007, Zack Darnell <[EMAIL PROTECTED]> wrote: > > I am relatively new to R, so this may be a much simpler question than it > seems to me. I am trying to create a function that includes

Re: [R] library(car): Anova and repeated measures without between subjects factors

2007-10-17 Thread John Fox
Dear Ralf, Thanks for the additional suggestions -- I'll take a look at them as well. John John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox ---

[R] JGR makes help more helpful

2007-10-17 Thread Muenchen, Robert A (Bob)
Hi All, A few weeks ago I suggested that it would be nice to be able to submit lines from the help files for execution. You can cut and paste them into the console, or enter example(function) to run them all. However, I often find myself wanting to run just a line or two, or even parts of a line t

Re: [R] Need help with function that includes 2 summation

2007-10-17 Thread Romain Francois
Zack Darnell wrote: > I am relatively new to R, so this may be a much simpler question than > it seems to me. I am trying to create a function that includes two > summations, and can't figure out how. I am attaching the equation as a > pdf file. This function will then be optimized over a chosen

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Romain Francois
You can also specify the full path of the latex package, for me: \usepackage{/usr/local/lib/R/share/texmf/Sweave} Regards, Romain ONKELINX, Thierry wrote: > It works fine with me (on windows). But I've copied sweave.sty into my > workdirectory. See the Sweave FAQ > (http://www.ci.tuwien.ac.at/~

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
It works fine with me (on windows). But I've copied sweave.sty into my workdirectory. See the Sweave FAQ (http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-14000A.12) ir. Thierry Onkelinx Instituut voor natuur- en

[R] Need help with function that includes 2 summation

2007-10-17 Thread Zack Darnell
I am relatively new to R, so this may be a much simpler question than it seems to me. I am trying to create a function that includes two summations, and can't figure out how. I am attaching the equation as a pdf file. This function will then be optimized over a chosen range of values, but right

Re: [R] y_hat

2007-10-17 Thread Henrique Dallazuanna
If I understand your question, see the 'predict.glm' funtion. On 17/10/2007, Samuel Okoye <[EMAIL PROTECTED]> wrote: > > Hello, > suppose one has the following values > x1 <- rnorm(10,5,1) > x2 <- rgamma(10,5,1) > y <- rnorm(10,4,1) > mydat <- data.frame(y,x1,x2) > then one can use glm like > mod

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
I am getting somewhere - but running system("pdflatex GrowthAll") fails, as it does not find sweave.sty. I already linked the directory where it can be found (/usr/lib/R/share/texmf/) into my personal texfm directory (/texmf/tex/latex/R)\ and ran texhash (as root and as n ormal user), but it st

Re: [R] significance for a random effect in Mixed Model ANOVA

2007-10-17 Thread Ben Bolker
Nathaniel Street wrote: > > > [questions about testing significance of random effects] > > Pinheiro and Bates 2000 is the standard reference for this kind of question. The basic answer is that the Likelihood Ratio Test (implemented by anova()) is a reasonable approach (and recommended by PB

Re: [R] Problems with paste and blank

2007-10-17 Thread Dimitris Rizopoulos
look at the `sep' argument of ?paste(), e.g., Stadtwerksname <- "Mannheim" Laufwerk <- "C:\\" paste(Laufwerk, Stadtwerksname, ".csv", sep = "") I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Ad

[R] Another problem with drawing curly brackets

2007-10-17 Thread thomas.schwander
Hi there, Another problem for me ist to automatize the drawing of curly brackets like you can draw with Word or PPT or other programs. I want to draw with R 2.5.1 under Windows XP a curly bracket that begins in point (x1,y1) and reaches (x2,y2) horizontaly. Thx, Thomas ___

Re: [R] Problems with paste and blank

2007-10-17 Thread Katharine Mullen
use sep="", e.g., paste(Laufwerk,Stadtwerksname,".csv",sep="") On Wed, 17 Oct 2007 [EMAIL PROTECTED] wrote: > Hi there, > > I've got the following problem under Windows XP, R 2.5.1: > > When I'm pasting some objects: > > Stadtwerksname<-"Mannheim" > Laufwerk<-"C:\\" > paste(Laufwerk,Stadtwerksn

Re: [R] Documentation for Pearson Residuals

2007-10-17 Thread David Barron
?residuals.lm What I would do is look at the documentation for the specific *method*. If you just look at the documentation for the generic function, you won't find what you are looking for. David On 10/17/07, Tom La Bone <[EMAIL PROTECTED]> wrote: > Greetings, > > > > I have been using lm to p

Re: [R] Problems with paste and blank

2007-10-17 Thread Henrique Dallazuanna
See the argument 'sep' in the paste function. paste(Laufwerk,Stadtwerksname,".csv", sep="") On 17/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi there, > > I've got the following problem under Windows XP, R 2.5.1: > > When I'm pasting some objects: > > Stadtwerksname<-"Mannheim"

[R] Problems with paste and blank

2007-10-17 Thread thomas.schwander
Hi there, I've got the following problem under Windows XP, R 2.5.1: When I'm pasting some objects: Stadtwerksname<-"Mannheim" Laufwerk<-"C:\\" paste(Laufwerk,Stadtwerksname,".csv") I get the result: [1] "C:\\ Mannheim .csv" The problem's are the superfluous gaps/blanks between the three parts

Re: [R] How to compile sources?

2007-10-17 Thread Duncan Murdoch
On 17/10/2007 6:31 AM, Sara Mouro wrote: > Dear all, > > > I have read the on-line explanations I have found about Building R > from sources, and istalling Packages from sources... > Also, I have installed gcc4.0 and the gfrotran-4.2.1.dmg. > > However, I still do not know how to use them to c

Re: [R] polygon overlapping

2007-10-17 Thread Duncan Murdoch
On 17/10/2007 2:23 AM, Haiyong Xu wrote: > Hi there, > Is there any package which can calculate the overlapping area of two > polygons or output the coordinates of the overlapping of two polygons? I believe gpclib can do both of those. Duncan Murdoch ___

[R] automaticly adjust coordinates for text() labels

2007-10-17 Thread Sergey Goriatchev
Hello, I have following problem. I produce a histogram of some values and in the plot area I create 2 text boxes - one with names of statistics and one with values of these statistics. Coded like that: ht <-hist(x, ) ... ameant <-ameant <- paste("Ar.Mean") ... amean <- round(mean(x), digits=

Re: [R] glmmML vs. lmer - fitting overdispersed Poisson outcome.

2007-10-17 Thread Martin Henry H. Stevens
Hi Sam, I don't understand how you can estimate a separate id variance other than the residual variance, with one observation per subject. I would think the proper model would be glm(y ~ 1, family='poisson) Cheers, Hank On Oct 15, 2007, at 12:05 PM, Sam Field wrote: > Group, > > I have count

[R] Documentation for Pearson Residuals

2007-10-17 Thread Tom La Bone
Greetings, I have been using lm to perform weighted linear regressions and resid to extract the residuals. I happened upon some class notes on the internet that described how one can specify type="pearson" in resid to extract the weighted residuals. Where is this option documented? And if you k

[R] How to compile sources?

2007-10-17 Thread Sara Mouro
Dear all, I have read the on-line explanations I have found about Building R from sources, and istalling Packages from sources... Also, I have installed gcc4.0 and the gfrotran-4.2.1.dmg. However, I still do not know how to use them to compile one Source (in particular packfor_0.0-7.tar.gz)

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M. Krug
Olivier Delaigue wrote: > You should try with type of command: > > mtext(paste("Residuals:", summary(xlm)$residuals, "Coefficients:", > summary(xlm)$coefficients, etc..., sep ="\n")) I am sure this would work, but I would like to have something without to much additional coding. Sweave seems to

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
Thanks a lot - I'll try it out. Rainer ONKELINX, Thierry wrote: > You create a source file ("GrowthAll.Rnw") that looks a bit like this > > \documentclass[11pt]{report} > \usepackage{Sweave} > \SweaveOpts{echo = FALSE} > \begin{document} > > <>= > x.lm <- lm() > plot(x.lm) > @ > > <<>>= > summ

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
You create a source file ("GrowthAll.Rnw") that looks a bit like this \documentclass[11pt]{report} \usepackage{Sweave} \SweaveOpts{echo = FALSE} \begin{document} <>= x.lm <- lm() plot(x.lm) @ <<>>= summary(x.lm) @ \end{document} Then run in R: Sweave("GrowthAll.Rnw") system("pdflatex GrowthAl

Re: [R] library(car): Anova and repeated measures wit hout between subjects factors

2007-10-17 Thread Ralf Goertz
John Fox, Dienstag, 16. Oktober 2007: > Dear Ralf, > > Unfortunately, Anova.mlm(), and indeed Anova() more generally, won't > handle a model with only a constant. As you point out, this isn't > reasonable for repeated-measures ANOVA, where it should be possible to > have only within-subjects facto

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Olivier Delaigue
You should try with type of command: mtext(paste("Residuals:", summary(xlm)$residuals, "Coefficients:", summary(xlm)$coefficients, etc..., sep ="\n")) Olivier Delaigue Rainer M Krug-2 wrote: > > > It prints the summary, but in one line which is obviously to long to fit > on one page > >>> >

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
Rainer M. Krug wrote: > Olivier Delaigue * wrote: >> Maybe with: >> >>> print(plot.new()) >>> mtext(summary(xlm)) > > Thanks Olivier - that sounds like an easy approach - I'll try itr out > and report back. It prints the summary, but in one line which is obviously to long to fit on one page >

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M. Krug
Olivier Delaigue * wrote: > Maybe with: > >> print(plot.new()) >> mtext(summary(xlm)) Thanks Olivier - that sounds like an easy approach - I'll try itr out and report back. Rainer > > Regards, > > Olivier Delaigue > > > Rainer M Krug-2 wrote: >> Hi >> >> I create one pdf file with plots

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Rainer M Krug
ONKELINX, Thierry wrote: > I use Sweave for this kind of purposes. I was thinking about Sweave as well, but I don't understand how I can use it. Let's say I have a source file, which defines a function DoGrowthAll <- function() { pdf("GrowthAll.pdf", height=11, width=8, paper="a4")

Re: [R] One pdf file with plots and text output

2007-10-17 Thread Olivier Delaigue *
Maybe with: > print(plot.new()) > mtext(summary(xlm)) Regards, Olivier Delaigue Rainer M Krug-2 wrote: > > Hi > > I create one pdf file with plots via pdf() and one text file with text > via sink() that works very nice. But I would prefer to have one pdf file > with plots and the text whi

Re: [R] One pdf file with plots and text output

2007-10-17 Thread ONKELINX, Thierry
I use Sweave for this kind of purposes. HTH, Thierry ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biomet

  1   2   >