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" 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 future reference. My prac

Re: [R] loops and simulation

2011-07-22 Thread Dylan Beaudette
On Wed, Jul 20, 2011 at 10:43 PM, David Winsemius 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 loops rather

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 tw

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

[R] parallel computation with plyr 1.2.1

2010-09-16 Thread Dylan Beaudette
ple(x$y, 100)) } 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 Lab

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 Bea

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

2010-07-19 Thread Dylan Beaudette
at this error is present only 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://casoilresou

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 transcen

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

[R] latex.rms and models fit with GLS

2010-05-28 Thread Dylan Beaudette
table in a text editor 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

Re: [R] Basic graphs: something like groups, but w here each plot has independent axis?

2010-03-25 Thread Dylan Beaudette
roject.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://casoilresource.l

Re: [R] Nonparametric generalization of ANOVA

2010-03-05 Thread Dylan Beaudette
> >>>>>> > statistical > >>>>>> > framework that parallels ANOVA. Could somebody give some hints > >>>>>> > on > >>>>>> > >>>>>> what > >>>>>> > >>>>>> > references I should look for? I have google searche

[R] strangeness in Predict() {rms}

2010-02-16 Thread Dylan Beaudette
Hmisc_3.7-0survival_2.35-6lattice_0.17-25 loaded via a namespace (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

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 wrote: > Rhelpers: > >   Having a problem solving this.  I have an xyplot call that looks like > this: > > > print(xyplot(temp_species_EAM_Pred_Pop$x+temp_species_NULL_Pred_Pop$x~temp_species_EAM_Pred_Pop$Action,main=current_species, >          

[R] ANCOVA with measurement error in x and y

2010-01-26 Thread Dylan Beaudette
ulations have different slopes, given the measurement errors? Thanks in advance, 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 l

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

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 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 in read.tab

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 > > wrote: > > Hi, > > > > I am trying to transition a system based on dynamic image generation (via > > R) from our development system to a production enviro

[R] Mysterious R script behavior when called from webserver

2009-11-25 Thread Dylan Beaudette
his behavior 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 Da

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

2009-11-20 Thread Dylan Beaudette
t; 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://cas

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(

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

2009-10-26 Thread Dylan Beaudette
data=l.pred, type='l', lty=c(1,2,2), col=1) Any suggestions? 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 a

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 i

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

2009-10-23 Thread Dylan Beaudette
variables lead to sensible predictions? 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/mail

Re: [R] Clustering for Ordinal data

2009-10-15 Thread Dylan Beaudette
ample, and each row some ordinal 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 use

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

2009-09-09 Thread Dylan Beaudette
On Wed, Sep 9, 2009 at 5:43 AM, Kim Vanselow 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 environmental

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 Sweeting wrote: > Hi > > Well, I think the title says it all!  I've looked through the documentation > but I can't find a way of doing thi

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

Re: [R] Stratified data summaries

2009-07-09 Thread Dylan Beaudette
ing 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] 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

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

2009-07-01 Thread Dylan Beaudette
61801 > > On Jul 1, 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 >

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

2009-07-01 Thread Dylan Beaudette
the control group. Cheers, Dylan > url:www.econ.uiuc.edu/~rogerRoger Koenker > emailrkoen...@uiuc.eduDepartment of Economics > vox: 217-333-4558University of Illinois > fax: 217-244-6678Urbana, IL 61801 > >

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

2009-07-01 Thread Dylan Beaudette
ts = w[s2]) > > #Now looking at the g1 and g2 objects we see that they are equal and > agree with f1. > > > url:www.econ.uiuc.edu/~rogerRoger Koenker > emailrkoen...@uiuc.eduDepartment of Economics > vox: 217-333-4558Unive

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, 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 out noise variables

[R] odd behaviour in quantreg::rq

2009-06-30 Thread Dylan Beaudette
) # without weights, no error message summary(rq(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

Re: [R] Shapiro.test on data frame

2009-06-22 Thread Dylan Beaudette
/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. are you looking to perform this column-wise or row-wise? see ?apply for ideas cheers, Dylan

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, Mich

Re: [R] Stratified random sampling?

2009-06-18 Thread Dylan Beaudette
x27;g'), .fun=function(i) { sample(i$x, size=2)} ) # result looks ok: gg g V1 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 for

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 Batholdy wrote: >

Re: [R] Confidence Bands in Polynomial Regression

2009-06-15 Thread Dylan Beaudette
On Mon, Jun 15, 2009 at 6:57 PM, Ben Amsel 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 would like 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-Haigh wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Dylan Beaudette wrote: >> On Sun, Jun 14, 2009 at 4:39 PM, Nathan S. >> Watson-Haigh wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash

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-Haigh 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 something like: > Using

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

2009-06-09 Thread Dylan Beaudette
paired test 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 bas

Re: [R] RPostgreSQL segfault with LEFT JOIN

2009-06-08 Thread Dylan Beaudette
tgresql> > > Does anybody know what's happening there? I can check out etc fine from > another machine somewhere else. I can connect 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? ] >

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 helps.

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, jonathanbriggs 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 data.frame containing

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

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

[R] RPostgreSQL segfault with LEFT JOIN

2009-06-04 Thread Dylan Beaudette
ats graphics grDevices utils datasets methods base other attached packages: [1] RPostgreSQL_0.1-4 DBI_0.2-4 -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341

[R] validity of means comparison: unbalanced + weights

2009-05-29 Thread Dylan Beaudette
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 Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University

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.ucda

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

2009-05-06 Thread Dylan Beaudette
ed to your example: cl <- kmeans(iris[,1:4], 3) table(cl$cluster, iris[,5]) m <- naiveBayes(iris[,1:4], 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 __

Re: [R] SUM,COUNT,AVG

2009-04-06 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 Reso

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

2009-03-23 Thread Dylan Beaudette
ch in fields, see 'awk', and 'cut', or if you need to delete things see 'tr'. These tools come with any unix-like OS, and you can probably get them on windows without much effort. Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.l

Re: [R] data analysis. R

2009-03-21 Thread Dylan Beaudette
On Sat, Mar 21, 2009 at 5:13 PM, UBC 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 before and aft

Re: [R] popular R packages

2009-03-10 Thread Dylan Beaudette
st feature is that it does not react > > to changes in quality very quickly making it anti-motivating. > > Gabor I think your approach will have more payoff in the long run. I > would suggest one other metric: the number of lines of code in the > 'examples' section of all

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

Re: [R] Tunnelling X for R graphics

2009-02-02 Thread Dylan Beaudette
. Ack. Maybe I spoke too soon. 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

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 di

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 wrote: > On Fri, Jan 23, 2009 at 3:00 PM, Dylan Beaudette > wrote: >> Hi, >> >> is it possible to reverse the order in which panel.lmline() or panel.smooth() >> operation in xyplot() ? This type of situation

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

2009-01-23 Thread Dylan Beaudette
way of knowing this, but can it be convinced? 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

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
t.ci(eye,conf=c(.95,.99),type=c('norm')) >   This may be a naive question, but could this be used to test two models based on difference transformations of the dependent variable? [...] m1se<-summary(lm(disease ~ age, data=dsub))$sigma m2se<-summary(lm(log(disease) ~ age, da=dsub)

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

2009-01-12 Thread Dylan Beaudette
pears to have made the difference! Great work. Cheers, Dylan > > > Dylan Beaudette wrote: >> >> On Friday 09 January 2009, Joe Conway wrote: >>> >>> Dylan Beaudette wrote: >>>> >>>> Subsequent calls to: >>>> >>>

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 &

[R] crash on multiple queries to postgresql db

2009-01-09 Thread Dylan Beaudette
utils datasets methods [8] base other 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] 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

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 o

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 t

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 &g

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 s

[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
manual page for this function for examples. Dylan > Thank you very 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 similari

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

2008-10-30 Thread Dylan Beaudette
r meaningful groupings. Some thing like this: d <- diana(daisy(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 53

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

2008-10-28 Thread Dylan Beaudette
appreciate if you could briefly describe your > approaches or point to the right sources. > > And in general I am interested in approaches of locating discontinuities > in data patterns sampled along environmental gradients. The soil science literature may have some relevent insight int

Re: [R] Using an image background with graphics

2008-10-13 Thread Dylan Beaudette
t Waichler > Pacific Northwest National 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

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 h

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

2008-10-08 Thread Dylan Beaudette
s looks more informative to me: library(lattice) bwplot(len ~ supp | factor(dose), data=ToothGrowth, layout=c(3,1)) # and some people like this: require(Hmisc) bwplot(supp ~ len | factor(dose), data=ToothGrowth, layout=c(3,1), panel=panel.bpplot, datadensity=TRUE) -- Dylan Beaudette Soil

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 v

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

2008-08-29 Thread Dylan Beaudette
l this has happened before (and will probably 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

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

2008-08-29 Thread Dylan Beaudette
are there any compelling reasons to use Model 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 htt

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?

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

2008-08-28 Thread Dylan Beaudette
x.class=rep(letters[1:5], 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/

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

2008-08-27 Thread Dylan Beaudette
bset by level x.list <- by(x, x$lvl, f) # combine elements of resulting list into vector, with names from original # levels sapply(x.list, '[') AB 8.686382 4.578703 Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ Universit

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

2008-08-27 Thread Dylan Beaudette
that combination in the data set. At > first, it seemed like this would not be think that aggregate is probably > the way to go, but there doesn't seem to be an appropriate summary function > (FUN) available. Thanks in advance for any help in this matter, > > Josip >

Re: [R] Looping over groups

2008-08-20 Thread Dylan Beaudette
o do this easily? very quickly I would try something like: # will write to the screen lapply(x.list, write.csv) # you will probably want something more interesting: lapply(x.list, function(element_i) { # get level of 'gen' from list element # make a filename, see ?paste # write out a f

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 PROT

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

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

2008-08-19 Thread Dylan Beaudette
__ > Do > ragenden Schutz gegen Massenmails. > http://mail.yahoo.com > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-p

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

2008-08-05 Thread Dylan Beaudette
d suggest going over the available 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]

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

2008-08-05 Thread Dylan Beaudette
, cutoff=1800, width=80, map=T)) > > x11(); plot(variogram(log(Z)~X+Y, subground, cutoff=1800, width=80, > alpha=c(0, 45, 90, 135))) > > v = variogram(log(Z)~X+Y, subground, cutoff=1800, width=80, alpha=c(135, > 45)) > > v.fit = fit.variogram(v, vgm(psil

Re: [R] Re creating Procrustes Plot in Lattice

2008-07-30 Thread Dylan Beaudette
> to pass the X, Yrot 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.

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

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

2008-07-16 Thread Dylan Beaudette
mall <- d[rand_rows, ] keep in mind you will need enough memory to contain the original data AND your subset data. trash the original data once you have the subset data with rm(). As for the statistical implications of randomly sampling a point cloud for variogram analysis-- someone smarter than I

Re: [R] gstat problem with lidar data

2008-07-16 Thread Dylan Beaudette
es with tension)? Check out GRASS or GMT for ideas on how to grid such a massive point set. Specifically the r.in.xyz and v.surf.rst modules from GRASS. Cheers, -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ U

[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] Grid building in R

2008-07-09 Thread Dylan Beaudette
unimportant 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 Resour

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 yahoo.com> writes: > |>> I have a large matrix full of probabilities; I would like to convert > > each > > |>> probability

  1   2   >