Re: [R] graphsheet

2008-08-18 Thread Duncan Mackay
At 14:53 18/08/2008, you wrote: Hello, I am trying to convert the following command from SPLUS to R: graphsheet(pages = TRUE) Does anyone have an idea what is the equivalent in R? Thanks -- View this message in context: http://www.nabble.com/graphsheet-tp19026010p19026010.html Sent

Re: [R] Optim stripping attributes from relistable objects

2008-08-18 Thread Prof Brian Ripley
On Mon, 18 Aug 2008, Katharine Mullen wrote: The following code is inspired by the help file for the relist() function (see?relist), which explicitly details how you can use a The example is in the 'Details' section and, indeed, it looks like it no longer works. I don't think it ever did

Re: [R] exporting adaBoost model

2008-08-18 Thread Hans W. Borchers
One way to port these kinds of models between applications is the Predictive Model Markup Language (PMML). The R package 'PMML' supports linear regression, rpart, SVM, and others, not adaBoost. On the other side, not even the Python machine learning library Orange does have an import function

Re: [R] Fucntion scope question. General non-linear solution help.

2008-08-18 Thread Prof Brian Ripley
Looks like you want to solve pbinom(k-1, N, p) = 0.5 for p. That is easy: use uniroot. testit - function(k, N) { fn - function(p, k, N) pbinom(k-1, N, p) - 0.5 uniroot(fn, c(0,1), k=k, N=N) } testit(6, 10) On Sun, 17 Aug 2008, [EMAIL PROTECTED] wrote: I would like to solve the

Re: [R] matrix row product and cumulative product

2008-08-18 Thread Moshe Olshansky
Hi Jeff, If I understand correctly, the overhead of a loop is that at each iteration the command must be interpreted, and this time is independent of the number of rows N. So if N is small this overhead may be very significant but when N is large this should be very small compared to the time

[R] how to get no of pdf files in a particular directory

2008-08-18 Thread Kurapati, Ravichandra (Ravichandra)
Hi Lets say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_01_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf files are there in that directory. How can I get using R commands.

[R] Problem installing packages

2008-08-18 Thread sara martino
Hei there, I am trying to build a new R package and after running R CMD check and R CMD build I have now my pkg.tar.gz file. The problem is that if i try to install it using install.packages(pkg.tar.gz,repos=NULL) i get the error Warning in install.packages(pkg/INLA_1.0.tar.gz, repos = NULL) :

[R] exonmap question: rma (or justplier) crashes

2008-08-18 Thread Tae-Hoon Chung
Hi, All; I simply followed the exonmap vignette but came up with an unexpected error. Here are what I did: library(exonmap) Loading required package: affy Loading required package: Biobase Loading required package: tools Welcome to Bioconductor Vignettes contain introductory material. To

Re: [R] how to get no of pdf files in a particular directory

2008-08-18 Thread Barry Rowlingson
2008/8/18 Kurapati, Ravichandra (Ravichandra) [EMAIL PROTECTED]: Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_01_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf files are there in that directory. How can I get using

Re: [R] how to get no of pdf files in a particular directory

2008-08-18 Thread Prof Brian Ripley
length(Sys.glob(file.path(Dir, *.pdf))) or use the 'pattern' argument of list.files() or use system(paste(ls, file.path(Dir, *.pdf), | wc -l), intern=TRUE) On Mon, 18 Aug 2008, Kurapati, Ravichandra (Ravichandra) wrote: Hi Lets say,

Re: [R] how to get no of pdf files in a particular directory

2008-08-18 Thread Paul Roebuck
On Mon, 18 Aug 2008, Kurapati, Ravichandra (Ravichandra) wrote: Let's say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_01_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf files are there in that directory. How can I get using R commands.

[R] Sweave ignores output generated by R message() commands

2008-08-18 Thread Gilbert Ritschard
Hello, I would like my Sweave document to display messages generated with the message() command. Sweave ignores this output and I did not find any Sweave option, nor any property that I could change through the options() command for changing this behavior. Here is a chunk example. message= test

[R] how to get no of pdf files in a particular directory

2008-08-18 Thread Kurapati, Ravichandra (Ravichandra)
Let's say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_0 1_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf and/or csv files are there in that directory. How can I get using R commands. Thanks K.Ravichandra

Re: [R] before-after control-impact analysis with R

2008-08-18 Thread Mark Difford
Hi Nikolaos, My question again is: Why can't I reproduce the results? When I try a simple anova without any random factors: Lack of a right result probably has to do with the type of analysis of variance that is being done. The default in R is to use so-called Type I tests, for good reason.

Re: [R] before-after control-impact analysis with R

2008-08-18 Thread Mark Difford
Hi ... Sorry, an e was erroneously elided from Ripley... Mark Difford wrote: Hi Nikolaos, My question again is: Why can't I reproduce the results? When I try a simple anova without any random factors: Lack of a right result probably has to do with the type of analysis of variance

[R] GeoR model.control - defining covariates at prediction locations

2008-08-18 Thread imicola
Hi, Im using geoR and I'm trying to do some predictions, based on an external trend. I'm having some problems specifying my model.control, specifically how do I define my model, and also the source of the covariate data at the prediction locations? I am assuming that the covariate data at the

[R] testing symmetry of distibution

2008-08-18 Thread giov
Hi all, I need to test symmetry of distributions. How can I do it using R? thank you! giov -- View this message in context: http://www.nabble.com/testing-symmetry-of-distibution-tp19028200p19028200.html Sent from the R help mailing list archive at Nabble.com.

[R] ARMA(0,2) GARCH(1,1) - code hessian

2008-08-18 Thread Desislava Kavrakova
Hello R-list-members, I'm trying to model ARMA(0,2) GARCH(1,1) process using the code below, but according to my textbook, the estimated parameters are wrong. The MA-parameters should be negative. (I've got the same problem using garchFit()). Can anyone tell me what I'm doing wrong? And how

Re: [R] Comination of two barcharts and one xyplot

2008-08-18 Thread ravi
Hi Rhelpers, Thanks a lot, Duncan, for your help. Yes, your solution was very much what I was looking for. I have learnt a lot of tricks from the code snippet that you provided. I would appreciate it if you could also show me how to create a legend for the plot. The text for the legend can be :

Re: [R] how to get no of pdf files in a particular directory

2008-08-18 Thread Henrique Dallazuanna
Try this: sapply(c(csv$, pdf$), function(x)length(dir(path=Dir, pattern = x))) On Mon, Aug 18, 2008 at 4:59 AM, Kurapati, Ravichandra (Ravichandra) [EMAIL PROTECTED] wrote: Let's say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_0 1_ 08_18_08 There will be pdf

[R] nested getInitial calls; variable scoping problems

2008-08-18 Thread Keith Jewell
Hi All, Another nls related problem (for background, I'm migrating a complicated modelling package from S-plus to R). Below I've reduced this to the minimum necessary to demonstrate my problem (I think); the real situation is more complicated. Two similar selfStart functions, ssA and ssB. The

Re: [R] grangertest/lmtest ... what am I doing wrong ?

2008-08-18 Thread tolga . i . uzuner
Many thanks Achim, much appreciated. A simple, naive implementation of granger testing (see the R code below) which does not explicitly accont for collinearities appears to give the same results as the implementation in MSBVAR, so presumably, they do something similar. granger -function(d,

[R] Converting monthly data to quarterly data

2008-08-18 Thread Denise Xifara
Dear R users, I have a dataframe where column is has countries, column 2 is dates (monthly) for each countrly, the next 10 columns are my factors where I have measurements for each country and for each date. I have attached a sample of the data in csv format with the data for 3 countries. I

Re: [R] GeoR model.control - defining covariates at prediction locations

2008-08-18 Thread Paulo Justiniano Ribeiro Jr
Trends in ge are handled by the trendargument. In particular, for the so called external trend we use varioables which can be at the geodata object or another object. For instance a model fitting call could be somethoing like: ML - likfit..., trend= ~covar1+ covar2, ...) where covar1 and covar2

Re: [R] Optim stripping attributes from relistable objects

2008-08-18 Thread Prof Brian Ripley
On Mon, 18 Aug 2008, [EMAIL PROTECTED] wrote: Ok - there is an easy work-around by just to passing the skeleton to the objective function. But would it be possible to clarify this point in the relist() help file please (specificaly the example I would think), implies that attributes are copied

[R] Fwd: Parsing XML or KML into CSV /Using R for geocoding , OR problem

2008-08-18 Thread Ajay ohri
Hi, I have a data file in a KML format which is Google Earth's format for geographic data. I need to import it into a csv file . How can I do that. KML format is just like XML format .example below Which R module with deal with an OR problem (like transportation problem using geo coded data as

[R] R for SAS and SPSS Users

2008-08-18 Thread Ajay ohri
Hi, Bob Muenchen's book is now out on release. Its terrific for a step by step tutorial for doing stuff in R, even if all you know is SAS and SPSS. Check this out here http://rforsasandspssusers.com/ and at

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread stephen sefick
The real data are counts of aquatic insects at distinct locations on a river continuum on the way down a river, so the when a point point on the graph is missing (lost sampling equipment for that month) the points downstream (toward the right) are valid to show a trend. Aren't they? Stephen

Re: [R] post hoc tests two way repeated measures anova

2008-08-18 Thread Jean-Pierre Bresciani
Hi, and thanks for the advices. I actually tried using 'lme', but haven't figured out the appropriate syntax to get the random error correct with repeated measures. let's say i have 3 independent variables, with 'aov', i would write something like: aov(dep_var~(indep_var1*indep_var2*indep_var3)

Re: [R] Converting monthly data to quarterly data

2008-08-18 Thread stephen sefick
?aggregate may do what you want On Mon, Aug 18, 2008 at 8:19 AM, Denise Xifara [EMAIL PROTECTED] wrote: Dear R users, I have a dataframe where column is has countries, column 2 is dates (monthly) for each countrly, the next 10 columns are my factors where I have measurements for each country

[R] lmer and scale parameter in glmm model

2008-08-18 Thread Fränzi Korner
Hi Oliver you once asked this question at the R help list. Hi all, I try to fit a glmm model with binomial distribution and I would to verify that the scale parameter is close to 1... the lmer function gives the following result : Estimated scale (compare to 1 ) 0.766783

[R] Using lag

2008-08-18 Thread Williams, Robin
Dear all, I am having difficulties using the seemingly-simple function lag. I have a dataframe with several weather variables (maxitemp, windspeed, rainfall etc), and the response variable (admissions). The dataset is fairly large (1530 observations). I simply want to model the response

[R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Zornitsa Luleva
Hello, I am trying to call a FORTRAN subroutine within R and something really strange happens: I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked the [Ordinal/Name Pointer] Table for the function within the library that I want to call - it is there (objdump - p

[R] Relational Operators in Legend

2008-08-18 Thread Lorenzo Isella
Dear All, I am sure that what I am asking can be solved by less than a one-liner, but I am having a hard time to get this right. Inside a legend environment, I do not have any problem if I issue the command: expression(*R[g]*~* k^{1/d[f]^{small}}*, *k= {} *15) but I would like to write that

Re: [R] lmer and scale parameter in glmm model

2008-08-18 Thread Martin Henry H. Stevens
Hi Fränzi, mod.sum - summary(model) mod.sum @ sigma Hank On Aug 18, 2008, at 9:34 AM, Fränzi Korner wrote: Hi Oliver you once asked this question at the R help list. Hi all, I try to fit a glmm model with binomial distribution and I would to verify that the scale parameter is close to

Re: [R] lmer and scale parameter in glmm model

2008-08-18 Thread Ben Bolker
Fränzi Korner fraenzi.korner at oikostat.ch writes: Have you got an answer? I am now working with R 2.7.1.. This R-version does not give the scale parameter in the summary of an lmer-object. Therefore, I would like to calculate the scale parameter by hand, but I did not find out how.

Re: [R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Peter Dalgaard
Zornitsa Luleva wrote: Hello, I am trying to call a FORTRAN subroutine within R and something really strange happens: I have a dll-library, that I load with dyn.load('mpbvv.dll'). I have checked the [Ordinal/Name Pointer] Table for the function within the library that I want to call - it

Re: [R] Design-consistent variance estimate

2008-08-18 Thread Stas Kolenikov
On 8/16/08, Doran, Harold [EMAIL PROTECTED] wrote: In terms of the design (which is a term used loosely) the schools were not randomly selected. They volunteered to participate in a pilot study. Oh, that's a next level of disaster, then! You may have to work with treatment effect models, of

Re: [R] Using lag

2008-08-18 Thread Gabor Grothendieck
You want to apply lag to time series objects and its likely that you don't have that. The dyn (and also dynlm) packages have facilities for peforming lagged regressions on various time series objects. If you don't want to use time series objects you can do the lag yourself so for vector x this

Re: [R] Re lational Operators in Legend

2008-08-18 Thread Mark Difford
Hi Lorenzo, ...but I would like to write that 5=k=15. This is one way to do what you want plot(1,1) legend(topright, expression(paste(R[g]~k^{1/d[f]^{small}}~5=k, {}=15))) HTH, Mark. Lorenzo Isella wrote: Dear All, I am sure that what I am asking can be solved by less than a

Re: [R] Design-consistent variance estimate

2008-08-18 Thread Doran, Harold
It also turns out that in educational testing, it is rare to consider the sampling design and to estimate design-consistent standard errors. I appreciate your thoughts on this, Stas. As a result, I was able to bring to my mind more transparency into what R's survey package as well as SAS proc

Re: [R] graphsheet

2008-08-18 Thread Mike Prager
Applejus [EMAIL PROTECTED] wrote: I am trying to convert the following command from SPLUS to R: graphsheet(pages = TRUE) Does anyone have an idea what is the equivalent in R? I would use windows(record = TRUE) which won't give a tabbed graphics device, but will allow you to page and

[R] another GARCH problem

2008-08-18 Thread collonil
Hallo, i want to fit a GARCH model with a extern regressor (without arma components), so i found the following function in package fGarch. I tryed out a lot of things but usually I get this Error. garchFit(formula=y~x, formula.var=~garch(1,1),data=w) Error in .garchFit(formula.mean,

Re: [R] Design-consistent variance estimate

2008-08-18 Thread Doran, Harold
Whoops, the final var estimator var(f(Y)) should have N^4 in the denominator not N^2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold Sent: Monday, August 18, 2008 10:47 AM To: Stas Kolenikov Cc: r-help@r-project.org Subject: Re: [R]

Re: [R] Re lational Operators in Legend

2008-08-18 Thread Mark Difford
Hi Lorenzo, I may (?) have left something out. It isn't clear what ~ is supposed to mean; perhaps it is just a spacer, or perhaps you meant the following: plot(1,1) legend(topright, expression(paste(R[g] %~~% k^{1/d[f]^{small}},~5=k, {}=15))) HTH, Mark. Mark Difford wrote: Hi Lorenzo,

Re: [R] how to override/replace a function in a package namespace?

2008-08-18 Thread Ben Bolker
Henrik Bengtsson hb at stat.berkeley.edu writes: The few times I want to patch a function like this, I use: unlockBinding(name, env); assignInNamespace(name, value, ns=pkgName, envir=env); assign(name, value, envir=env); lockBinding(name, env); /Henrik OK, I admit that I

Re: [R] exonmap question: rma (or justplier) crashes

2008-08-18 Thread Henrik Bengtsson
Hi, this is clearly a Bioconductor-specific issue. Please post your question to the Bioconductor mailing list instead. /Henrik On Mon, Aug 18, 2008 at 12:20 AM, Tae-Hoon Chung [EMAIL PROTECTED] wrote: Hi, All; I simply followed the exonmap vignette but came up with an unexpected error.

Re: [R] Using lag

2008-08-18 Thread Nestor Arguea
Robin, You can use Lag (upper case L) from package Hmisc. Nestor Arguea On Aug 18, 2008, at 8:40 AM, Williams, Robin wrote: Dear all, I am having difficulties using the seemingly-simple function lag. I have a dataframe with several weather variables (maxitemp, windspeed, rainfall etc), and

[R] Survey Design / Rake questions

2008-08-18 Thread Farley, Robert
I'm trying to learn how to calibrate/postStratify/rake survey data in preparation for a large survey effort we're about to embark upon. As a working example, I have results from a small survey of ~650 respondents, ~90 response fields each. I'm trying to learn how to (properly?) apply the

[R] lmer syntax, matrix of (grouped) covariates?

2008-08-18 Thread Aaron Mackey
I have a fairly large model: length(Y) [1] 3051 dim(covariates) [1] 3051 211 All of these 211 covariates need to be nested hierarchically within a grouping class, of which there are 8. I have an accessory vector, cov2class that specifies the mapping between covariates and the 8 classes.

Re: [R] matrix row product and cumulative product

2008-08-18 Thread Jeff Laake
Thanks for the tips on inline, jit and Reduce. The latter was exactly what I wanted although the loop is still the fastest for the simple product (accumulate=TRUE for reduce). With regards to Moshe's comment, I was just surprised by the timing difference. I tend to use apply without giving

Re: [R] matrix row product and cumulative product

2008-08-18 Thread Jeff Laake
Sorry a correction to my last posting. I had accumulate switched between prod and cumprod and I had also forgotten to included time for conversion from list back to matrix for cumprod. Now as Chuck stated the results for Reduce are about the same or worse than a loop. regards--jeff

Re: [R] Survey Design / Rake questions

2008-08-18 Thread Stas Kolenikov
Your reading, in increasing order of difficulty/mathematical details, might be Lohr's Sampling (http://www.citeulike.org/user/ctacmo/article/1068825), Korn Graubard's Health Surveys (http://www.citeulike.org/user/ctacmo/article/553280), and Sarndal et. al. Survey Math Bible

Re: [R] Converting monthly data to quarterly data

2008-08-18 Thread Gavin
On Mon, 2008-08-18 at 14:31 +0100, Denise Xifara wrote: Thank you very much Stephen, but how will aggregate deal with months that fall outside annual quarters? eg, one extra month at the end of the dataset? [Without your data I'm kind of guessing at the exact format and problem, but the example

[R] changing plot font for Times new roman

2008-08-18 Thread milton ruser
Dear all, I know that it is a know issue, but I would like to change the type of font on my plot, and I am not sure the rigth way. I would like to use Times New Roman font, but according to the par() help, some device allow we choose an family of fonts. I tryed par(family=times) without success.

Re: [R] seq: specify *minimum* end value, more elegant solution

2008-08-18 Thread Henrique Dallazuanna
Hi, Maybe you can specify the length of vector: seq(from=0, by=4, l = 4) seq(from=0, by=4, l = 5) On Mon, Aug 18, 2008 at 3:38 PM, Timothy W. Hilton [EMAIL PROTECTED] wrote: Hello, Using seq, I would like to specify a minumum end value, rather than a maximum end value. For example,

Re: [R] lmer syntax, matrix of (grouped) covariates?

2008-08-18 Thread Douglas Bates
On Mon, Aug 18, 2008 at 11:20 AM, Aaron Mackey [EMAIL PROTECTED] wrote: I have a fairly large model: length(Y) [1] 3051 dim(covariates) [1] 3051 211 All of these 211 covariates need to be nested hierarchically within a grouping class, of which there are 8. I have an accessory vector,

Re: [R] lmer and scale parameter in glmm model

2008-08-18 Thread Douglas Bates
On Mon, Aug 18, 2008 at 9:27 AM, Ben Bolker [EMAIL PROTECTED] wrote: Fränzi Korner fraenzi.korner at oikostat.ch writes: Have you got an answer? I am now working with R 2.7.1.. This R-version does not give the scale parameter in the summary of an lmer-object. Therefore, I would like to

Re: [R] changing plot font for Times new roman

2008-08-18 Thread Roland Rau
Hi, milton ruser wrote: we choose an family of fonts. I tryed par(family=times) without success. what about this: pdf(plot1Times.pdf, family=Times) plot(1,1) dev.off() pdf(plot1NotTimes.pdf) plot(1,1) dev.off() Maybe you check also the help for ?postscriptFonts I hope this helps you a bit

[R] help

2008-08-18 Thread Andreia da Silva Meyer
Hi, I am looking for an efficient way to compute the values of the density function of a multivariate T distribution - something like dmvnorm, but for T distr. Does this exist somewhere? Many thanks, Andréia. __ R-help@r-project.org mailing list

Re: [R] help

2008-08-18 Thread Henrique Dallazuanna
See dmt function in csampling package. On Mon, Aug 18, 2008 at 3:15 PM, Andreia da Silva Meyer [EMAIL PROTECTED] wrote: Hi, I am looking for an efficient way to compute the values of the density function of a multivariate T distribution - something like dmvnorm, but for T distr. Does this

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread Rolf Turner
On 19/08/2008, at 1:04 AM, stephen sefick wrote: The real data are counts of aquatic insects at distinct locations on a river continuum on the way down a river, so the when a point point on the graph is missing (lost sampling equipment for that month) the points downstream (toward the right)

[R] readable dendrograms with many units

2008-08-18 Thread Paul Slater
Using Mathematica, I've performed a hierarchical clustering of 3,107 U. S. counties based on 1995-2000 intercounty migration, using an algorithm of my own devising (see http://arxiv.org/abs/0807.1550). I can also generate the associated 3,107 x 3,107 matrix of ultrametric distances.

Re: [R] readable dendrograms with many units

2008-08-18 Thread Roland Rau
Hi, since you are new to R, you might not be aware of some nice feature at the homepage of R: the task view http://cran.r-project.org/web/views/ For various topics, somebody kindly provided an overview of packages and functions for the specific topic. Also for cluster analysis:

[R] use expression() in a loop

2008-08-18 Thread Nanye Long
Hi all, I want to do plot() in a loop to make 10 graphs, so I have some code like for (i in 1:10) { plot(... ... , xlab = expression(g[i]) ) } I expect g_1, g_2, and so on appear on x labels, but it simply prints g_i for each graph. Does anybody know how to get around this problem? Thanks.

Re: [R] use expression() in a loop

2008-08-18 Thread Sundar Dorai-Raj
Nanye Long said the following on 8/18/2008 3:00 PM: Hi all, I want to do plot() in a loop to make 10 graphs, so I have some code like for (i in 1:10) { plot(... ... , xlab = expression(g[i]) ) } I expect g_1, g_2, and so on appear on x labels, but it simply prints g_i for each graph.

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread hadley wickham
On Mon, Aug 18, 2008 at 3:54 PM, Rolf Turner [EMAIL PROTECTED] wrote: On 19/08/2008, at 1:04 AM, stephen sefick wrote: The real data are counts of aquatic insects at distinct locations on a river continuum on the way down a river, so the when a point point on the graph is missing (lost

Re: [R] use expression() in a loop

2008-08-18 Thread Marc Schwartz
on 08/18/2008 05:00 PM Nanye Long wrote: Hi all, I want to do plot() in a loop to make 10 graphs, so I have some code like for (i in 1:10) { plot(... ... , xlab = expression(g[i]) ) } I expect g_1, g_2, and so on appear on x labels, but it simply prints g_i for each graph. Does

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread Rolf Turner
On 19/08/2008, at 10:15 AM, hadley wickham wrote: On Mon, Aug 18, 2008 at 3:54 PM, Rolf Turner [EMAIL PROTECTED] wrote: On 19/08/2008, at 1:04 AM, stephen sefick wrote: The real data are counts of aquatic insects at distinct locations on a river continuum on the way down a river, so the

[R] plm problem: Error in dimnames(x) - dn : length of 'dimnames' [2] not equal to array extent

2008-08-18 Thread Daniel Folkinshteyn
Hi, I am having a problem with a fixed-effects regression using the plm package. A regression of this form runs just fine: plm(y ~ x*z, data=datasubset, model=within) but when i try to add a lag in there, and run it on the same dataset, like this: plm(y ~ x*z + lag(x,-1)*z,

Re: [R] Survey Design / Rake questions

2008-08-18 Thread Farley, Robert
Thank you for the list of references. Do you know of any free references available online? I'll have to find my library card :-) My motivation is to try to correct for a time on board bias we see in our surveys. Not surprisingly, riders who are only on board a short time don't attempt/finish

Re: [R] Lattice: problem using panel.superpose and panel.groups

2008-08-18 Thread Deepayan Sarkar
On Sun, Aug 17, 2008 at 2:36 AM, Dieter Menne [EMAIL PROTECTED] wrote: Michael Braun braunm at MIT.EDU writes: Dieter: Thank you for your response. As you requested, I created a self- running example, pasted below. It may be a little wordier than I would like, but it runs. .. Details

Re: [R] how to override/replace a function in a package namespace?

2008-08-18 Thread Henrik Bengtsson
Hi, see reassignInPackage() of R.utils - that's where the code snipped comes from. I wrote that so that I could patch/optimize certain function (before they where patch in the public release). I haven't used it to patch S4 methods, so I don't know it will work for them. Here is an example of

[R] Jitter in xYplot?

2008-08-18 Thread John Poulsen
Hello, The simple example below plots three species by year and site. However, I would like the points to occur in groups horizontally, rather than on top of each other. I thought jitter might work, but haven't been successful in getting it to do what I want. Any ideas? Thanks in

Re: [R] use expression() in a loop

2008-08-18 Thread Henrik Bengtsson
...or use the more generic substitute() to replace parts of an expression, e.g. i - 3; xlab1 - substitute(g[idx], list=list(idx=i)); xlab2 - bquote(g[.(i)]); stopifnot(identical(xlab1, xlab2)); /Henrik On Mon, Aug 18, 2008 at 3:18 PM, Marc Schwartz [EMAIL PROTECTED] wrote: on

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread hadley wickham
Doesn't a line plot inherently display a set of linear interpolations? Yes. And your point is? Compare: x - 1:10 y - rep(1:2,5) y[5] - NA y0 - approx(x,y,xout=1:10) plot(y0,type=l) with foo(x,y) where foo - function(x,y,...) { plot(x,y,type=n,...) na -

[R] problem with save function

2008-08-18 Thread Juan Manuel Barreneche
Hello list! i write because i'm having a strange problem with the save function, here an example: x - stats::runif(20) y - list(a = 1, b = TRUE, c = oops) save(x, y, file = xy.Rdata) xy - load(xy.Rdata) xy [1] x y why does this happens, when: x [1] 0.96586833 0.60340508 0.23465887

Re: [R] problem with save function

2008-08-18 Thread Rolf Turner
Read the help for load(); note the ``Value'' section. cheers, Rolf Turner On 19/08/2008, at 11:51 AM, Juan Manuel Barreneche wrote: Hello list! i write because i'm having a strange problem with the save function, here an example: x - stats::runif(20) y - list(a =

Re: [R] problem with save function

2008-08-18 Thread Henrik Bengtsson
...and see saveObject() and loadObject() in R.utils, which might do what you expected, e.g. x - stats::runif(20) y - list(a=1, b=TRUE, c=oops) saveObject(list(foo=x,bar=y), xy.Rdata) xy - loadObject(xy.Rdata) str(xy) List of 2 $ foo: num [1:20] 0.1154 0.6534 0.0876 0.5977 0.6841 ... $

Re: [R] problem with save function

2008-08-18 Thread Juan Manuel Barreneche
well i see i've been really foolish, sorry thank you! Juan On Mon, Aug 18, 2008 at 9:09 PM, Henrik Bengtsson [EMAIL PROTECTED]wrote: ...and see saveObject() and loadObject() in R.utils, which might do what you expected, e.g. x - stats::runif(20) y - list(a=1, b=TRUE, c=oops)

Re: [R] Multiple Plotting help (lines don't always connect)

2008-08-18 Thread stephen sefick
I am trying to use the type=b in the plot statement so that there are indeed points where there is a real data point and then the linear interpolation is between points that are seperated by NA. The symbol shows that only where the symbol is is where there is real data, and I planned on relaying

[R] R vs Stata on generalized linear mixed models: glmer and xtmelogit

2008-08-18 Thread Antonio.Gasparrini
Hello, I have compared the potentials of R and Stata about GLMM, analysing the dataset 'ohio' in the package 'faraway' (the same dataset is analysed with GEE in the book 'Extending the linear model with R' by Julian Faraway). Basically, I've tried the 2 commands 'glmmPQL' and 'glmer' of R and

[R] Open directory within a menu in tcltk

2008-08-18 Thread Judith Flores
Hello, I am trying to setup a menu to open files and directories. I have the following code: opendir-function() { dirname-tclvalue(tkchooseDirectory()) } openfile-function() { filename-tclvalue(tkgetOpenFile()) } require(tcltk) t1-tktoplevel() topMenu-tkmenu(t1)

[R] Please help: Limit single row calculation

2008-08-18 Thread Jan Akko Eleveld
Is there anyone who can help me with the following? It's hard to describe in a few words, but hope you'll understand. I attempt to model refugee mortality over time using Monte Carlo. Before doing repetitive simulations, my function should go through only one survey/row at the time, but

Re: [R] exporting adaBoost model

2008-08-18 Thread Bob Flagg
Hans, I was not aware of the Orange library. Since import via PMML is not possible I guess I could simply build the model in Python using this library. I'll give this a shot and compare it with the approach via Rpy. Thanks for the help! Bob On Sun, 2008-08-17 at 23:31 -0700, Hans W.

Re: [R] A doubt about lm and the meaning of its summary

2008-08-18 Thread Moshe Olshansky
Hi Alberto, Please disregard my previous note - I probably had a black-out!!! --- On Tue, 19/8/08, Alberto Monteiro [EMAIL PROTECTED] wrote: From: Alberto Monteiro [EMAIL PROTECTED] Subject: [R] A doubt about lm and the meaning of its summary To: r-help@r-project.org Received: Tuesday, 19

Re: [R] Box Plot Text

2008-08-18 Thread Peter Alspach
Michael set.seed(1) boxplot(list(A=rnorm(50, 2), B=runif(50)*2)) text(2, 3, 'Text here') Presumably this is not what you mean. Can you be a little more explicit? Peter Alspach -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Grant Sent:

Re: [R] Multiple column/row names?

2008-08-18 Thread Hesen Peng
A, I'm doing this because of the project I'm working on. The gene names in clinical genomic usually have two specifications for one entry. And I was just wondering whether there is a simple way of solving that problem. 2008/8/19 jim holtman [EMAIL PROTECTED]: The row names are easy since

[R] Course Announcement - Quantitative Risk Analysis with R

2008-08-18 Thread Greg Nolder
Vose Consulting is pleased to announce the following course: Quantitative Risk Analysis with R Fort Collins, Colorado, USA October 27-30, 2008 This 4-day course will cover the core principles of quantitative risk analysis and the most important risk modeling principles, methods and techniques.

[R] Enhancement request for bringToTop()

2008-08-18 Thread Richard M. Heiberger
Currently (R-2.7.1 on Windows) bringToTop(stay=TRUE) when run before a device is opened, gives the error message bringToTop(stay=TRUE) Error in bringToTop(stay = TRUE) : can only bring windows devices to the front In the same circumstances, a call to par() opens a device. My request is

Re: [R] Call a Fortran subroutine with R: R crashes

2008-08-18 Thread Prof Brian Ripley
On Mon, 18 Aug 2008, Zornitsa Luleva wrote: Hello, I am trying to call a FORTRAN subroutine within R and something really strange happens: Did you read the posting guide? It suggests the R-devel list for questions about 'C, C++ etc', and Fortran is part of the 'etc'. I have a

Re: [R] Enhancement request for bringToTop()

2008-08-18 Thread Prof Brian Ripley
R-devel is the list for enhancement requests. On Tue, 19 Aug 2008, Richard M. Heiberger wrote: Currently (R-2.7.1 on Windows) bringToTop(stay=TRUE) when run before a device is opened, gives the error message bringToTop(stay=TRUE) Error in bringToTop(stay = TRUE) : can only bring windows