Re: [R] debug print() commands not showing during file write loop

2006-08-09 Thread vincent
Richard Evans a écrit : can it be changed such that the print() output is echoed to the screen when it is processed? ?flush.console hih __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] problem with tseries (was unable to restore saved data)

2006-08-09 Thread Prof Brian Ripley
Hmm. 'time' is in package stats, and you seem to have saved an object that is pulling in the namespace 'tseries'. Loading the workspace is done before loading the standard set of packages. This appears to be a bug in tseries, for if its namespace needs 'time', it should import it from 'stats',

Re: [R] How to draw the decision boundaries for LDA and Rpart object

2006-08-09 Thread Prof Brian Ripley
On Wed, 9 Aug 2006, Am Stat wrote: Hello useR, Could you please tell me how to draw the decision boundaries in a scatterplot of the original data for a LDA or Rpart object. There are examples in MASS (the book). For example: library(rpart) fit.rpart - rpart(as.factor(group.id)~.,

[R] nlme iteration process, few questions

2006-08-09 Thread Vaidotas Zemlys
Hi all, Recently I started using nlme intensively, and since it is all new for me, I have some questions. I am running nlme with control=list(verbose=TRUE) and during one lengthy fitting, I started watching the output for some clues, how to speed up the process. I noticed that in one case, the

[R] exponential proportional hazard model

2006-08-09 Thread Daniel Gutknecht
Dear R-users, I am looking for a function designed to handle parametric proportional hazard models with a piecewise constant baseline hazard (i.e. dummies for annual intervals) and time-dependent covariates since I'm especially interested about the effect of those covariates on the baseline

[R] CRAN package: update of 'vars' submitted

2006-08-09 Thread Pfaff, Bernhard Dr.
Dear useR! an updated version of package 'vars' has been shipped to CRAN lately. Information on package 'vars': == Title: VAR Modelling Version: 0.1.3 Date: 2006-07-27 Author:Bernhard Pfaff Maintainer:Bernhard Pfaff bernhard at

Re: [R] RE

2006-08-09 Thread Spencer Graves
I've never used the 'bayesm' package, but your question sounded interesting and I've not seen a reply, so I decided to look at it. Unfortunately, I couldn't make sense of your example in the time available. Instead, I will offer a few more general questions / suggests that I hope

[R] nested ANOVA using lme

2006-08-09 Thread David Semmens
I have an ANOVA model with 2 factors Environment and Site, Diameter is the response variable. Site should be nested within Environment. Site is also a random factor while Environment is fixed. I can do this analysis using the aov function by using these commands:

Re: [R] Take random sample from class variable

2006-08-09 Thread Muhammad Subianto
Dear all, Andy, thanks you for your help and suggestions. This is exactly what I was looking for. Kindly regards, Muhammad Subianto On 8/8/06, Liaw, Andy [EMAIL PROTECTED] wrote: There may be better ways, but this should work: R p.yes - 0.7 R n.yes - rbinom(1, nof.sample, p.yes) R n.no -

Re: [R] nested ANOVA using lme

2006-08-09 Thread Dimitris Rizopoulos
in lme() you need to specify the random-effects with a formula passed to the 'random' argument, e.g., something like fit - lme(Diam ~ Env + Site, random = ~ 1 | Env / Site, data = environ) summary(fit) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical

Re: [R] locating intervals

2006-08-09 Thread Martin Maechler
I'm pretty sure you want to use findInterval() Why did you not find it? In other words, what did you try to find it? Regards, Martin Maechler, ETH Zurich halldor == halldor bjornsson [EMAIL PROTECTED] on Tue, 8 Aug 2006 16:47:18 + writes: halldor Hi , I have two sorted vectors

[R] NLS and IV

2006-08-09 Thread John Janmaat
Hello All, I'm looking to test a variable in a logit model (glm(..., binomial(link=logit))) for exogeneity (endogeneity). At this point I am planning to try implementing Jeffery Grogger's A Simple Test for Exogeneity in Probit, Logit, and Poisson Regression Models, Economic Letters, 1990. To do

Re: [R] prefixing list names in print

2006-08-09 Thread Laurent Deniau
bogdan romocea wrote: A simple function will do what you want, customize this as needed: lprint - function(lst,prefix) { for (i in 1:length(lst)) { cat(paste(prefix,$,names(lst)[i],sep=),\n) print(lst[[i]]) cat(\n) } } P - list(A=a,B=b) lprint(P,Prefix) I thought that there is a

[R] solving nonlinear equations in R

2006-08-09 Thread Demirtas, Hakan
Hi, I can't seem to get computationally stable estimates for the following system: Y=a+bX+cX^2+dX^3, where X~N(0,1). (Y is expressed as a linear combination of the first three powers of a standard normal variable.) Assuming that E(Y)=0 and Var(Y)=1, one can obtain the following equations after

[R] missing documentation entries

2006-08-09 Thread Adrian Dusa
Dear list, When creating a package, there are always many little utility functions that belong to the internal kitchen of the main, documented functions. Now, when checking the sources with R CMD check, I get a warning for those little functions that are not documented. I would have two

[R] Joint confidence intervals for GLS models?

2006-08-09 Thread Kennedy David
Dear All, I would like to be able to estimate confidence intervals for a linear combination of coefficients for a GLS model. I am familiar with John Foxton's helpful paper on Time Series Regression and Generalised Least Squares (GLS) and have learnt a bit about the gls function. I have

[R] legend on trellis plot

2006-08-09 Thread Henrik Agersø
Dear all I have two questions regarding trellis plots - which I hope you may be able to help me with. Is it possible to place the key in a trellis plot on the panel (instead of beside the panel)? This will cause the same key to be reproduced on each panel. Please see the plot below - here I

Re: [R] between-within anova: aov and lme

2006-08-09 Thread Spencer Graves
I can't answer your question about 'aov', but have you tried the following with 'lme': lme(response~A*B*C,random=~1|subject) This assumes that A, B, and C are fixed effects, either continuous variables or factors present at only a very few levels whose effects are

Re: [R] missing documentation entries

2006-08-09 Thread Prof Brian Ripley
This is discussed in `Writing R Extensions', which both points you to the 'internal' keyword, and (in the current version) mentions using name spaces to hide such functions. This really was a question for R-devel: please do study the posting guide. `R-devel is intended for questions and

Re: [R] legend on trellis plot

2006-08-09 Thread Gabor Grothendieck
1. Use the x, y and corner components to the key= list to specify the legend position, and 2. pass the panel.number in the panel function and test that as shown in the panel function below. Alternately you can place the horizontal line on afterwards using

Re: [R] Getting data out of a loop

2006-08-09 Thread John Kane
My thanks to, in order of the postings appearance at my reader, Jim Holtman, Andrew Robinson Neuro LeSuperHéros for thre different and very useful solutions to my problem. Your help is greatly appreciated. --- Neuro LeSuperHéros [EMAIL PROTECTED] wrote: I'd create an empty dataframe prior

Re: [R] missing documentation entries

2006-08-09 Thread Adrian Dusa
On Wednesday 09 August 2006 14:37, Prof Brian Ripley wrote: This is discussed in `Writing R Extensions', which both points you to the 'internal' keyword, and (in the current version) mentions using name spaces to hide such functions. This really was a question for R-devel: please do study the

[R] evolutionary computing in R

2006-08-09 Thread Christian Miehle
Hallo, Ich bin auf der Suche nach umgesetzten evolutionären Algorithmen in R. Leider habe ich kein entsprechendes Package oder Funktionen dieser Verfahrensgruppe gefunden. Weiß zufällig jemand, ob Funktionen oder Pakete zu dieser Problematik in R existieren? Vielen Dank, Christian

Re: [R] evolutionary computing in R

2006-08-09 Thread Gabor Grothendieck
Check out the machining learning task view at: http://cran.r-project.org/src/contrib/Views/ On 8/9/06, Christian Miehle [EMAIL PROTECTED] wrote: Hallo, Ich bin auf der Suche nach umgesetzten evolutionären Algorithmen in R. Leider habe ich kein entsprechendes Package oder Funktionen dieser

Re: [R] evolutionary computing in R

2006-08-09 Thread Rau, Roland
Hi Christian, the language spoken on this mailing list is English not German. As far as I know there is one package called gafit which is intended for... library(gafit) ?gafit ...Genetic Algorithm for Curve Fitting Is this something you are looking for? For non-German speakers who are

[R] scaling constant in optim(L-BFGS-B)

2006-08-09 Thread Simon Ruegg
Hi all, I am trying to find estimates for 7 parameters of a model which should fit real data. I have a function for the negative log likelihood (NLL) of the data. With optim(method=L-BFGS-B,lower=0) I am now minimizing the NLL to find the best fitting parameters. My problem is that the

[R] 2 places on R course

2006-08-09 Thread Highland Statistics Ltd.
Apologies for cross-posting There are two places available on a 3-day R course in Newburgh, UK (28-30 August 2006). Full details can be found at: www.brodgar.com Kind regards, Alain Zuur Highland Statistics Ltd. __ R-help@stat.math.ethz.ch

Re: [R] scaling constant in optim(L-BFGS-B)

2006-08-09 Thread Dimitris Rizopoulos
maybe it would be better to scale the parameters (using 'parscale') instead of NLL. I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

[R] R2HTML: request for an extended example

2006-08-09 Thread Michael Kubovy
Dear R-helpers, If you know of an extended example of the use of R2HTML, in which the various constructs are present in one place, could you please point me to it or send it to me? _ Professor Michael Kubovy University of Virginia Department of Psychology USPS:

Re: [R] R2HTML: request for an extended example

2006-08-09 Thread Tobias Verbeke
Michael Kubovy wrote: Dear R-helpers, If you know of an extended example of the use of R2HTML, in which the various constructs are present in one place, could you please point me to it or send it to me? There was an article in the R News of December 2003

[R] data.frame to shape

2006-08-09 Thread Leonardo Lami
Hi all, I have a simple question: I have a data.frame like this: id x y 1 50 1647685 4815259 2 50 1647546 4815196 3 50 1647454 4815294 4 50 1647405 4815347 5 50 1647292 4815552 6 50 1647737 4815410 7 74 1647555 4815201 8 74 1647464 4815023 9 74 1646970 4815129 10 74 1646895

[R] R: data.frame to shape

2006-08-09 Thread Guazzetti Stefano
assuming that the rows are sorted correctly dat id x y 1 50 1647685 4815259 2 50 1647546 4815196 3 50 1647454 4815294 4 50 1647405 4815347 5 50 1647292 4815552 6 50 1647737 4815410 7 74 1647555 4815201 8 74 1647464 4815023 9 74 1646970 4815129 10 74 1646895 4815264 11 74

Re: [R] data.frame to shape

2006-08-09 Thread Gabor Grothendieck
Try this: DF[unlist(tapply(rownames(DF), DF$id, function(x) c(x, x[1]))),] On 8/9/06, Leonardo Lami [EMAIL PROTECTED] wrote: Hi all, I have a simple question: I have a data.frame like this: id x y 1 50 1647685 4815259 2 50 1647546 4815196 3 50 1647454 4815294 4 50

Re: [R] Sampling from a Matrix

2006-08-09 Thread Marc Schwartz (via MN)
On Tue, 2006-08-08 at 14:10 -0400, Liaw, Andy wrote: From: Marc Schwartz On Fri, 2006-08-04 at 12:46 -0400, Daniel Gerlanc wrote: Hello all, Consider the following problem: There is a matrix of probabilities: set.seed(1) probs - array(abs(rnorm(25, sd = 0.33)),

[R] Rd question: itemize in arguments

2006-08-09 Thread Christian Hennig
Dear list, I'm writing Rd files and I'd like to have a list inside the description of an argument: (...) \arguments{ (...) \item{bootmethod}{vector of strings, defining the methods used for resampling. Possible methods: \itemize{ \item{boot} {Nonparametric bootstrap (precise

Re: [R] lme4 and lmeSplines

2006-08-09 Thread Spencer Graves
At least at one time, to use lmer after lme, you had to quit R before loading 'lme4' because of substantive conflicts between 'nlme' and 'lme4' / 'Matrix'. That may be the source of your problem. I can think of two possible ways to get around this: 1. I might try

[R] Speeding indexing and sub-sectioning of 3d array

2006-08-09 Thread Swidan, Firas
Hi, I am having a problem with a very slow indexing and sub-sectioning of a 3d array: dim(arr) [1] 245 175 150 For each point in the array, I am trying to calculate the mean of the values in its surrounding: mean( arr[ (i - radius):(i + radius), (j -

Re: [R] parameter yaxs / function hist (graphics)

2006-08-09 Thread Marc Schwartz (via MN)
Paulo, Try the following: x - rnorm(100) par(xaxs = i) par(yaxs = i) hist(x, breaks = seq(-4, 4, 0.5), ylim = c(0, 40), xlim = c(-4, 4)) box() The problem is that graphics:::plot.histogram() is coded in such a way that the use of 'xaxs' and 'yaxs' are ineffectual, as they are not

Re: [R] [Rcom-l] GARCH(1,1) optimization with R

2006-08-09 Thread Erich Neuwirth
This is not the right list for your question. Question on how to use R and R's libraries should be posted to R-help@stat.math.ethz.ch Patrick Zhang wrote: Hello all, Trying to implement GARCH(1,1) with ASP.NET http://asp.net/ and VB.NEThttp://vb.net/. It involves optimization of a

[R] tk combobox question

2006-08-09 Thread Franco Mendolia
Hello! The IWigdets::combobox has an option selectioncommand to specify a procedure which is called when an item in the combobox is selected. Does ComboBox from Bwidgets have an equal option or is there a simple method to do thi? I haven't found one but i would like to use Bwidgets instead of

Re: [R] unbalanced mixed effects models for fully factorial designs

2006-08-09 Thread Spencer Graves
Dear Prof. Logan: Are you familiar with 'lme' in the 'nlme' package? Superlative documentation for the 'nlme' package is Pinheiro and Bates (2000) Mixed effects models in S and S-PLUS (Springer, listed as 'available' in the catalog of your university library). The standard R

[R] GARCH(1,1) optimization with R

2006-08-09 Thread Patrick Zhang
Hello all, Trying to implement GARCH(1,1) with ASP.NET http://asp.net/ and VB.NEThttp://vb.net/. It involves optimization of a three-variate function with some constraints. Learned from Wilmott.com http://wilmott.com/ that R might be able to do it but have no idea how. Could anyone help me out

Re: [R] Joint confidence intervals for GLS models?

2006-08-09 Thread Frank E Harrell Jr
Kennedy David wrote: Dear All, I would like to be able to estimate confidence intervals for a linear combination of coefficients for a GLS model. I am familiar with John Foxton's helpful paper on Time Series Regression and Generalised Least Squares (GLS) and have learnt a bit about the

[R] Combinations question

2006-08-09 Thread Martin
I need to generate a {0,1} matrix wifht nCr rows and n columns. The rows of the matrix will consist of all possible combinations containing r ones. My clumsy attempt for n = 6 and r = 3 is X - expand.grid(c(1,0),c(1,0),c(1,0),c(1,0),c(1,0),c(1,0)) Y - X[rowSums(X)==3,] I can genralize this in

[R] objects and environments

2006-08-09 Thread Adrian Dusa
Dear list, I have two functions created in the same environment, fun1 and fun2. fun2 is called by fun1, but fun2 should use an object which is created in fun1 fun1 - function(x) { ifelse(somecondition, bb - o, bb - *) ## mymatrix is created, then myresult - apply(mymatrix, 1, fun2) }

Re: [R] ggplot facet label font size

2006-08-09 Thread Walker, Sam
Thanks for the lattice help Gabor and Deepayan. These snippets work well. I've only been using R a few months and it and the user community have exceeded my expectations. Best Regards, -Sam -Original Message- From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] Sent: Sunday, August 06,

Re: [R] objects and environments

2006-08-09 Thread Dimitris Rizopoulos
try this: fun1 - function(x) { environment(fun2) - environment() ifelse(somecondition, bb - o, bb - *) ## mymatrix is created, then myresult - apply(mymatrix, 1, fun2) } I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of

Re: [R] objects and environments

2006-08-09 Thread Adrian Dusa
On Wednesday 09 August 2006 18:31, Dimitris Rizopoulos wrote: try this: fun1 - function(x) { environment(fun2) - environment() ifelse(somecondition, bb - o, bb - *) ## mymatrix is created, then myresult - apply(mymatrix, 1, fun2) } Beautiful :) Thanks very much Dimitris, I

Re: [R] Combinations question

2006-08-09 Thread Jacques VESLOT
library(gtools) cb - function(n,r) t(apply(combinations(n, r), 1, function(x) ifelse(1:n %in% x, 1, 0))) cb(6,3) --- Jacques VESLOT CNRS UMR 8090 I.B.L (2ème étage) 1 rue du Professeur Calmette B.P. 245 59019 Lille Cedex Tel : 33

[R] minimization a quadratic form with some coef fixed and some constrained

2006-08-09 Thread Yingfu Xie
Hello, all, I had problems with an extension to a classic optimization problem. The target is to minimize a quadratic form a'Ma with respect to vector b, where vector a=(b',-1)', i.e., a is the expand of b, and M is a symmetric matrix (positive definite if needed). One more constrain on b is

[R] cannot plot too much (using Mac interface)

2006-08-09 Thread Alessandro Gagliardi
Thanks. And sorry for abusing the word crash. I understand the difference. However, now that you mention it, there is a case where I think R is crashing. I'm not sure if it's R or if it's the Mac OS interface, but if I try to plot something complicated (or a series of complicated things) while

[R] categorical data

2006-08-09 Thread Christian Oswald
Dear List, I neeed a grouped list with two sort of categorical data. I have a data .frame like this. yearcat.b c 1 2006a1 125 212 2 2006a2 256 212 3 2005a1 14 12 4 2004a3 565 123 5 2004

Re: [R] minimization a quadratic form with some coef fixed and some constrained

2006-08-09 Thread Rolf Turner
Yingfu Xie wrote: I had problems with an extension to a classic optimization problem. The target is to minimize a quadratic form a'Ma with respect to vector b, where vector a=(b',-1)', i.e., a is the expand of b, and M is a symmetric matrix (positive definite if needed). One more constrain

Re: [R] objects and environments

2006-08-09 Thread Gabor Grothendieck
Dmitris has already provided the solution but just throught I would' mention that your third alternative can be written: apply(mymatrix, 1, fun2, bb = bb) (assuming fun2 has arguments idx and bb) which is not nearly so ugly so you might reconsider whether its ok for you to just pass bb. On

[R] R CMD check error

2006-08-09 Thread Christian Hennig
Dear list, R CMD check on my updated package now generated the following error: LaTeX errors when creating DVI version. This typically indicates Rd problems. But the Rd files (and everything else) were checked as OK (I removed the problem about which I asked the list some hours ago, but

Re: [R] objects and environments

2006-08-09 Thread Adrian Dusa
On Wednesday 09 August 2006 19:14, Gabor Grothendieck wrote: Dmitris has already provided the solution but just throught I would' mention that your third alternative can be written: apply(mymatrix, 1, fun2, bb = bb) (assuming fun2 has arguments idx and bb) which is not nearly so ugly so you

[R] Can one use correlations (or R^2) as data for an ANOVA?

2006-08-09 Thread Jose Quesada
Dear all, This may seem obvious for some of you, but it got me thinking. Can one use correlations (or R^2) as data for an ANOVA? The case in hand: I have several models fitting the same data (individual fits per subject). The different models fitting the same guy will produce different R^2, I

Re: [R] R CMD check error

2006-08-09 Thread Martin Maechler
Christian == Christian Hennig [EMAIL PROTECTED] on Wed, 9 Aug 2006 17:21:18 +0100 (BST) writes: Christian Dear list, R CMD check on my updated package now Christian generated the following error: Christian LaTeX errors when creating DVI version. This Christian typically

[R] (3) Courses R/Splus Advanced Programming in New York City ***September 11-12 ***by the R Development Core Tean Guru

2006-08-09 Thread elvis
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

[R] numerical differentiation

2006-08-09 Thread nurza m
Hi list, How to do numerical differentiation in R. is it using genD in numDeriv package thanks in advance __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Combinations question

2006-08-09 Thread Martin Maechler
Jacques == Jacques VESLOT [EMAIL PROTECTED] on Wed, 09 Aug 2006 17:33:05 +0200 writes: Jacques library(gtools) Jacques cb - function(n,r) t(apply(combinations(n, r), 1, function(x) ifelse(1:n %in% x, 1, 0))) Jacques cb(6,3) Several months ago, when this came up as well, I had

Re: [R] R CMD check error (solved)

2006-08-09 Thread Christian Hennig
Thank you Martin, Christian Dear list, R CMD check on my updated package now Christian generated the following error: Christian LaTeX errors when creating DVI version. This Christian typically indicates Rd problems. (...) Run R CMD Rd2dvi directly on the relevant Rd

Re: [R] numerical differentiation

2006-08-09 Thread Paul Gilbert
nurza m wrote: Hi list, How to do numerical differentiation in R. is it using genD in numDeriv package This depends on why you want the derivatives. The functions in numDeriv use Richardson extrapolation to get fairly accurate numerical derivatives. If you want the derivatives for

Re: [R] R2HTML: request for an extended example

2006-08-09 Thread Michael Kubovy
On Aug 9, 2006, at 9:23 AM, Tobias Verbeke wrote: Michael Kubovy wrote: Dear R-helpers, If you know of an extended example of the use of R2HTML, in which the various constructs are present in one place, could you please point me to it or send it to me? There was an article in the R

Re: [R] lme4 and lmeSplines

2006-08-09 Thread Douglas Bates
On 8/2/06, Kevin Wright [EMAIL PROTECTED] wrote: I'm trying to use the lmeSplines package together with lme4. Below is (1) an example of lmeSplines together with nlme (2) an attempt to use lmeSplines with lme4 (3) then a comparison of the random effects from the two different methods. (1)

[R] Unique rows

2006-08-09 Thread Lanre Okusanya
hello all, I have a dataset where the subjects are duplicated. How do I subset such that I can get only I row/subject. aa-c(1,1,2,2,3,3,4,4,5,5,6,6) bb-c(56,56,33,33,53,53,20,20,63,63,9,9) cc-data.frame(aa,bb) I would like to subset df(cc) such that I can get aa bb 1 56 2 33 3 53 4 20 5 63 6 9

Re: [R] Unique rows

2006-08-09 Thread Dimitrios Rizopoulos
if you want the first row for the unique 'aa' entries, try the following: cc[!duplicated(cc$aa), ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium

Re: [R] Unique rows

2006-08-09 Thread jim holtman
cc[!duplicated(cc$bb),] aa bb 1 1 56 3 2 33 5 3 53 7 4 20 9 5 63 11 6 9 On 8/9/06, Lanre Okusanya [EMAIL PROTECTED] wrote: hello all, I have a dataset where the subjects are duplicated. How do I subset such that I can get only I row/subject. aa-c(1,1,2,2,3,3,4,4,5,5,6,6)

Re: [R] Unique rows

2006-08-09 Thread Lanre Okusanya
Thanks. I tried that, however for some reason, it still left some duplicates On 8/9/06, Gary Collins [EMAIL PROTECTED] wrote: try unique(cc) aa bb 1 1 56 3 2 33 5 3 53 7 4 20 9 5 63 11 6 9 HTH Gary On 09/08/06, Lanre Okusanya [EMAIL PROTECTED] wrote: hello all,

Re: [R] Unique rows

2006-08-09 Thread Lanre Okusanya
Thanks! That worked well On 8/9/06, Dimitrios Rizopoulos [EMAIL PROTECTED] wrote: if you want the first row for the unique 'aa' entries, try the following: cc[!duplicated(cc$aa), ] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School

Re: [R] categorical data

2006-08-09 Thread Marc Schwartz (via MN)
On Wed, 2006-08-09 at 18:07 +0200, Christian Oswald wrote: Dear List, I neeed a grouped list with two sort of categorical data. I have a data .frame like this. yearcat.b c 1 2006a1 125 212 2 2006a2 256 212 3 2005a1 14

[R] Weighted Mean Confidence Interval

2006-08-09 Thread McGehee, Robert
Hello, I'm looking to calculate a 95% confidence interval about my estimate for a sample's weighted mean, where the calculated confidence interval would equal the t-test confidence interval of the sample in the case when all of the weights are equal. My initial thought was to simply implement a

[R] Plot with Julian dates.

2006-08-09 Thread C. Park
Dear Sir/Madam: I simply want to draw x-y plot with Julian dates (x) and numbers (y). Please see below for my program. In the older version of R, the plot(jdat, miles) worked without any problem. But, with the new version of R, plot(jdat, miles) does not work any more. So, I added log= option

[R] Linear Trend in Residiuals From lme

2006-08-09 Thread Rick Bilonick
I'm fitting a mixed effects model: fit.1 - lme(y~x,random=~1|id,data=df) There are two different observations for each id for both x and y. When I use plot(fit.1), there is a strong increasing linear trend in the residuals versus the fitted values (with no outliers). This also happens if I use

Re: [R] R2HTML: request for an extended example

2006-08-09 Thread Tobias Verbeke
Michael Kubovy wrote: On Aug 9, 2006, at 9:23 AM, Tobias Verbeke wrote: Michael Kubovy wrote: Dear R-helpers, If you know of an extended example of the use of R2HTML, in which the various constructs are present in one place, could you please point me to it or send it to me? There was

Re: [R] Linear Trend in Residiuals From lme

2006-08-09 Thread Douglas Bates
On 8/9/06, Rick Bilonick [EMAIL PROTECTED] wrote: I'm fitting a mixed effects model: fit.1 - lme(y~x,random=~1|id,data=df) There are two different observations for each id for both x and y. When I use plot(fit.1), there is a strong increasing linear trend in the residuals versus the fitted

[R] optim error

2006-08-09 Thread Frank Black
Dear all, There have been one or two questions posted to the list regarding the optim error non-finite finite-difference value [4]. The error apparently means that the 4th element of the gradient is non-finite. My question is what part(s) of my program should I fiddle with in an attempt to

Re: [R] Linear Trend in Residiuals From lme

2006-08-09 Thread Rick Bilonick
On Wed, 2006-08-09 at 15:04 -0500, Douglas Bates wrote: On 8/9/06, Rick Bilonick [EMAIL PROTECTED] wrote: I'm fitting a mixed effects model: fit.1 - lme(y~x,random=~1|id,data=df) There are two different observations for each id for both x and y. When I use plot(fit.1), there is a

Re: [R] Speeding indexing and sub-sectioning of 3d array

2006-08-09 Thread Patrick Burns
First off, I hope that the function you list is just an example since it only returns what the last iteration does -- obviously the same answer can be arrived at much quicker. The main principal in speeding up loops is to do as little inside the loops as possible. 'fjj1' is essentially the same

Re: [R] Linear Trend in Residiuals From lme

2006-08-09 Thread Rick Bilonick
On Wed, 2006-08-09 at 15:04 -0500, Douglas Bates wrote: On 8/9/06, Rick Bilonick [EMAIL PROTECTED] wrote: I'm fitting a mixed effects model: fit.1 - lme(y~x,random=~1|id,data=df) There are two different observations for each id for both x and y. When I use plot(fit.1), there is a

Re: [R] R CMD check and RUnit

2006-08-09 Thread Gorjanc Gregor
I have created page [1] in R Wiki on this topic. http://wiki.r-project.org/rwiki/doku.php?id=developers:runit Seth, I have also managed to tweak doRUnit.R so that R CMD check gives an error if the tests fail. I will leave windows port for someone else ;) Gorjanc Gregor [EMAIL PROTECTED]

Re: [R] tk combobox question

2006-08-09 Thread JeeBee
I think you want something like this: require(tcltk) || stop(Package tcltk is not available.) version.BWidget - tclvalue(tclRequire(BWidget)) modify_command - function() { print(Hey, I'm modified...) } tt - tktoplevel() values = c(foo, bar, jeebee) combo - tkwidget(tt,

Re: [R] Linear Trend in Residiuals From lme

2006-08-09 Thread Douglas Bates
On 8/9/06, Rick Bilonick [EMAIL PROTECTED] wrote: On Wed, 2006-08-09 at 15:04 -0500, Douglas Bates wrote: On 8/9/06, Rick Bilonick [EMAIL PROTECTED] wrote: I'm fitting a mixed effects model: fit.1 - lme(y~x,random=~1|id,data=df) There are two different observations for each id

Re: [R] How to draw the decision boundaries for LDA and Rpart object

2006-08-09 Thread Am Stat
Dr. Ripley, Thanks very much for your help. I have used your partition tree and it works well. I am not familiar with the 'tree' package but I found that the threshold to make a cut returned by tree and rpart is almost the same value. Does that mean the decision boundaries for Rpart and

Re: [R] parameter yaxs / function hist (graphics)

2006-08-09 Thread Paulo Barata
Mr. Schwartz, Thank you very much for the proper solution. Regards, Paulo Barata (Rio de Janeiro, Brasil) Marc Schwartz (via MN) wrote: Paulo, Try the following: x - rnorm(100) par(xaxs = i) par(yaxs = i) hist(x,

Re: [R] Constrain coefs. in linear model to sum to 0

2006-08-09 Thread Gregor Gorjanc
Hello, [EMAIL PROTECTED] wrote: Gorjanc Gregor asks: Hello! I would like to use constrain to sum coeficients of a factor to 0 instead of classical corner contraint i.e. I would like to fit a model like lm(y ~ 1 + effectA + effectB) and say get parameters intercept effectA_1

Re: [R] minimization a quadratic form with some coef fixed and some constrained

2006-08-09 Thread Yingfu Xie
Hello, Thanks for reply! But I think that solution is right without the constrain b'b=1. With this constrain, the solution is not so simple. :( Regards, Yingfu Från: Rolf Turner [mailto:[EMAIL PROTECTED] Skickat: on 2006-08-09 18:08 Till: Yingfu Xie;

[R] decimal accuracy in pnorm( )

2006-08-09 Thread Chronopoulos Dimitris
Dear R users Is there any way to increase the decimal accuracy for the normal probability distribution? When one needs an accurate p-value for instance this is provided by pnorm(10,lower.tail=F) [1] 7.619853e-24 However, what happens when instead of a P[Xx], a more accurate P[X=x] is the

Re: [R] How to draw the decision boundaries for LDA and Rpart object

2006-08-09 Thread hadley wickham
Could you please tell me how to draw the decision boundaries in a scatterplot of the original data for a LDA or Rpart object. For example: library(rpart) fit.rpart - rpart(as.factor(group.id)~., data=data.frame(Data) ) You might want to have a look a classifly

[R] Is there a better way than x[1:length(x)-1] ?

2006-08-09 Thread John McHenry
Hi WizaRds, In MATLAB you can do x=1:10 and then specify x(2:end) to get 2 3 4 5 6 7 8 9 10 or whatever (note that in MATLAB the parenthetic index notation is used, not brackets as in R). The point is that 'end' allows you to refer to the final index point of the array. Obviously there

[R] graphic output file format

2006-08-09 Thread Conan Phelan
I would like to save graphics I produce in jpeg or gif formats. The GDD package sounds like it should let me to do this, but I cannot get it to install (error: Can't find gd.h!). Anyone know what's up? Thnx, C __ R-help@stat.math.ethz.ch mailing list

[R] how to link matrix with the variables

2006-08-09 Thread zhijie zhang
Dear friends, Suppose the correlation matrix of x1-x3 is as follows: x1 x2 x3 x1 1 x2 0.51 x3 0.6 0.41 1.First, to generate the matrix of x1-x3 in R; 2.to get the random number: x1-rnorm(10), is it enough to generate only the x1-values? Do i need to generate x2 and x3?

[R] Capabilities and JGR

2006-08-09 Thread Michael Kubovy
Dear R-helpers, Using the Mac OS X GUI, capabilities() jpeg pngtcltk X11 http/ftp sockets libxml fifo clediticonv NLS TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE Under JGR capabilities()

Re: [R] minimization a quadratic form with some coef fixed and some constrained

2006-08-09 Thread Berwin A Turlach
YX == Yingfu Xie [EMAIL PROTECTED] writes: YX Thanks for reply! But I think that solution is right without YX the constrain b'b=1. With this constrain, the solution is not YX so simple. :( But simple enough. :) Write down the Lagrange function for the problem. Say, 'lam' is the

[R] Your email requires verification verify#QTaQ31oVh73RQhN8fgCXtoSQaCqGXMTf

2006-08-09 Thread verify
The message you sent requires that you verify that you are a real live human being and not a spam source. To complete this verification, simply reply to this message and leave the subject line intact. The headers of the message sent from your address are show below: From

[R] index.cond in xyplot

2006-08-09 Thread Taka Matzmoto
Dear R-users I have 5 dependent variables (y1 to y5) and one independent variable (x) and 3 conditioning variables (m, n, and 0). Each of the conditioning variables has 2 levels. I created 2*4 panel plots. xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2)) I would like to reorder the 8

Re: [R] index.cond in xyplot

2006-08-09 Thread Gabor Grothendieck
That's not a valid specification. See the description of the index.cond argument in ?xyplot and in particular this part: If 'index.cond' is a list, it has to be as long as the number of conditioning variables, and the 'i'-th component has to be a valid

[R] R2HTML incomplete echo

2006-08-09 Thread Michael Kubovy
Dear R-helpers, When I run HTMLStart(outdir = outDir, echo = TRUE, HTMLframe = TRUE, + filename = 'jdHW1', Title = 'John Doe HW 2') *** Output redirected to directory: /Users/mk/Documents/teach/ 2006.3.PSYC712 *** Use HTMLStop() to end redirection.[1] TRUE HTML as.title(This is my first

Re: [R] index.cond in xyplot

2006-08-09 Thread Deepayan Sarkar
On 8/9/06, Taka Matzmoto [EMAIL PROTECTED] wrote: Dear R-users I have 5 dependent variables (y1 to y5) and one independent variable (x) and 3 conditioning variables (m, n, and 0). Each of the conditioning variables has 2 levels. I created 2*4 panel plots. xyplot(y1+y2+y3+y4+y5 ~ x |

[R] OT UNIX grep question

2006-08-09 Thread Erin Hodgess
Dear R People: I want to use the grep command in UNIX/Linux to check some words from the dictionary. Let's say I use: grep dog /usr/share/dict/words and I get back bulldog dog dogged and so on. How could I just get back dog with the grep command please? Thanks, Sincerely Erin Hodgess

  1   2   >