[R] Convert string to list?

2007-07-26 Thread Manuel Morales
Let's say I have the following string: str - P = 0.0, T = 0.0, Q = 0.0 I'd like to find a function that generates the following object from 'str'. list(P = 0.0, T = 0.0, Q = 0.0) Thanks! -- http://mutualism.williams.edu __ R-help@stat.math.ethz.ch

[R] Alternative to xyplot()?

2007-07-17 Thread Manuel Morales
Hello list, Is anyone aware of a non-lattice-based alternative to xyplot()? Thanks! Manuel -- http://mutualism.williams.edu __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Alternative to xyplot()?

2007-07-17 Thread Manuel Morales
On Tue, 2007-07-17 at 22:18 +0100, Gavin Simpson wrote: On Tue, 2007-07-17 at 16:39 -0400, Manuel Morales wrote: Hello list, Is anyone aware of a non-lattice-based alternative to xyplot()? x - rnorm(20) y - rnorm(20) plot(x, y) ? If you mean some specific aspect of xyplot(), you'll

Re: [R] degrees of freedom in lme

2007-06-25 Thread Manuel Morales
On Mon, 2007-06-25 at 13:15 -0400, Doran, Harold wrote: This is such a common question that it has a an FAQ-like response from Doug Bates. Google lmer p-values and all that to find the response. Isn't this a different question, though, since Jean-Baptiste is using nlme. Details on the

Re: [R] Problem adjusting x-labels with bargraphCI

2007-03-20 Thread Manuel Morales
On Tue, 2007-03-20 at 13:15 -0400, Vera, Pedro L. wrote: Hello: I'm having quite a bit of difficulty adjusting the x-labels using bargraphCI. I've tried using text and srt=45 to rotate the labels or mtext for 2 lines to break up the labels. However, using either method, I cannot line up

Re: [R] lme4/lmer: P-Values from mcmc samples or chi2-tests?

2007-02-14 Thread Manuel Morales
On Tue, 2007-02-13 at 14:45 +0100, Christoph Scherber wrote: Dear R users, I have now tried out several options of obtaining p-values for (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling and single-term deletions with subsequent chi-square tests (although I am

Re: [R] R vs Matlab {Re: R in Industry}

2007-02-08 Thread Manuel Morales
On Thu, 2007-02-08 at 16:53 +0100, Martin Maechler wrote: Albr == Albrecht, Dr Stefan (AZ Private Equity Partner) [EMAIL PROTECTED] on Thu, 8 Feb 2007 16:38:18 +0100 writes: snip Albr And, I was very astonished to realise, Matlab is very, very much faster Albr with simple

Re: [R] getting a new factor

2006-12-30 Thread Manuel Morales
On Sun, 2006-12-31 at 00:25 +0100, Ricardo Rodríguez wrote: Hi all, Given a data frame as... head(veg) genus species trophia type geo zone importance 1 Sphagnum subsecundum MA En100 2 Sphagnum denticulatum MA En200 3 Molinia

[R] Force square crosstabulation

2006-12-02 Thread Manuel Morales
Hello list members, I'm looking for a way to force the results of a crosstabulation to be square - that is, to include 0 values. For example: table(letters[1:4],letters[c(1:3,3)]) yields: a b c a 1 0 0 b 0 1 0 c 0 0 1 d 0 0 1 I would like to return: a b c d a 1 0 0 0 b 0 1

Re: [R] s.e. on interaction plots

2006-11-17 Thread Manuel Morales
On Fri, 2006-11-17 at 05:21 -0500, Chuck Cleland wrote: Murray Pung wrote: Is it possible to add standard error bars to the means on interaction plots? Not with interaction.plot(), as far as I know. You might consider the effects package by John Fox. For example: Another possibility is

[R] Announcement: sciplot (includes functions for graphs w/ error bars)

2006-11-10 Thread Manuel Morales
The package sciplot is now available for download from CRAN. This package includes a collection of functions that create graphs with error bars for data collected from one-way or higher factorial designs, as well as a function to plot bifurcation diagrams resulting from analysis with XPPAUTO. The

[R] Using data and subset arguments in user-defined functions

2006-10-27 Thread Manuel Morales
Dear list, A while ago, I posted a question asking how to use data or subset arguments in a user-defined function. Duncan Murdoch suggested the following solution in the context of a data argument: data - data.frame(a=c(1:10),b=c(1:10)) eg.fn - function(expr, data) { x -

Re: [R] Fwd: rarefy a matrix of counts

2006-10-11 Thread Manuel Morales
On Wed, 2006-10-11 at 14:25 -0400, Brian Frappier wrote: I tried all of the approaches below. the problem with: x - data.frame(matrix(NA,100,3)) for (i in 2:ncol(DF)) x[,i-1] - sample(rep(DF[,1], DF[,i]),100) if you want result in data frame or x-vector(list, 3) for (i in

Re: [R] Simulate p-value in lme4

2006-10-08 Thread Manuel Morales
On Sun, 2006-10-08 at 07:34 -0400, Michael Kubovy wrote: Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: preliminary require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family =

Re: [R] Conservative ANOVA tables in lmer

2006-09-13 Thread Manuel Morales
On Wed, 2006-09-13 at 08:04 +1000, Andrew Robinson wrote: On Tue, September 12, 2006 7:34 am, Manuel Morales wrote: On Mon, 2006-09-11 at 11:43 -0500, Douglas Bates wrote: Having made that offer I think I will now withdraw it. Peter's example has convinced me that this is the wrong thing

Re: [R] Conservative ANOVA tables in lmer

2006-09-11 Thread Manuel Morales
On Mon, 2006-09-11 at 11:43 -0500, Douglas Bates wrote: On 9/10/06, Andrew Robinson [EMAIL PROTECTED] wrote: On Thu, Sep 07, 2006 at 07:59:58AM -0500, Douglas Bates wrote: I would be happy to re-institute p-values for fixed effects in the summary and anova methods for lmer objects using

[R] ess-remote question

2006-08-23 Thread Manuel Morales
Dear list, Is there any way to load a local data file when connected to a remote machine via ESS? Thanks! Manuel __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Simulate p-value in lme4

2006-08-21 Thread Manuel Morales
. Spencer Graves Manuel Morales wrote: Dear list, This is more of a stats question than an R question per se. First, I realize there has been a lot of discussion about the problems with estimating P-values from F-ratios for mixed-effects models in lme4. Using mcmcsamp() seems like

[R] Simulate p-value in lme4

2006-08-17 Thread Manuel Morales
Dear list, This is more of a stats question than an R question per se. First, I realize there has been a lot of discussion about the problems with estimating P-values from F-ratios for mixed-effects models in lme4. Using mcmcsamp() seems like a great alternative for evaluating the significance of

Re: [R] Using data=x or subset=y in user-defined functions

2006-06-08 Thread Manuel Morales
), { ... }) } On Wed, 7 Jun 2006, Manuel Morales wrote: Dear list members, In some of my functions, I attach the data internally to allow subset commands or to specify a data frame. This works well except for cases where there is a masking conflict (which returns a warning). I see some alternative

Re: [R] Using data=x or subset=y in user-defined functions

2006-06-08 Thread Manuel Morales
On Thu, 2006-06-08 at 11:54 -0400, Manuel Morales wrote: On Wed, 2006-06-07 at 21:36 +0100, Prof Brian Ripley wrote: I suggest you investigate with(). Thanks for the suggestion! Unfortunately, it's not clear to me how to call with() from a function. The example below fails with the error

Re: [R] error bars in lattice xyplot *with groups*

2006-06-07 Thread Manuel Morales
Hi Mike, If you're not committed to using a panel function, another option is to use the function lineplot.CI, available in the package sciplot at http://mutualism.williams.edu/sciplot E.g. # Define and generate variables in long format range - vector() voice - vector() string -

[R] Using data=x or subset=y in user-defined functions

2006-06-07 Thread Manuel Morales
Dear list members, In some of my functions, I attach the data internally to allow subset commands or to specify a data frame. This works well except for cases where there is a masking conflict (which returns a warning). I see some alternative listed in ?attach, but I'm not sure which of them do

Re: [R] Making R talk to Win/OpenBUGS in Linux (again)

2006-05-01 Thread Manuel Morales
As far as I can figure out, the problem with running LinBUGS on FC5 is that support for linuxthreads was removed after being deprecated in FC4. http://fedora.redhat.com/docs/release-notes/fc5/#id2887615 As a result, the LD_ASSUME_KERNEL workaround, which presumably forced the use of linuxthreads

Re: [R] Multiple error bar plots

2006-03-24 Thread Manuel Morales
Hi Young-Jin, On Fri, 2006-03-24 at 10:42 -0500, Young-Jin Lee wrote: Dear R-lister I have a question about how to create multiple error bar plots. I found that I can use an errbar function from Hmisc package to create one error bar plot in which there are multiple data points (x, y) with

Re: [R] issue with plot (type=h)

2006-02-22 Thread Manuel Morales
Hi Gašper On Wed, 2006-02-22 at 14:12 +0100, Gasper Cankar wrote: Hello everyone. For reasons too long to explain I wanted to do plots similar to histograms with plot(type=h). I ran into a problem - if I set line width too high, histogram isn't accurate anymore. For example:

Re: [R] R xyplot and background color

2006-02-22 Thread Manuel Morales
On Tue, 2006-02-21 at 12:49 -0800, Bryan Sykes wrote: Hi: I have tried (unsuccessfully) to change the default background color for my xyplot. I have used trellis.device(bg = white, new = F) and par(bg=white) before my xyplot command. Yet the color of the background has not changed. Is

Re: [R] Nesting Functions

2006-01-27 Thread Manuel Morales
On Thu, 2006-01-26 at 21:55 -0500, Duncan Murdoch wrote: On 1/26/2006 9:45 PM, Manuel Morales wrote: Dear list members, I'm looking for a way to write nested functions similar to the function Nest or NestList in Mathematica. E.g., f-function(x) x+2*x f(f(f(2))) might

[R] Nesting Functions

2006-01-26 Thread Manuel Morales
Dear list members, I'm looking for a way to write nested functions similar to the function Nest or NestList in Mathematica. E.g., f-function(x) x+2*x f(f(f(2))) might instead be written as nest(f, 2, 3) read as, nest function f 3 times with 2 as the initial value. Thanks! Manuel

Re: [R] nls(): Levenberg-Marquardt, Gauss-Newton, plinear - PI curve fitting

2005-06-21 Thread Manuel Morales
On Tue, 2005-06-21 at 06:57 -0400, Gabor Grothendieck wrote: On 6/21/05, Christfried Kunath [EMAIL PROTECTED] wrote: Hello, i have a problem with the function nls(). This are my data in k: V1V2 [1,]0 0.367 [2,] 85 0.296 [3,] 122 0.260 [4,] 192 0.244

[R] Increasing Console Paste Buffer

2005-05-31 Thread Manuel Morales
Hello list. I'm using R from the gnome-terminal in Fedora. My preference is to write programs in VIM, and then source the file from R, or copy and paste the lines into the console. I'm wondering if there is a way to increase the paste buffer as an alternative to sourcing large analyses. As was

Re: [R] Iterative process for reading in text files

2005-04-29 Thread Manuel Morales
Hi Meredith, When I've wanted to do this, I put all my files (group1.txt, group2.txt ...) in a separate directory. Then, running R from that directory: files-list(files) for (i in 1:length(files)) { group-read.table(files[i],header=T) do stats here } On Fri, 2005-04-29 at 15:17 +1000, Briggs,

Re: [R] Problem with R-2.1.0: install.packages() doesn't work

2005-04-22 Thread Manuel Morales
On Fri, 2005-04-22 at 15:42 -0500, Marc Schwartz wrote: On Fri, 2005-04-22 at 15:44 -0400, Manuel Morales wrote: On Fri, 2005-04-22 at 17:48 +0200, Uwe Ligges wrote: Waichler, Scott R wrote: I installed R-2.1.0 from source on a Linux box running Red Hat Enterprise Linux WS

Re: [R] Problem with R-2.1.0: install.packages() doesn't work

2005-04-22 Thread Manuel Morales
On Fri, 2005-04-22 at 17:48 +0200, Uwe Ligges wrote: Waichler, Scott R wrote: I installed R-2.1.0 from source on a Linux box running Red Hat Enterprise Linux WS release 4 but install.packages() wouldn't work (see below). install.packages(rgenoud) --- Please select a CRAN mirror for

[R] nlsList vs nlme with lsoda function

2005-02-15 Thread Manuel Morales
Hello list members, I'm trying to get nlme to work with lsoda from odesolve. Currently, I can use nlsList to fit a simple logistic growth model to some simulated data, but I get the following error message with nlme: Error in model.frame(formula, rownames, variables, varnames, extras,

[R] augPred with lme(...,subset=...)

2004-11-30 Thread Manuel Morales
Hello, Is there a way to get augPred to work with lme if a subset statement is used? For example, if I modify the example from ?augPred.lme to include a subset statement, I get the following error: fm1 - lme(Orthodont, random = ~1, subset=distance19) augPred(fm1, length.out = 2, level = c(0,1))

[R] persp(), axis font size

2004-03-22 Thread Manuel Morales
Is there a way to adjust the font size for axis labels when using persp()? The parameter cex works for adjusting the global font size, but I can't seem to make cex.lab or cex.axis work for adjusting these values independently. Or, is there a preferred method for making surface plots in R?