Re: [R] Create graphs from text console

2006-03-23 Thread Rainer M Krug
Thanks a lot for all your help and tips. As I don't need publishhable quality, I will go with the bitmap option. Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa Tel:

Re: [R] data management on R

2006-03-23 Thread Jacques VESLOT
C <- cbind(x=A[, 1], n=B[, 2]) linda.s a écrit : >On 3/23/06, Jim Porzak <[EMAIL PROTECTED]> wrote: > > >>C <- cbind(A[, 1], B[, 2]) >> >> >> >> >The result is: > [,1] [,2] >[1,]12 >[2,]38 >How to keep x and n as the column title? >Linda > >

[R] Trouble phrasing an R command that will run the model i need (ANOVA, nested)

2006-03-23 Thread David Elliott
Hi, I have been trying to find the appropriate R command to analyse my datasets according to a particular model. Unfortunately, my best attempts at doing so have so far not worked. I am wondering if anybody can help me to figure out what i've been doing wrong, and what i need to do in order to

Re: [R] who can tell me the reason why it is different on calculating Moran's I using ARCGIS, Geoda and R?

2006-03-23 Thread Roger Bivand
Please use the appropriate R-sig-*, here R-sig-geo: On Fri, 24 Mar 2006, zhijie zhang wrote: > The attachment is my dataset: > 1.ccc.shp (the original data) > 2.ccc.gwt, which is computed by Geoda; Most list readers will not know (perhaps thankfully) what a shapefile is. > > Introduction to th

Re: [R] data management on R

2006-03-23 Thread linda.s
On 3/23/06, Jim Porzak <[EMAIL PROTECTED]> wrote: > C <- cbind(A[, 1], B[, 2]) > > The result is: [,1] [,2] [1,]12 [2,]38 How to keep x and n as the column title? Linda __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/ma

[R] who can tell me the reason why it is different on calculating Moran's I using ARCGIS, Geoda and R?

2006-03-23 Thread zhijie zhang
The attachment is my dataset: 1.ccc.shp (the original data) 2.ccc.gwt, which is computed by Geoda; Introduction to the variables in my data: ID: key variable; N_LATITUDE: latitude measured by GPS; E_LONGITUD: longitude measured by GPS; LIVES: attribute data I get the different result of Moran

Re: [R] data management on R

2006-03-23 Thread Jim Porzak
C <- cbind(A[, 1], B[, 2]) On 3/23/06, zhijie zhang <[EMAIL PROTECTED]> wrote: > Dear friends, > i have two dataset: A and B > A: > x y > 1 2 > 3 4 > > B: > m n > 1 2 > 7 8 > > How to generate datasetC: > C: > x n > 1 2 > 3 8 > i know sas can do it easily, what about R? > > --

[R] data management on R

2006-03-23 Thread zhijie zhang
Dear friends, i have two dataset: A and B A: x y 1 2 3 4 B: m n 1 2 7 8 How to generate datasetC: C: x n 1 2 3 8 i know sas can do it easily, what about R? -- Kind Regards, __ R-help@stat.math.ethz.ch mailing list https://stat.ethz

[R] using R's optimization routines from C

2006-03-23 Thread Globe Trotter
Dear all, I have been trying to use R's optimization routines from C and I have some questions. Specifically, I am testing the usage of nmmin which performs Nelder-Mead optimization in order to learn how to do the above exercise. I understand from the notes in Chapter 5 that the declaration for b

Re: [R] AIC mathematical artefact or computation problem ?

2006-03-23 Thread Ben Bolker
lionel humbert courrier.uqam.ca> writes: > > Dear R user, > > I have made many logistic regression (glm function) with a second order > polynomial formula on a data set containing 440 observation of 96 > variables. I’ve made the plot of AIC versus the frequency > (presence/observations) of e

Re: [R] Search for the minimum of a fitted curve

2006-03-23 Thread Spencer Graves
Elementary calculus problem: You estimate y(A,B) = b0+b1*A+b11*A^2+b2*B+b22*B^2. The first partial derivatives are as follows: dy/dA = b1+2*b11*A dy/dB = b2+2*b22*B Set the first derivatives to 0 and solve for A and B. This will be a

Re: [R] how to get f(x)=___ from a piecwise function

2006-03-23 Thread Eric C. Jennings
Thanks. the approxfun command works great --matches exactly with computing each point-to-point slope Eric - Original Message - From: jim holtman To: Eric C. Jennings Cc: R-help Sent: Saturday, February 25, 2006 9:27 PM Subject: Re: [R] how to get f(x)=___ from a piecwise f

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Duncan Mackay
Hi all, On the subject of histories, how about changing the default value of "max.show" from 25 to Inf? I find that the line of code I'm looking for is ALWAYS on the 26th line back from the end of the default history!! Also, re changing the amount of history saved, Prof Ripley replied to an earlier

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Peter Ehlers
Thanks, Paul, that's useful information. Peter Paul Murrell wrote: > Hi > > > Peter Ehlers wrote: > >> >>Paul Murrell wrote: >> >> >>>Hi >>> >>> >>>Duncan Murdoch wrote: >>> >>> On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: >On 3/23/06, Duncan Murdoch <[EMAIL PROTECTE

Re: [R] conservative robust estimation in (nonlinear) mixed models

2006-03-23 Thread Spencer Graves
Bert raised an issue I had overlooked. Ideally, we would like to be able to specify a different "family" for the observations and for each random effect, with Student's t and contaminated normal as valid options in both places. If I were allowed to specify a family (or a ro

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Paul Murrell
Hi Peter Ehlers wrote: > > > Paul Murrell wrote: > >> Hi >> >> >> Duncan Murdoch wrote: >> >>> On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: >>> >>> On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: > > >>

Re: [R] Still problems with "step()" function

2006-03-23 Thread Kenneth Cabrera
Ok Here is the complete command secuence -- testData<-structure(list(MCHNV = c(215, 325, 435, 327, 150, 949, 417, 528, 572, 1255, 517, 221, 306, 274, 307, 203, 258, 126, 88, 85, 75, 64, 77, 49, 133, 192, 32, 73, 139, 52, 17,

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Peter Ehlers
Paul Murrell wrote: > Hi > > > Duncan Murdoch wrote: > >>On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: >> >> >>>On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >>> >>> On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: >On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> w

Re: [R] Still problems with "step()" function

2006-03-23 Thread Gabor Grothendieck
It looks some your data has been wrapped around by the email processing. Suggest that after reading it in you issue the command: dput(testData) and put testData <- followed by the output from the dput into your email. On 3/23/06, Kenneth Cabrera <[EMAIL PROTECTED]> wrote: > Hi R users: > > I

[R] Still problems with "step()" function

2006-03-23 Thread Kenneth Cabrera
Hi R users: I don´t know if anybody have had the same problem with 'step()' funtion. If I type the commands --- testData<-read.table("testData.dat",header=T) model1J<-glm(MCHNV~offset(Offset1),data=testData,family="po

Re: [R] RMySQL's column limit

2006-03-23 Thread Mark Van De Vyver
Thanks for pointing that out. I've run the "create table" uploaded with that bug report and it fails for the same reason using MySQL 4.1.12 on linux and 5.0.18-nt So this is not a limitation of RMySQL. Regards Mark On 3/24/06, Jeffrey Horner <[EMAIL PROTECTED]> wrote: > Mark Van De Vyver wrote: >

[R] pairs function from graphics

2006-03-23 Thread Jungyeon Yoon
Hi, I have two questions about options for panel, upper.panel, lower.panel in pairs(). 1. I see examples using panel.smooth, panel.corr, panel.hist. Are there any plots that can be used here? 2. Can we have different plots in upper diagonal? For example, in a matrix of scatterplots, I want to

Re: [R] new to R

2006-03-23 Thread linda.s
On 3/23/06, Francisco J. Zagmutt <[EMAIL PROTECTED]> wrote: > Hi Linda > > Did you already get a reply to your question? If not, try adding a new line > at the end of the text (just hit enter after 69,the last number in your data > and save the file). You also want to use the argument "sep" in re

Re: [R] new to R

2006-03-23 Thread Francisco J. Zagmutt
Hi Linda Did you already get a reply to your question? If not, try adding a new line at the end of the text (just hit enter after 69,the last number in your data and save the file). You also want to use the argument "sep" in read.table Since you have a comma at the end of each row you can eit

Re: [R] outer() function

2006-03-23 Thread Gabor Grothendieck
This is a FAQ: http://cran.r-project.org/doc/manuals/R-FAQ.html#Why-does-outer_0028_0029-behave-strangely-with-my-function_003f On 3/23/06, Kyle LaMalfa <[EMAIL PROTECTED]> wrote: > Greetings R-help community, > > I am relatively new to R, which may be why I am having trouble > understanding this

Re: [R] RMySQL's column limit

2006-03-23 Thread Jeffrey Horner
Mark Van De Vyver wrote: > My apologies, > > I'm using R v2.2.1 via the JGR Editor GUI, RMySQL v0.5.7 under windows > XP with latest patches. > > MySQL is "server version: 4.1.12" > I'm pretty sure it's running on a linux box. It turns out that this may be a MySQL limit: http://bugs.mysql.com/b

Re: [R] outer() function

2006-03-23 Thread Thomas Lumley
On Thu, 23 Mar 2006, Kyle LaMalfa wrote: > Greetings R-help community, > > I am relatively new to R, which may be why I am having trouble > understanding this problem. I am trying to use outer() to generate a > graphable surface of a function. If there is a better way to do this, > I would appre

Re: [R] conservative robust estimation in (nonlinear) mixed models

2006-03-23 Thread Berton Gunter
Ok, since Spencer has dived in,I'll go public (I made some prior private remarks to David because I didn't think they were worth wasting the list's bandwidth on. Heck, they may still not be...) My question: isn't the difficult issue which levels of the (co)variance hierarchy get longer tailed dist

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Paul Murrell
Hi Michael H. Prager wrote: > > on 3/23/2006 2:42 PM Paul Murrell said the following: > >>Hi >> >> >>Duncan Murdoch wrote: >> >> >>>On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: >>> >>> >>> On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >On 3/23/2006

Re: [R] PCA, Source analysis and Unmixing, environmental forensics

2006-03-23 Thread Gabor Grothendieck
Review all the task views at: http://cran.r-project.org/src/contrib/Views/ On 3/23/06, Mike Bock <[EMAIL PROTECTED]> wrote: > > I am using R for environmental forensics (determination of the sources > and/or groupings in mixtures of organic chemicals in the field). The > goal is to determine in

[R] outer() function

2006-03-23 Thread Kyle LaMalfa
Greetings R-help community, I am relatively new to R, which may be why I am having trouble understanding this problem. I am trying to use outer() to generate a graphable surface of a function. If there is a better way to do this, I would appreciate the insight. Otherwise, could someone suggest

Re: [R] comparative density estimates

2006-03-23 Thread Achim Zeileis
Michael, very nice and interesting plots! One alternative idea to compare the proportion of milestone items (that does not really answer the bandwith question) in Europe and North America might be a conditional density plot. After running your R source code, you could do: where <- factor(c(rep(

[R] PCA, Source analysis and Unmixing, environmental forensics

2006-03-23 Thread Mike Bock
I am using R for environmental forensics (determination of the sources and/or groupings in mixtures of organic chemicals in the field). The goal is to determine in there are groups of samples with similar/dissimilar compositions, and to assign samples to a potential source or a mixture of sources

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Michael H. Prager
on 3/23/2006 2:42 PM Paul Murrell said the following: > Hi > > > Duncan Murdoch wrote: > >> On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: >> >> >>> On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >>> >>> On 3/23/2006 10:29 AM, Gabor Grothendieck wrote:

Re: [R] conservative robust estimation in (nonlinear) mixed models

2006-03-23 Thread Spencer Graves
I know of two fairly common models for robust methods. One is the contaminated normal that you mentioned. The other is Student's t. A normal plot of the data or of residuals will often indicate whether the assumption of normality is plausible or not; when the plot indicates proble

[R] kmeans Clustering

2006-03-23 Thread Mark Hempelmann
Dear WizaRds, My goal is to program the VS-KM algorithm by Brusco and Cradit 01 and I have come to a complete stop in my efforts. Maybe anybody is willing to follow my thoughts and offer some help. In a first step, I want to use a single variable for the partitioning process.

Re: [R] Intercepts in linear models.

2006-03-23 Thread Kjetil Brinchmann Halvorsen
Rolf Turner wrote: > A colleague asked me if there is a way to specify with a > ***variable*** (say ``cflag'') whether there is an intercept in a > linear model. > > She had in mind something like > > lm(y ~ x - cflag) something like lm( if (cflag) y ~ x-0 else y ~ x, ... Kjetil > > whe

Re: [R] Accessing specific values of linear regression model

2006-03-23 Thread Liaw, Andy
You said you were fitting regression model, yet you used summary(aov(model))? It's rather unusual to use aov() for regression models... If you used lm() to fit the regression model, the following might help: > y <- rnorm(10); x <- runif(10) > fit <- lm(y ~ x) > anova(fit) Analysis of Variance Ta

Re: [R] Intercepts in linear models.

2006-03-23 Thread Liaw, Andy
update() simply calls the model fitting function again using the new arguments, which means one redundant model fit. What I would do is construct the formula beforehand, e.g., myformula <- if (cflag) y ~ x else y ~ x - 1 or something like that. Andy From: Gabor Grothendieck > > You can use up

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Paul Murrell
Hi Duncan Murdoch wrote: > On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: > >>On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> >>>On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: >>> On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >On 3/23/2006 7:35 AM, Thomas Steine

[R] comparative density estimates

2006-03-23 Thread Michael Friendly
I have two series of events over time and I want to construct a graph of the relative frequency/density of these events that allows their distributions to be sensibly compared. The events are the milestones items in my project on milestones in the history of data visualization [1], and I want to

Re: [R] RGui: windows-record and command history

2006-03-23 Thread P Ehlers
Duncan Murdoch wrote: > On 3/23/2006 10:34 AM, Peter Ehlers wrote: > >> Duncan Murdoch wrote: >> >>> On 3/23/2006 7:35 AM, Thomas Steiner wrote: >>> a) How can I set the recording of all windows()-history forever to "true"? I want something like windows(record = TRUE) but not just for

Re: [R] RMySQL's column limit

2006-03-23 Thread Mark Van De Vyver
My apologies, I'm using R v2.2.1 via the JGR Editor GUI, RMySQL v0.5.7 under windows XP with latest patches. MySQL is "server version: 4.1.12" I'm pretty sure it's running on a linux box. The dimension of template is >2000, I know the error kicks in at 3000, but haven't iterated to find the exac

Re: [R] DIfference between weights options in lm GLm and gls.

2006-03-23 Thread Peter Dalgaard
Spencer Graves <[EMAIL PROTECTED]> writes: > In my tests, "gls" did NOT give the same answers as "lm" and "glm", > and I don't know why; perhaps someone else will enlighten us both. The weights argument in gls (&gnls&lme&nlme) specifies the variance, not the actual weight which is the r

Re: [R] DIfference between weights options in lm GLm and gls.

2006-03-23 Thread Spencer Graves
Hi, Sundar: Thanks, Sundar. That should have been obvious to me. However, I hadn't used varFixed before, and evidently I thought about it for only 1 ms instead of the required 2. With that change, I get the same answers for all three. Best Wishes, spencer Sundar

[R] Accessing specific values of linear regression model

2006-03-23 Thread Kelly Vincent
I am just starting to learn R, and I'm struggling with a lot of the basic stuff. The online documentation is generally good, but I have been unable to find the answer for my problem this time. I am running linear regression on a particular set of data and plotting it. I've got the regression li

Re: [R] DIfference between weights options in lm GLm and gls.

2006-03-23 Thread Sundar Dorai-Raj
Hi, Spencer, For your call to gls you actually want: fit.gls.w <- gls(y~x, data=DF, weights=varFixed(~1/w)) HTH, --sundar Spencer Graves wrote: > In my tests, "gls" did NOT give the same answers as "lm" and "glm", > and I don't know why; perhaps someone else will enlighten us both. I

[R] Writing a function to fit ALSOS models. problem with normalization?

2006-03-23 Thread David Hugh-Jones
Dear all, Below is my attempt at a function to fit Alternate Least Squares Optimal Scaling models, as described in Young (1981) "Quantitative Analysis of Qualitative Data" and Jacoby (1999) "Levels of Measurement and Political Research: An Optimistic View". I would welcome any comments on coding

Re: [R] Intercepts in linear models.

2006-03-23 Thread Gabor Grothendieck
You can use update to modify a formula: fo <- y ~ x fo <- update(fo, . ~ . -1) willl remove the intercept. See ?update.formula On 3/23/06, Rolf Turner <[EMAIL PROTECTED]> wrote: > A colleague asked me if there is a way to specify with a > ***variable*** (say ``cflag'') whether there is an

[R] R code to generate Sweave input ? Sweave squared ?

2006-03-23 Thread Dirk Eddelbuettel
For some recurrent tasks, I would like to programmatically generate input for Sweave. While I could do that with many languages, in particular some starting with the letter P, I wouldn't mind advancing two more positions in the alphabet and use R itself to generate input for Sweave. In other w

Re: [R] Estimation of skewness from quantiles of near-normal distribution

2006-03-23 Thread kumar zaman
This pertains to the first paragraph, you can use Dagostino test which is an omnibus test combining both skewness and kurtosis and has a high power, istead of only skewness of the data. Try ?dagoTest Ahmed Leif Kirschenbaum <[EMAIL PROTECTED]> wrote: I have summary statistics from many

Re: [R] Create graphs from text console

2006-03-23 Thread Liaw, Andy
From: Uwe Ligges > > Rainer M Krug wrote: > > > Hi > > > > I am using R 2.2.1 under Linux (SuSE 10) and would like to > know if it > > is > > possible to create graphs, i.e. > > > > jpeg(filename=fn) > > try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, > > show.given=FALSE) ) > > dev

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Duncan Murdoch
On 3/23/2006 10:46 AM, Gabor Grothendieck wrote: > On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: >> > On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> >> On 3/23/2006 7:35 AM, Thomas Steiner wrote: >> >> > a) How can I set the reco

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Duncan Murdoch
On 3/23/2006 10:34 AM, Peter Ehlers wrote: > Duncan Murdoch wrote: >> On 3/23/2006 7:35 AM, Thomas Steiner wrote: >> >>>a) How can I set the recording of all windows()-history forever to >>>"true"? I want something like windows(record = TRUE) but not just for >>>the window that opens then, but for

Re: [R] Create graphs from text console

2006-03-23 Thread McGehee, Robert
Also check out the GDD package created by Simon Urbanek if bitmap does not fit your needs. On some systems, bitmap is slow or produces an inferior quality plot, in part because anti-aliasing is not supported (at least on my system). GDD, however, produces excellent anti-aliased graphs using the GD

Re: [R] invalid variable type in model.frame within a function

2006-03-23 Thread Thomas Lumley
On Thu, 23 Mar 2006, Ingmar Visser wrote: > Dear expeRts, > > I came across the following error in using model.frame: > > # make a data.frame > jet=data.frame(y=rnorm(10),x1=rnorm(10),x2=rnorm(10),rvar=rnorm(10)) > # spec of formula > mf1=y~x1+x2 > # make the model.frame > mf=model.frame(formula=m

Re: [R] Time-Series, multiple measurements, ANOVA model over time points, analysis advice

2006-03-23 Thread Spencer Graves
If this were my problem, I might start by considering each stimulus-response pair as a one observation, and I'd break the MEG into separate time series, each starting roughly 1 second before the stimulus and ending roughly 1 second after. If you've averaged many of these, I'm guessin

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Martin Maechler
> "Martin" == Martin Maechler <[EMAIL PROTECTED]> > on Thu, 23 Mar 2006 15:04:23 +0100 writes: > "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]> > on Thu, 23 Mar 2006 08:48:52 -0500 writes: Duncan> On 3/23/2006 7:35 AM, Thomas Steiner wrote: Martin>

Re: [R] DIfference between weights options in lm GLm and gls.

2006-03-23 Thread Spencer Graves
In my tests, "gls" did NOT give the same answers as "lm" and "glm", and I don't know why; perhaps someone else will enlighten us both. I got the same answers from "lm" and "glm". Since you report different results, please supply a replicatable example. I tried the following:

Re: [R] invalid variable type in model.frame within a function

2006-03-23 Thread Gabor Grothendieck
Examine the source code of lm to determine the proper way of doing this. Following that gives: makemodelframe <- function(formula,data,weights) { mf <- match.call() mf[[1]] <- as.name("model.frame") eval(mf, parent.frame()) } On 3/23/06, Ingmar Visser <[EMAIL PROTECTED]>

[R] Intercepts in linear models.

2006-03-23 Thread Rolf Turner
A colleague asked me if there is a way to specify with a ***variable*** (say ``cflag'') whether there is an intercept in a linear model. She had in mind something like lm(y ~ x - cflag) where cflag could be 0 or 1; if it's 0 an intercept should be fitted, if it's 1 then no intercept. Th

[R] AIC mathematical artefact or computation problem ?

2006-03-23 Thread lionel humbert
Dear R user, I have made many logistic regression (glm function) with a second order polynomial formula on a data set containing 440 observation of 96 variables. I’ve made the plot of AIC versus the frequency (presence/observations) of each variable and I obtain a nearly perfect arch effect wi

Re: [R] How to compare areas under ROC curves calculated with ROCR package

2006-03-23 Thread Frank Samuelson
The seROC routine you included is an very good approximation to the standard error of the Mann-Whitney-Wilcoxon/Area under the ROC curve statistic. It is derived from negative exponential models, but works very well in general (e.g. Hanley and McNeil, Diagnostic Radiology, 1982, v. 143, p. 29). A

[R] warning message using lmer()?

2006-03-23 Thread Mingyu Feng
Dear all, I use lmer to fit a mixed effect model.It give some warnings. What can I do about this? Here is the function and the warning message: > model.growth.mcas5 <- lmer(response ~ monthElapsed + (monthElapsed|studentID), +data= mcas5, family=binomial(link="logit"), method='ML'

Re: [R] Create graphs from text console

2006-03-23 Thread Uwe Ligges
Rainer M Krug wrote: > Hi > > I am using R 2.2.1 under Linux (SuSE 10) and would like to know if it is > possible to create graphs, i.e. > > jpeg(filename=fn) > try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, show.given=FALSE) ) > dev.off() > > from a text console? > It gives me an

Re: [R] R 2.2.1: install packages

2006-03-23 Thread Uwe Ligges
Hannu Kahra wrote: > Hi, > > when using a laptop and trying to install packages for R for Windows 2.2.1 I > get the following error > > >>utils:::menuInstallPkgs() > > --- Please select a CRAN mirror for use in this session --- > Warning: unable to access index for repository > http://cran.dk.

[R] conservative robust estimation in (nonlinear) mixed models

2006-03-23 Thread dave fournier
Conservative robust estimation methods do not appear to be currently available in the standard mixed model methods for R, where by conservative robust estimation I mean methods which work almost as well as the methods based on assumptions of normality when the assumption of normality *IS* satisfie

Re: [R] generating multivariate autocorrelated time series

2006-03-23 Thread Paul Gilbert
If you can specify an ARMA or state-space model for the vector process, then you can do this with simulate in the dse bundle. Paul Gilbert Thomas Petzoldt wrote: >Hello expeRts, > >for an application in hydrology I need to generate multivariate >(log)normally distributed time series with given

[R] nlme for groupedData with inner and outer factors

2006-03-23 Thread Dan Bebber
Hello, I am having trouble specifying a suitable nlme model. My data structure is described by gd <- groupedData(ppath ~ lcut | exp, outer = ~ bait, inner = ~ weight, data = d) i.e. the response (ppath) of several subjects (sub) was measured at levels of a continuous variable (lcut). Subjects

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Gabor Grothendieck
On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: > > On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 3/23/2006 7:35 AM, Thomas Steiner wrote: > >> > a) How can I set the recording of all windows()-history forever to > >> > "true"

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Duncan Murdoch
On 3/23/2006 10:29 AM, Gabor Grothendieck wrote: > On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> On 3/23/2006 7:35 AM, Thomas Steiner wrote: >> > a) How can I set the recording of all windows()-history forever to >> > "true"? I want something like windows(record = TRUE) but not just for

Re: [R] clogit question

2006-03-23 Thread vito muggeo
Dear Dan, I think you need more (theorical) background here.. clogit() in package survival performs conditional logistic regression where you have several groups (the strata, the matched sets). There is an intercept for each "stratum" in the model, but you do not obtain them since estimation is

Re: [R] clogit question

2006-03-23 Thread Thomas Lumley
On Thu, 23 Mar 2006, Dan Chan wrote: > Hi, > > I am playing with > clogit(case~spontaneous+induced+strata(stratum),data=infert) > from clogit help file. > > This line works. Yes, this is one of the nice features of R (that the examples work). > 1. But, why strata(stratum) doesn't have a coef

[R] gam y-axis interpretation

2006-03-23 Thread Bliese, Paul D LTC USAMH
Sorry if this is an obvious question... I'm estimating a simple binomial generalized additive model using the gam function in the package mgcv. The model makes sense given my data, and the predicted values also make sense given what I know about the data. However, I'm having trouble interp

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Peter Ehlers
Duncan Murdoch wrote: > On 3/23/2006 7:35 AM, Thomas Steiner wrote: > >>a) How can I set the recording of all windows()-history forever to >>"true"? I want something like windows(record = TRUE) but not just for >>the window that opens then, but for all windows I will open ever. > > > options(gr

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Gabor Grothendieck
On 3/23/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 3/23/2006 7:35 AM, Thomas Steiner wrote: > > a) How can I set the recording of all windows()-history forever to > > "true"? I want something like windows(record = TRUE) but not just for > > the window that opens then, but for all windows I

[R] invalid variable type in model.frame within a function

2006-03-23 Thread Ingmar Visser
Dear expeRts, I came across the following error in using model.frame: # make a data.frame jet=data.frame(y=rnorm(10),x1=rnorm(10),x2=rnorm(10),rvar=rnorm(10)) # spec of formula mf1=y~x1+x2 # make the model.frame mf=model.frame(formula=mf1,data=jet,weights=rvar) Which gives the desired output: >

[R] still unclear about the parameters of Moran's I

2006-03-23 Thread zhijie zhang
I have read the introductions on Moran of SPDEP package, but still unclear about the parameters of Moran's I, and can't calculate the Moran's I. For example,I have a dataset like the following(only an example): longitude latitudex 110.23 32.53 10 109.52 33.2120

Re: [R] RMySQL's column limit

2006-03-23 Thread David James
Hi, Mark Van De Vyver wrote: > Dear R-users, > First, thank you to the developers for the very useful R-library RMySQL. > > While using this library a recieved an error message: > > RS-DBI driver: (could not run statement: Too many columns) > > The statement that generated the error was: > > d

[R] lme plot

2006-03-23 Thread Leonardo D Bacigalupe
Hi all, I have a questions regarding mixed effects models: I'm trying to plot e.g. fitted vs residuals for each level of the random effects, and i'm getting the same error. I guess this might be a problem of the graphic capabilities of R. Is there any way to obtain those plots? library(nlme) a

[R] clogit question

2006-03-23 Thread Dan Chan
Hi, I am playing with clogit(case~spontaneous+induced+strata(stratum),data=infert) from clogit help file. This line works. 1. But, why strata(stratum) doesn't have a coefficient like spontaneous and induced? 2. When I remove strata(stratum) from the command, this function seems to keep ru

[R] Default lag.max in ACF

2006-03-23 Thread Rafal Stankiewicz
Hi, The default value for lag.max in ACF implementation is 10*log10(N) There several publications recommending setting lag.max to: - N/4 (Box and Jenkins, 1970; Chatfield, 1975; Anderson, 1976; Pankratz, 1983; Davis, 1986; etc.) - sqrt(N)+10 (Cryer, 1986) - 20<=N<=40 (Brockwell and Davis) Wh

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Philippe Grosjean
Duncan Murdoch wrote: > On 3/23/2006 7:35 AM, Thomas Steiner wrote: > >>a) How can I set the recording of all windows()-history forever to >>"true"? I want something like windows(record = TRUE) but not just for >>the window that opens then, but for all windows I will open ever. > > > options(gra

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Martin Maechler
> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]> > on Thu, 23 Mar 2006 08:48:52 -0500 writes: Duncan> On 3/23/2006 7:35 AM, Thomas Steiner wrote: >> b) Scrolling up in RGui (windows 2000) to see past commands is nice, >> but: Is it possible to type eg "wi

[R] Create graphs from text console

2006-03-23 Thread Rainer M Krug
Hi I am using R 2.2.1 under Linux (SuSE 10) and would like to know if it is possible to create graphs, i.e. jpeg(filename=fn) try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, show.given=FALSE) ) dev.off() from a text console? It gives me an error message on the jpeg() command: Erro

Re: [R] RGui: windows-record and command history

2006-03-23 Thread Duncan Murdoch
On 3/23/2006 7:35 AM, Thomas Steiner wrote: > a) How can I set the recording of all windows()-history forever to > "true"? I want something like windows(record = TRUE) but not just for > the window that opens then, but for all windows I will open ever. options(graphics.record=TRUE) will make that

[R] front- end problem while using nnet and tune.nnet

2006-03-23 Thread madhurima bhattacharjee
Dear R people, I am using tune.nnet from e1071 package to tune the parameters for nnet. I am using the following syntax: tuneclass <-c(rep(1,46),rep(2,15)) tunennet <-tune.nnet(x=traindata,y=tuneclass,size=c(50,75,100),decay=c(0,0.005,0.010),MaxNWts = 2) Here traindata is the training

[R] Cross correlation in time series

2006-03-23 Thread Hufkens Koen
Hi list, I'm working on time series of (bio)physical data explaining (or not) the net ecosystem exchange of a system (+_ CO2 in versus CO2 out balance). I decomposed the time series of the various explaining variable according to scale (wavelet decomposition). With the coefficients I got from the

[R] X11, fonts, R-2.0.1, R-2.2.1 and R-devel

2006-03-23 Thread Xavier Fernández i Marín
Hello, I am having some problems with the X11 display in a gentoo linux laptop with R compiled manually. (https://stat.ethz.ch/pipermail/r-help/2006-March/089701.html) Whether I can open the X11 device and use it when I am using 'ion' as a window manager, I can't open it using 'gnome', due to a

Re: [R] Sampling in R

2006-03-23 Thread Liaw, Andy
From: Sean Davis > > On 3/23/06 5:52 AM, "Noam Friedman" <[EMAIL PROTECTED]> wrote: > > > Hi all! > > > > > > I was wondering if you can help me with a little sampling issue I'm > > having in R. > > > > I have a database with 100 observations. > > I need to sample n=9 sample size, 200 times (

[R] Best Solution: difference between 2 dates: IN MONTHS the way Mothers compute it

2006-03-23 Thread Smith, Phil
Folks: If you need to determine the difference between 2 dates in months, the best solution is described by David Reiner, below. Phil Smith CDC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Fri 3/10/2006 3:52 PM To: Smith

Re: [R] gray level values

2006-03-23 Thread Thomas Harte
# clear everything: rm(list=ls(all=TRUE)) detach() graphics.off() # make a test matrix: ( m<- matrix((1:12)/12, 3, 4) ) library(gplots) # display the test matrix: image(m, col=colorpanel(12, "darkblue", "yellow", "white"), axes=FALSE) # here's the action pa

[R] RGui: windows-record and command history

2006-03-23 Thread Thomas Steiner
a) How can I set the recording of all windows()-history forever to "true"? I want something like windows(record = TRUE) but not just for the window that opens then, but for all windows I will open ever. b) Scrolling up in RGui (windows 2000) to see past commands is nice, but: Is it possible to typ

Re: [R] Sampling in R

2006-03-23 Thread pedro cañadilla
I prefer the function resample as it is given in the sample help, in this way: resample <- function(x, size, ...) { if length(x <= 1) {if (!missing(size) && size == 0) x[FALSE] else x} else sample(x, size, ...) } Anyway, if an observation can not be twice in the sample, you have to use replace=

Re: [R] Sampling in R

2006-03-23 Thread Sean Davis
On 3/23/06 5:52 AM, "Noam Friedman" <[EMAIL PROTECTED]> wrote: > Hi all! > > > I was wondering if you can help me with a little sampling issue I'm > having in R. > > I have a database with 100 observations. > I need to sample n=9 sample size, 200 times (i.e. get 200 samples of > size 9). > N

Re: [R] Sampling in R

2006-03-23 Thread Thomas Petzoldt
Does the following what you want: x <- 1:100 s <- matrix(0, nrow=200, ncol=9) for (i in 1:200) { s[i, ] <- sample(x, 9) } m <- rowMeans(s) hist(m) The default behavior of sample is without replacement. Thomas Noam Friedman wrote: > > Hi all! > > > > > > I was wondering if you can help me w

Re: [R] about histograms

2006-03-23 Thread Petr Pikal
Hi On 23 Mar 2006 at 0:02, linda.s wrote: Date sent: Thu, 23 Mar 2006 00:02:40 -0800 From: "linda.s" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Copies to: R-help@stat.math.ethz.ch Subject:[R] about histograms > > x <-

[R] Sampling in R

2006-03-23 Thread Noam Friedman
Hi all! I was wondering if you can help me with a little sampling issue I'm having in R. I have a database with 100 observations. I need to sample n=9 sample size, 200 times (i.e. get 200 samples of size 9). N (pop. size) =100 Each sample can't contain the same observation more than one tim

Re: [R] read txt?

2006-03-23 Thread Sumanta Basak
What kind of file are you trying to read in R? If it is comma delimited, then try, Z<-read. table(""c:/temp/q.txt", sep=",", header=TRUE) ##[header=TRUE if you have variable names in your file ## -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of lind

Re: [R] about read txt file

2006-03-23 Thread linda.s
On 3/23/06, Cuvelier Etienne <[EMAIL PROTECTED]> wrote: > linda.s a écrit : > > I have txt file and use the following command to read it > > to R: > > z <- read.table("c:/temp/test.txt") > > and I type z but the output is totally a mess; the test.txt is > > strutured with the first line as the

  1   2   >