[R] possible bug in ape::extract.clade()

2010-07-19 Thread Dylan Beaudette
sometimes... i.e. when I use a different seed for the random matrix 'x', the results are correct in some cases. Any ideas? Thanks for the very useful 'ape' package! Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California

Re: [R] Dampening the spline interpolation for contours

2010-09-13 Thread Dylan Beaudette
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Dylan Beaudette Soil Resource Laboratory http

[R] parallel computation with plyr 1.2.1

2010-09-16 Thread Dylan Beaudette
)) } mean(m) } system.time(ddply(d, .(id), .fun=f, .parallel=FALSE)) # user system elapsed # 2.740 0.016 2.766 system.time(ddply(d, .(id), .fun=f, .parallel=TRUE)) # user system elapsed # 2.720 0.000 2.726 -- Dylan Beaudette Soil Resource Laboratory http

Re: [R] parallel computation with plyr 1.2.1

2010-09-16 Thread Dylan Beaudette
On Thursday 16 September 2010, David Winsemius wrote: On Sep 16, 2010, at 1:11 PM, Dylan Beaudette wrote: Hi, I have been trying to use the new .parallel argument with the most recent version of plyr [1] to speed up some tasks. I can run the example in the NEWS file [1

Re: [R] Clustering for Ordinal data

2009-10-15 Thread Dylan Beaudette
values. I would like to cluster such that similar samples appear together. thanks! Hi, See the 'cluster' package. You will need to select a distance metric that can deal with factors. The 'Gower' metric is one that is commonly used. Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory

[R] interpretation of RCS 'coefs' and 'knots'

2009-10-23 Thread Dylan Beaudette
? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] interpretation of RCS 'coefs' and 'knots'

2009-10-23 Thread Dylan Beaudette
On Friday 23 October 2009, Frank E Harrell Jr wrote: Dylan Beaudette wrote: Hi, I have fit a series of ols() models, by group, in this manner: l - ols(y ~ rcs(x, 4)) ... where the series of 'x' values in each group is the same, however knots are not always identical between groups

[R] Cbind() on the right-side of a formula in xYplot()

2009-10-26 Thread Dylan Beaudette
? If it is not possible, then I will try and manually make the figure with basic lattice functions. Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r

Re: [R] Cbind() on the right-side of a formula in xYplot()

2009-10-27 Thread Dylan Beaudette
On Monday 26 October 2009, Frank E Harrell Jr wrote: Dylan Beaudette wrote: Hi, Using the latest rms package I am able to make nice plots of model predictions +/- desired confidence intervals like this: # need this library(rms) # setup data d - data.frame(x=rnorm(100), y=rnorm

Re: [R] help me avoid nested for() loops!

2009-11-20 Thread Dylan Beaudette
commented, minimal, self-contained, reproducible code. -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Mysterious R script behavior when called from webserver

2009-11-25 Thread Dylan Beaudette
suggests that R is encountering an error, and stopping. However there is no reporting of the error. Is there any way to get more verbose error reporting? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis

Re: [R] Mysterious R script behavior when called from webserver

2009-11-25 Thread Dylan Beaudette
On Wednesday 25 November 2009, Barry Rowlingson wrote: On Wed, Nov 25, 2009 at 8:15 PM, Dylan Beaudette debeaude...@ucdavis.edu wrote: Hi, I am trying to transition a system based on dynamic image generation (via R) from our development system to a production environment. Our R script

Re: [R] How to not to terminate read.table if the input file is empty?

2010-01-01 Thread Dylan Beaudette
?try On Fri, Jan 1, 2010 at 12:41 PM, Peng Yu pengyu...@gmail.com wrote: read.table terminates the program if the input file is empty. Is there way to let the program continue and return me a NULL instead of terminating the program? $ Rscript read_empty.R read.table(empty_data.txt) Error

[R] latex.rms and models fit with GLS

2010-05-28 Thread Dylan Beaudette
for inclusion within a LATEX document. Thanks! -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] latex.rms and models fit with Gls

2010-05-28 Thread Dylan Beaudette
On Friday 28 May 2010, Frank E Harrell Jr wrote: On 05/28/2010 03:49 PM, Dylan Beaudette wrote: Hi, I have fit a model using the rms package with the Gls() function. Is there a way to get the model estimates, std errors, and p-values (i.e. what you get with print(fit)) into latex

Re: [R] Combining several plots besides a dendrogram?

2010-07-02 Thread Dylan Beaudette
Hi, The 'aqp' package originally used the subplot function to add images to to a dendrogram plot. I have since changed to use base graphics primitives, as the results tend to scale better. I avoided the use of 'layout' because sometimes it is convenient to add further embellishments that

Re: [R] add spline to longitudinal data - preferably similar to SAS's 'I=SM50S' routine

2010-01-18 Thread Dylan Beaudette
On Mon, Jan 18, 2010 at 3:25 PM, Eric Fail e...@it.dk wrote: Hi Ruser I'm trying to replicate some SAS code. I have to add a spline to my longitudinal spaghetti plot. I have the plot, but I can't add the spline, a overall trend line. In the SAS code they use the command   'I=SM50S' and I

[R] ANCOVA with measurement error in x and y

2010-01-26 Thread Dylan Beaudette
-- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Using auto.key with two variable plots

2010-01-30 Thread Dylan Beaudette
On Sat, Jan 30, 2010 at 12:45 PM, Jonathan Greenberg greenb...@ucdavis.edu wrote: Rhelpers:   Having a problem solving this.  I have an xyplot call that looks like this:

[R] strangeness in Predict() {rms}

2010-02-16 Thread Dylan Beaudette
(and not attached): [1] cluster_1.12.0 Any ideas? Thanks! Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] do not plot polygon boundaries with spplot {sp}

2007-10-08 Thread Dylan Beaudette
)) ... seems to work well. However the polygon boundaries are colored black. If possible I would like the boundaries to not be drawn at all. any tips? cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

[R] logistic regression model specification

2007-11-13 Thread Dylan Beaudette
guidance would be greatly appreciated. Cheers, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] logistic regression model specification

2007-11-13 Thread Dylan Beaudette
On Tuesday 13 November 2007, Prof Brian Ripley wrote: On Tue, 13 Nov 2007, Dylan Beaudette wrote: Hi, I have setup a simple logistic regression model with the glm() function, with the follow formula: y ~ a + b where: 'a' is a continuous variable stratified by the levels of 'b

Re: [R] logistic regression model specification

2007-11-13 Thread Dylan Beaudette
On Tuesday 13 November 2007, Peter Dalgaard wrote: Prof Brian Ripley wrote: On Tue, 13 Nov 2007, Dylan Beaudette wrote: Hi, I have setup a simple logistic regression model with the glm() function, with the follow formula: y ~ a + b where: 'a' is a continuous variable

Re: [R] logistic regression model specification

2007-11-14 Thread Dylan Beaudette
On Nov 14, 2007 5:17 AM, Peter Dalgaard [EMAIL PROTECTED] wrote: Dylan Beaudette wrote: On Tuesday 13 November 2007, Peter Dalgaard wrote: Prof Brian Ripley wrote: On Tue, 13 Nov 2007, Dylan Beaudette wrote: Hi, I have setup a simple logistic regression model with the glm

Re: [R] logistic regression model specification

2007-11-14 Thread Dylan Beaudette
... Thanks for taking the time to reply. I would rather be embarrassed now than later! Dylan Beaudette a écrit : On Tuesday 13 November 2007, Prof Brian Ripley wrote: On Tue, 13 Nov 2007, Dylan Beaudette wrote: Hi, I have setup a simple logistic regression model with the glm() function

Re: [R] geotiff calculations

2007-11-14 Thread Dylan Beaudette
-guide.html and provide commented, minimal, self-contained, reproducible code. -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https

[R] model parameters: independent enough?

2008-01-30 Thread Dylan Beaudette
, a single fraction rarely dominates the others. would range of cor(sand, clay) give me reason to through out one of them as a predictor in a linear model? thanks in advance, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis

Re: [R] Point pattern - Surface pattern statistical link

2008-02-08 Thread Dylan Beaudette
Nelson install.package('spatstat', dep=TRUE) -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] use of poly()

2008-02-13 Thread Dylan Beaudette
2.0617970 2.7393995 When using continuous data in both Y and X, does the difference between raw and orthagonal polynomials have any practical meaning? Thanks, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis

Re: [R] use of poly()

2008-02-13 Thread Dylan Beaudette
7700 mailto:[EMAIL PROTECTED] http://www.cmis.csiro.au/bill.venables/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dylan Beaudette Sent: Thursday, 14 February 2008 6:42 AM To: r-help@r-project.org Subject: [R] use of poly() Hi, I am curious

[R] testing for significantly different slopes

2008-03-05 Thread Dylan Beaudette
. It seems like this approach would yield insight into whether or not the two slope terms (InsulBefore:Gas and InsulAfter:Gas) were different. However, is there a formal test for this sort of question, and can it be generalized to differences between more than 2 slope terms? Thanks, Dylan -- Dylan

Re: [R] testing for significantly different slopes

2008-03-05 Thread Dylan Beaudette
/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dylan Beaudette Sent: Thursday, 6 March 2008 9:28 AM To: r-help@r-project.org Subject: [R] testing for significantly different slopes Hi, How would one go about determining if the slope terms from

Re: [R] Shapiro.test on data frame

2009-06-22 Thread Dylan Beaudette
guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. are you looking to perform this column-wise or row-wise? see ?apply for ideas cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu

[R] odd behaviour in quantreg::rq

2009-06-30 Thread Dylan Beaudette
(sand ~ method, data=x, tau=0.5, method='fn'), se='ker') -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] hierarchical clustering - variable selection

2009-06-30 Thread Dylan Beaudette
varclust() in the Hmisc package might be what you are looking for. Dylan On Tue, Jun 30, 2009 at 7:27 PM, alexander.h...@csiro.au wrote: Hi List, I am looking for a procedure that allows selection of variables in a clustering attempt. Specifically I am searching for a way of selecting

Re: [R] odd behaviour in quantreg::rq

2009-07-01 Thread Dylan Beaudette
Urbana, IL 61801 On Jun 30, 2009, at 3:54 PM, Dylan Beaudette wrote: Hi, I am trying to use quantile regression to perform weighted- comparisons of the median across groups. This works most of the time, however I am seeing some odd output in summary(rq()): Call: rq

Re: [R] odd behaviour in quantreg::rq

2009-07-01 Thread Dylan Beaudette
Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 217-244-6678Urbana, IL 61801 On Jul 1, 2009, at 2:48 PM, Dylan Beaudette wrote: Thanks Roger. Your comments were very helpful

Re: [R] odd behaviour in quantreg::rq

2009-07-01 Thread Dylan Beaudette
, 2009, at 4:52 PM, Dylan Beaudette wrote: On Wednesday 01 July 2009, roger koenker wrote: It's not clear to me whether you are looking for an exploratory tool or something more like formal inference. For the former, it seems that estimating a few weighted quantiles would be quite useful

Re: [R] Multi-line plots - max Y?

2009-07-03 Thread Dylan Beaudette
Hi, how about something like this: a - 1:10 b - cumsum(a) c - cumsum(b) d - cumsum(c) X- data.frame(a,b,c,d) plot(b ~ a, data=X, type=l, col=blue, ylim=c(0,max(X))) lines(c ~ a, data=X, col=green) lines(d ~ a, data=X, col=red) legend('topleft', legend=c('a', 'b', 'c'), col=c('blue', 'green',

Re: [R] Stratified data summaries

2009-07-09 Thread Dylan Beaudette
. -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] R: LIDAR Problem in R (THANKS for HELP)

2008-08-05 Thread Dylan Beaudette
literature on these techniques and LiDAR. None of these approaches are going to be feasible in R, when the input dataset is much larger than the available RAM. Cheers, Dylan -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Per conto di Dylan Beaudette Inviato

Re: [R] converting coordinates from utm to longitude / latitude

2008-08-19 Thread Dylan Beaudette
-guide.html and provide commented, minimal, self-contained, reproducible code. -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https

Re: [R] Looping over groups

2008-08-20 Thread Dylan Beaudette
On Wed, Aug 20, 2008 at 7:48 AM, Josh B [EMAIL PROTECTED] wrote: Hello, My R skills are somewhere between novice and intermediary, and I am hoping that some of you very helpful forum members, whom I've seen work your magic on other peoples' problems/questions, can help me here. I have a

Re: [R] Looping over groups

2008-08-20 Thread Dylan Beaudette
2008/8/20 Josh B [EMAIL PROTECTED]: Here is my underlying data file. Of course, please don't feel obliged to spend any more time on this! - Original Message From: Dylan Beaudette [EMAIL PROTECTED] To: Josh B [EMAIL PROTECTED] Cc: r-help@r-project.org Sent: Wednesday, August 20

Re: [R] Looping over groups

2008-08-20 Thread Dylan Beaudette
) { # get level of 'gen' from list element # make a filename, see ?paste # write out a file for each write.table(element_i, file=filename, row.names=FALSE, ...) } ) -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] Calculating total observations based on combinations of variable values

2008-08-27 Thread Dylan Beaudette
help in this matter, Josip ?table ?xtabs -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] r function for calculating extreme spread in group

2008-08-27 Thread Dylan Beaudette
, '[') AB 8.686382 4.578703 Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] drop.unused.levels for two factors {lattice}

2008-08-28 Thread Dylan Beaudette
], each=4), f1=rep(letters[1:2], each=10), f2=rep(letters[10:19], each=2) ) # plot it: dotplot(x.class ~ x | f1 + f2, data=d, scales=list(relation='free')) Thanks, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis

Re: [R] drop.unused.levels for two factors {lattice}

2008-08-28 Thread Dylan Beaudette
On Thursday 28 August 2008, Deepayan Sarkar wrote: On Thu, Aug 28, 2008 at 1:21 PM, Dylan Beaudette [EMAIL PROTECTED] wrote: Hi, Is there any way to suppress plotting of panels that don't actually contain any information? I have tried using 'drop.unused.levels=TRUE', but there doesn't

Re: [R] model II regression - how do I do it?

2008-08-29 Thread Dylan Beaudette
II regression? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] model II regression - how do I do it?

2008-08-29 Thread Dylan Beaudette
happen again): http://tolstoy.newcastle.edu.au/R/help/05/06/5992.html Cheers, Dylan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dylan Beaudette Sent: Friday, August 29, 2008 1:44 PM To: r-help@r-project.org Cc: Mark Difford Subject: Re: [R

Re: [R] Averaging 'blocks' of data

2008-09-07 Thread Dylan Beaudette
On Sun, Sep 7, 2008 at 12:32 PM, Steve Murray [EMAIL PROTECTED] wrote: Dear all, I have a large dataset which I hope to reduce in size, to make it more useable. I hope to do this by taking an average of each 60 x 60 blockof values and forming a new data frame out of the averaged values.

[R] piper diagram

2008-06-09 Thread Dylan Beaudette
sure about the final layout, or a nice generalized version for something like lattice. Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r

Re: [R] piper diagram

2008-06-11 Thread Dylan Beaudette
On Wednesday 11 June 2008, Jim Lemon wrote: Jim Lemon wrote: Dylan Beaudette wrote: Hi, Is anyone on the list familiar with an R implementation of Piper Diagrams? Example: http://faculty.uml.edu/nelson_eby/89.315/IMAGES/Figure%209-78.jpg I am thinking that two calls

Re: [R] rbinom for a matrix

2008-07-09 Thread Dylan Beaudette
to convert each probability into the most likely '1' or '0' through rounding? The code example above will give you a different answer every time you run it. Is that what you are looking for? Just curious, Dylan -- Dylan Beaudette Soil Resource Laboratory http

Re: [R] rbinom for a matrix

2008-07-09 Thread Dylan Beaudette
On Wednesday 09 July 2008, Ben Bolker wrote: Dylan Beaudette wrote: | On Wednesday 09 July 2008, Ben Bolker wrote: | ACroske Audy3272 at yahoo.com writes: | I have a large matrix full of probabilities; I would like to convert each | probability to a 1 or a 0 using rbinom. | How can I do

Re: [R] Grid building in R

2008-07-09 Thread Dylan Beaudette
as long it is to scale. Thanks how about: # 40cm spacing spacings - 0:13*40 # a square grid with 196 points # sqrt(181) is not an integer, sorry! g - expand.grid(x=spacings, y=spacings) # check it out plot(g, pch=3, cex=0.5) -- Dylan Beaudette Soil Resource Laboratory http

[R] meaning of tests presented in anova(ols(...)) {Design package}

2008-07-14 Thread Dylan Beaudette
Hi, I am curious about how to interpret the table produced by anova(ols(...)), from the Design package. I have a multiple linear regression model, with some interaction, defined by: ols(formula = log(ksat * 60 * 60) ~ log(sar) * pol(activity, 3) + log(conc) * pol(sand, 3), data = sm.clean, x

Re: [R] R: gstat problem with lidar data

2008-07-16 Thread Dylan Beaudette
implications of randomly sampling a point cloud for variogram analysis-- someone smarter than I may be helpful. Cheers, Dylan -Messaggio originale- Da: Dylan Beaudette [mailto:[EMAIL PROTECTED] Inviato: mercoledì 16 luglio 2008 12.45 A: r-help@r-project.org Cc: Alessandro Oggetto: Re

[R] alternate usage of soil.texture (plotrix)

2008-07-21 Thread Dylan Beaudette
Hi, I have used the soil.texture() function from the plotrix package many times and am very pleased that such a function exists in R. I have a slightly different need this time, and need some pointers on how to accomplish it. Instead of plotting single symbols on the triangle, I would like to

Re: [R] Re creating Procrustes Plot in Lattice

2008-07-30 Thread Dylan Beaudette
and rotation components to your panel function. This is the bit I'm not clear on but look at ordixyplot and panel.ordi for inspiration. Here is a relatively simple demonstration of creating a custom panel function: http://casoilresource.lawr.ucdavis.edu/drupal/node/630 Cheers, Dylan -- Dylan

Re: [R] Equivalent to a BY command in SAS

2008-04-13 Thread Dylan Beaudette
On Sun, Apr 13, 2008 at 7:36 PM, zerfetzen [EMAIL PROTECTED] wrote: Hi, I'm very new to R and absolutely love it. Does anyone know how to use something in R that functions like a BY command in SAS? For example, let's say you have a variable x, and you want to see the mean. Easy...

Re: [R] rpart with circular data?

2008-05-12 Thread Dylan Beaudette
On Mon, May 12, 2008 at 6:29 AM, Bálint Czúcz [EMAIL PROTECTED] wrote: Hi Rainer, In a similar situation I used the two components of the normal vector of the surface (northing easting). I.e. for a horizontal plane both are 0, for a vertical slope facing south northing=-1and easting=0, etc.

[R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
noisy signals? Would I first have to fit a smooth function in order to solve this analytically? Thanks in advance, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
On Wednesday 04 June 2008, Dylan Beaudette wrote: Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data

[R] estimate phase shift between two signals

2008-06-04 Thread Dylan Beaudette
noisy signals? Would I first have to fit a smooth function in order to solve this analytically? Thanks in advance, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] How to do Naive Bayes in R?

2009-05-06 Thread Dylan Beaudette
], iris[,5]) table(predict(m, iris[,1:4]), iris[,5]) Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] How to do Naive Bayes in R?

2009-05-07 Thread Dylan Beaudette
On Wednesday 06 May 2009, spencerg wrote: help.search('bayes') only searches installed packages. To go beyond that, you might try the following: Thanks for the clarification. Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University

[R] validity of means comparison: unbalanced + weights

2009-05-29 Thread Dylan Beaudette
=c('red','green','blue')) # comparison of means (without weights): # effects are equal to treatment means summary(lm(values ~ treatment, data=d)) # comparison with means # effects are equal to treatment weighted-means summary(lm(values ~ treatment, data=d, weights=wts)) Thanks, Dylan -- Dylan

[R] RPostgreSQL segfault with LEFT JOIN

2009-06-04 Thread Dylan Beaudette
-- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] RPostgreSQL segfault with LEFT JOIN

2009-06-04 Thread Dylan Beaudette
On Thursday 04 June 2009, Dirk Eddelbuettel wrote: On 4 June 2009 at 16:17, Dylan Beaudette wrote: | Hi, | | I recently upgraded to R 2.9.0 on linux x86. After doing so, I switched | to the RPostgreSQL package for interfacing with a postgresql database. I | am using postgresql 8.3.7

[R] OT: a weighted rank-based, non-paired test statistic ?

2009-06-05 Thread Dylan Beaudette
Hi, Is anyone aware of a rank-based, non-paired test such as the Krustal-Wallis, that can accommodate weights? Alternatively, would it make sense to simulate a dataset by duplicating observations in proportion to their weight, and then using the Krustal-Wallis test? thanks! Dylan

Re: [R] OT: a weighted rank-based, non-paired test statistic ?

2009-06-05 Thread Dylan Beaudette
On Friday 05 June 2009, Thomas Lumley wrote: On Fri, 5 Jun 2009, Dylan Beaudette wrote: Is anyone aware of a rank-based, non-paired test such as the Krustal-Wallis, that can accommodate weights? You don't say what sort of weights, but basically, no. Whether you have precision weights

Re: [R] How do I construct a one matrix from another? (newbie)

2009-06-07 Thread Dylan Beaudette
Hi, some ideas: ?split ?by library(plyr) ?ddply Cheers, Dylan On Sun, Jun 7, 2009 at 10:26 AM, jonathanbriggsjonathanbri...@mac.com wrote: Apologies if this is an obvious question but I am teaching myself R and the occasional push in the right direction is much appreciated? I have a

Re: [R] Plotting two regression lines on one graph

2009-06-07 Thread Dylan Beaudette
One approach to this is generating a representative sequence of your x-variable(s) with seq() or expand.grid(). Next use the predict() function to make predictions from your glm object along the sequence. Finally, plot the predictions vs. the new sequence. Putting everything into a dataframe

Re: [R] RPostgreSQL segfault with LEFT JOIN

2009-06-08 Thread Dylan Beaudette
and authenticate fine to the https url using a browswer, it is just svn that croaks. Ideas ? Does this now need rpc or portmap back to me? ] Dirk | Neil | | On Jun 6, 2009, at 11:18 PM, Joe Conway wrote: | Dylan Beaudette wrote: | After some further investigation, I see that the query works fine

Re: [R] OT: a weighted rank-based, non-paired test statistic ?

2009-06-09 Thread Dylan Beaudette
statistic ? On Fri, 5 Jun 2009, Dylan Beaudette wrote: Is anyone aware of a rank-based, non-paired test such as the Krustal-Wallis, that can accommodate weights? You don't say what sort of weights, but basically, no. Whether you have precision weights or sampling weights, the test

Re: [R] Identifying clusters of size n

2009-06-14 Thread Dylan Beaudette
On Sun, Jun 14, 2009 at 4:39 PM, Nathan S. Watson-Haighnathan.watson-ha...@csiro.au wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a library which is capable of identifying distinct clusters of size n from a series of XY coordinates? Failing this, I'd like to be able to to

Re: [R] Identifying clusters of size n

2009-06-14 Thread Dylan Beaudette
On Sun, Jun 14, 2009 at 7:26 PM, Nathan S. Watson-Haighnathan.watson-ha...@csiro.au wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dylan Beaudette wrote: On Sun, Jun 14, 2009 at 4:39 PM, Nathan S. Watson-Haighnathan.watson-ha...@csiro.au wrote: -BEGIN PGP SIGNED MESSAGE- Hash

Re: [R] Confidence Bands in Polynomial Regression

2009-06-15 Thread Dylan Beaudette
On Mon, Jun 15, 2009 at 6:57 PM, Ben Amselbenam...@gmail.com wrote:  Hello R users, Given a linear (in the parameters) regression model where one predictor x interacts with time and time*time (ie, a quadratic effect of time t): y = b0 + b1(x) + b2(t) + b3(t^2) + b4(x*t) + b5(x*t^2) + e, I

Re: [R] regression with covariate

2009-06-18 Thread Dylan Beaudette
Hi, take a look at the following manual pages: ?lm ?longley In general, you would use Wilkinson-Rogers notation for linear models: y ~ x + z, etc. Some nice examples here: http://data.princeton.edu/R/linearmodels.html Cheers, Dylan On Thu, Jun 18, 2009 at 11:04 AM, Martin

Re: [R] Stratified random sampling?

2009-06-18 Thread Dylan Beaudette
V2 1 A a 0.1555472 3.196626 2 A b 4.9836106 5.559472 3 B c 100.0587593 101.723630 4 B d 150.7257066 149.865093 # might need some more work to convert that back into 'long format' for modeling... Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http

Re: [R] correlation between categorical data

2009-06-19 Thread Dylan Beaudette
Not an expert, but I would try some of the following: # tabulate joint frequencies ?table ?xtabs # plotting mosaicplot(Titanic, main = Survival on the Titanic, color = TRUE, shade=TRUE) # log-linear models check the library for more ideas. Cheers, Dylan On Fri, Jun 19, 2009 at 2:04 PM,

[R] add points to xyplot() from alternate data frame

2007-11-19 Thread Dylan Beaudette
? thanks -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Dylan Beaudette Soil

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: On 11/20/07, Dylan Beaudette [EMAIL PROTECTED] wrote: On Tuesday 20 November 2007, Deepayan Sarkar wrote: On Nov 20, 2007 11:14 AM, David Afshartous [EMAIL PROTECTED] wrote: All, I'm trying to make a basic plot: data points

Re: [R] Adding points on top of lines in xyplot

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: On 11/20/07, Dylan Beaudette [EMAIL PROTECTED] wrote: [...] Example: library(lattice) # generate some data: resp - rnorm(100) pred - resp*1.5 + rnorm(100) d - data.frame(resp=resp, pred=pred) # add a grouping factor: d$grp

Re: [R] Adding points on top of lines in xyplot [solved]

2007-11-20 Thread Dylan Beaudette
On Tuesday 20 November 2007, Deepayan Sarkar wrote: On 11/20/07, Dylan Beaudette [EMAIL PROTECTED] wrote: On Tuesday 20 November 2007, Deepayan Sarkar wrote: On 11/20/07, Dylan Beaudette [EMAIL PROTECTED] wrote: [...] Example: library(lattice) # generate some data

Re: [R] Plotting with R: setting the y axis

2007-11-26 Thread Dylan Beaudette
(nano_WoloshukRIB401488.jpg) plot( x , z , type=l , cols=red , main=nanodrop - #012345 , xlab=Wavelength(nm) , ylab=10mm Absorbance ) dev.off() see the arguments xlim and ylim in plot.default -- Dylan Beaudette Soil Resource Laboratory http

[R] plotting step functions in plot vs. xyplot

2007-12-02 Thread Dylan Beaudette
Hi, I have noticed an odd inconsistency when plotting a 'step' function (type='s') in xyplot() vs. plot(). For example, given the following data: ## generate some profile depths: 0 - 150, in 10 cm increments depth - seq(0,150, by=10) ## generate some property: random numbers in this case prop -

Re: [R] plotting step functions in plot vs. xyplot

2007-12-02 Thread Dylan Beaudette
On Sunday 02 December 2007 06:01:58 pm Deepayan Sarkar wrote: On 12/2/07, Dylan Beaudette [EMAIL PROTECTED] wrote: Hi, I have noticed an odd inconsistency when plotting a 'step' function (type='s') in xyplot() vs. plot(). For example, given the following data: ## generate some

Re: [R] how to interpolate a plot with a logistic curve

2007-12-05 Thread Dylan Beaudette
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25)), lty=3, col=red); how to interpolate the data with a logistic curve? I cannot find the - I suppose easy - solution.. thank you, Simone try: glm(formula, data, family=binomial()) require(Design) lrm() Cheers, -- Dylan Beaudette

Re: [R] matrix graph

2007-12-11 Thread Dylan Beaudette
,] 0.401 0.506 0.310 0.650 0.822 0.448 [4,] 0.548 0.625 0.883 0.825 0.945 0.637 [5,] 0.544 0.746 0.823 0.877 0.861 0.642 [6,] 0.262 0.399 0.432 0.620 0.711 0.404 will be very grateful for hints. rob ?image -- Dylan Beaudette Soil Resource Laboratory http

Re: [R] Different display of same graphs on different screens

2007-12-13 Thread Dylan Beaudette
position on a PC, but they don't appear at all when I run it on a MAC. I have R v 2.5.1 installed in both types of systems. I specify windows(height=10, width=10) at the beggining of the code. how are you specifying the size on the macs? quartz(height=10, width=10) ? -- Dylan

Re: [R] Calculating Rsquared values in rpart

2007-12-13 Thread Dylan Beaudette
partitioning seems to result in simple prediction models but this is mainly an illusion. Frank Harrell Hi Frank and others, hapen to have a link / citation for that paper? thanks! -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California

[R] odd error messages coming from val.prob() {Design}

2007-12-17 Thread Dylan Beaudette
? cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Question about which kind of plot to use

2007-12-19 Thread Dylan Beaudette
(gl(5,20, labels=c('A','B','C','D','E')), 4) bwplot(data ~ which | grp, data=new) Not quite means, but close! Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] side by side plots

2008-01-07 Thread Dylan Beaudette
in a script and I would like to have a single pdf/png file for the user with this plot, rather than asking the user to manually compare them. Any ideas on how I would do this? Thanks Paul have a look at ?par , specifically par(mfcol=c(...)) cheers, Dylan -- Dylan Beaudette Soil Resource

Re: [R] Any tools for working with US 2000 census data?

2008-01-17 Thread Dylan Beaudette
advice and suggestions for me. -Kevin Have a look at the PostGIS and GeoServer projects. I recall that there is an excellent tutorial on making sense of the TIGER data with PostGIS. Cheers, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University

  1   2   >