Re: [R] Question about ggplot2 and stat_smooth

2011-10-10 Thread Dylan Beaudette
Hi Tom, Just wanted to chime-in and let you know that the linked figures are really cool! Keep up the good work. On an un-related note, any talk of future GRASS training sessions? Cheers, Dylan On Tuesday, October 04, 2011, thomas.ad...@noaa.gov wrote: Hadley, Thanks for responding. No,

Re: [R] source() or OS X Lion?

2011-08-04 Thread Dylan Beaudette
Save the result of histogram(), then print() the saved object. On Aug 4, 2011 5:13 PM, Mark Ebbert mark.ebb...@hci.utah.edu wrote: Dear R Gurus, I'm seeing some strange behavior that I can't explain. I'm generating a figure for a paper and I like to save the script (no matter how simple) for

Re: [R] loops and simulation

2011-07-22 Thread Dylan Beaudette
On Wed, Jul 20, 2011 at 10:43 PM, David Winsemius dwinsem...@comcast.net wrote: On Jul 21, 2011, at 1:04 AM, Daniel Malter wrote: http://mlg.eng.cam.ac.uk/dave/rmbenchmark.php I haven't ever tried it myself, but online sources suggest that Matlab possibly gains speed by internally avoiding

Re: [R] Comparing two lines - Ancova: lm or aov?

2011-04-18 Thread Dylan Beaudette
Analysis of covariance comes to mind, and it looks like you have already setup your data for that type of analysis. I can't speak on issues related to the different number of samples (maybe a place for mixed modeling?), but from the results below (from lm) it looks like you can conclude that the

[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] 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] 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] 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

[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] Nonparametric generalization of ANOVA

2010-03-05 Thread Dylan Beaudette
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] 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

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] 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] 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

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] 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] 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

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

[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

[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

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

Re: [R] predict-fuction for metaMDS (vegan)

2009-09-09 Thread Dylan Beaudette
On Wed, Sep 9, 2009 at 5:43 AM, Kim Vanselowvanse...@gmx.de wrote: Dear r-Community, Step1: I would like to calculate a NMDS (package vegan, function metaMDS) with species data. Step2: Then I want to plot environmental variables over it, using function envfit. The Problem: One of these

Re: [R] Creating mixed line and point graphs with xyplot

2009-09-04 Thread Dylan Beaudette
Here is an example: http://casoilresource.lawr.ucdavis.edu/drupal/node/510 make.groups() is your friend. Cheers, Dylan On Fri, Sep 4, 2009 at 8:28 AM, Paul Sweetingm...@paulsweeting.co.uk wrote: Hi Well, I think the title says it all!  I've looked through the documentation but I can't

[R] clarificatin on validate.ols method='cross'

2009-08-30 Thread Dylan Beaudette
Hi, I was hoping to clarify the exact behavior associated with this incantation: validate(fit.ols, method='cross', B=50) Output: index.orig trainingtest optimism index.corrected n R-square 0.5612 0.5613 0.5171 0.0442 0.5170 50 MSE 1.3090 1.3086

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] 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] 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

[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] 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

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,

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] 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] 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] 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] 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] 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

[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

[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] 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

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

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] SUM,COUNT,AVG

2009-04-06 Thread Dylan Beaudette
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://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] read in large data file (tsv) with inline filter?

2009-03-23 Thread Dylan Beaudette
probably get them on windows without much effort. 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

Re: [R] data analysis. R

2009-03-21 Thread Dylan Beaudette
On Sat, Mar 21, 2009 at 5:13 PM, UBC cheong0...@hotmail.com wrote: so i am having this question what should i do if the give data file (.txt) has 4 columns, but different lengths? how can i read them in R? any idea for the following problem? Gas consumption (1000 cubic feet) was measured

Re: [R] popular R packages

2009-03-10 Thread Dylan Beaudette
' section of all the package's help files. Frank Absolutely. From the perspective of a user, not an expert, packages with a good vignette and lots of examples are by far my favorite and most used. Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University

Re: [R] Comparison of age categories using contrasts

2009-02-16 Thread Dylan Beaudette
On Mon, Feb 16, 2009 at 5:28 PM, Patrick Giraudoux patrick.giraud...@univ-fcomte.fr wrote: Greg Snow a écrit : One approach is to create your own contrasts matrix: mycmat - diag(8) mycmat[ row(mycmat) == col(mycmat) + 1 ] - -1 mycmati - solve(mycmat) contrasts(agefactor) - mycmati[,-1]

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Dylan Beaudette
. I haven't encountered the error before and *expected* screen to take care of connection problems... However I cannot confirm that it would work for your case... Sorry! Dylan Dylan Beaudette wrote: Try starting your R session after starting a 'screen' session. Like this: $ screen $ R

Re: [R] Tunnelling X for R graphics

2009-01-31 Thread Dylan Beaudette
Try starting your R session after starting a 'screen' session. Like this: $ screen $ R # do stuff, when taking a break do CTRL-A D to disconnect # use as normal See the man page for screen, it is basically a terminal multiplexer that can gracefully accommodate connection failures. If you get

Re: [R] Is there any function can be used to compare t wo probit models made from same data?

2009-01-23 Thread Dylan Beaudette
of the dependent variable? [...] m1se-summary(lm(disease ~ age, data=dsub))$sigma m2se-summary(lm(log(disease) ~ age, da=dsub))$sigma [...] or would the differences in scales render meaningless results? Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu

[R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Dylan Beaudette
? 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/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] lattice: reverse order of panel.lmline, panel.smooth

2009-01-23 Thread Dylan Beaudette
On Fri, Jan 23, 2009 at 4:45 PM, Deepayan Sarkar deepayan.sar...@gmail.com wrote: On Fri, Jan 23, 2009 at 3:00 PM, Dylan Beaudette debeaude...@ucdavis.edu wrote: Hi, is it possible to reverse the order in which panel.lmline() or panel.smooth() operation in xyplot() ? This type of situation

Re: [R] crash on multiple queries to postgresql db

2009-01-12 Thread Dylan Beaudette
On Friday 09 January 2009, Joe Conway wrote: Dylan Beaudette wrote: Subsequent calls to: conn - dbConnect(PgSQL(), host=localhost, dbname=xxx, user=xxx) query - dbSendQuery(conn, query_text) res - dbGetResult(query) are resulting in this: *** glibc detected *** /usr/local/lib/R

Re: [R] crash on multiple queries to postgresql db [solved]

2009-01-12 Thread Dylan Beaudette
Dylan Beaudette wrote: On Friday 09 January 2009, Joe Conway wrote: Dylan Beaudette wrote: Subsequent calls to: conn - dbConnect(PgSQL(), host=localhost, dbname=xxx, user=xxx) query - dbSendQuery(conn, query_text) res - dbGetResult(query) are resulting in this: *** glibc detected

[R] crash on multiple queries to postgresql db

2009-01-09 Thread Dylan Beaudette
attached packages: [1] RdbiPgSQL_1.8.0 Rdbi_1.8.0 lattice_0.17-20 Any ideas? -- 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] interpretation of conf.type in predict.Design {Design}

2008-12-31 Thread Dylan Beaudette
Hi, I am not quite sure how to interpret the differences in output when changing conf.type from the default mean to individual. Are these analogous to the differences between confidence and prediction intervals, as defined in predict.lm {stats} ? Thanks in advance. Dylan

Re: [R] exporting rast from R to GRASS

2008-12-09 Thread Dylan Beaudette
On Tue, Dec 9, 2008 at 6:03 PM, Thybério Luna Freire [EMAIL PROTECTED] wrote: Hi, everybody! i created a imagem by kriging using geoR package. I imported points from GRASS(zn, after converted to geodata zn_geo), the border zn_border and a raster mask. Then i interpolated the points by

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Dylan Beaudette
On Tue, Dec 2, 2008 at 7:42 PM, philozine [EMAIL PROTECTED] wrote: Dear all: This is one of those should be easy problems that I'm having great difficulty solving. I have a vector containing ID codes, and I need to generate a 3-column matrix that contains all possible combinations of three.

Re: [R] explaining a model with rcs() terms

2008-12-01 Thread Dylan Beaudette
On Sun, Nov 30, 2008 at 7:57 PM, David Winsemius [EMAIL PROTECTED] wrote: On Nov 30, 2008, at 10:23 PM, Dylan Beaudette wrote: Hi, I am using the rcs() function in the Design library to model non-linearity that is not well characterized by an otherwise mechanistic function. I am able to make

Re: [R] explaining a model with rcs() terms

2008-12-01 Thread Dylan Beaudette
On Mon, Dec 1, 2008 at 5:48 AM, Frank E Harrell Jr [EMAIL PROTECTED] wrote: David Winsemius wrote: On Nov 30, 2008, at 10:23 PM, Dylan Beaudette wrote: Hi, I am using the rcs() function in the Design library to model non-linearity that is not well characterized by an otherwise mechanistic

Re: [R] side by side boxplots

2008-11-28 Thread Dylan Beaudette
On Fri, Nov 28, 2008 at 10:55 AM, Phillip Porter [EMAIL PROTECTED] wrote: Good Morning, I am trying to get side by side boxplots of two groups on the same variable. The last item under ?boxplot led me to some useful code. I use boxwex to make the boxes narrower, at to shift them

[R] OT statistics question on TukeyHSD

2008-11-21 Thread Dylan Beaudette
? Any thoughts or references would be greatly appreciated. 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

Re: [R] PAM: how to get the best number of clusters

2008-10-30 Thread Dylan Beaudette
(your_data_matrix)) d.hc - as.hclust(d) d.hc$labels - your_data_matrix$id plot(d.hc) 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

Re: [R] PAM: how to get the best number of clusters

2008-10-30 Thread Dylan Beaudette
much, Maura On Thu, Oct 30, 2008 at 7:25 PM, Dylan Beaudette [EMAIL PROTECTED]wrote: On Thursday 30 October 2008, Maura E Monville wrote: I have a pretty big similarity matrix (2870x2870). I will produce even bigger ones soon. I am using PAM to generate clusters. The desired number

Re: [R] slightly OT: (un)supervised clustering?

2008-10-28 Thread Dylan Beaudette
into this matter. Good luck, Dylan Best wishes! Viktoras Didziulis P.S. just subscribed to this list, sorry if I'm missing something __ -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis

Re: [R] Using an image background with graphics

2008-10-13 Thread Dylan Beaudette
Laboratory [EMAIL PROTECTED] See spplot() and associated examples of how to use 'sp' class objects. Here is one worked exampled with sp objects: http://casoilresource.lawr.ucdavis.edu/drupal/node/442 -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread Dylan Beaudette
like this: require(Hmisc) bwplot(supp ~ len | factor(dose), data=ToothGrowth, layout=c(3,1), panel=panel.bpplot, datadensity=TRUE) -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

Re: [R] Plot means with error bars - A novice needs help

2008-10-08 Thread Dylan Beaudette
On Wednesday 08 October 2008, Manuel Morales wrote: On Wed, 2008-10-08 at 09:49 -0700, Dylan Beaudette wrote: On Wednesday 08 October 2008, Manuel Morales wrote: Another option is bargraph.CI or lineplot.CI from the package sciplot. See http://mutualism.williams.edu/sciplot

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.

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

[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] 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

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] 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] 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] 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

[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] 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] 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] 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

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

[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

  1   2   >