[R] spsurvey analysis

2013-11-01 Thread Tim Howard
All, I've used the excellent package, spsurvey, to create spatially balanced samples many times in the past. I'm now attempting to use the analysis portion of the package, which compares CDFs among sub-populations to test for differences in sub-population metrics. - My data (count data) have

Re: [R] spsurvey analysis

2013-11-01 Thread Tim Howard
6543 N Burlington Avenue Portland, OR 97203-5452 503-823-1038 jason@portlandoregon.gov -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tim Howard Sent: Friday, November 01, 2013 7:49 AM To: r-help@r-project.org Subject: [R

Re: [R] update.packages fails on pdf write - CSAgent

2013-10-03 Thread Tim Howard
= y, repos = NULL, lib = C:/pathToLocationWhereWritesAreAllowed) #now manually copy the folders to the R installation and overwrite the existing ones. Tim Date: Wed, 02 Oct 2013 11:17:29 -0400 From: Tim Howard tghow...@gw.dec.state.ny.us To: r-help@r-project.org Subject: [R] update.packages

[R] update.packages fails on pdf write - CSAgent

2013-10-02 Thread Tim Howard
All, I work in a building where our computers are running Windows XP with Cisco Security Agent (CSA) activated, locking many automated actions, especially file writes. We (lowly staff) are allowed to install software, so on upgrading to R 3.0.2, I tried the standard approach for updating my

Re: [R] read.csv quotes within fields

2013-01-28 Thread Tim Howard
Yes! This does this trick. Thank You! Tim peter dalgaard pda...@gmail.com 1/26/2013 11:49 AM On Jan 26, 2013, at 16:32 , Tim Howard wrote: Duncan, Good point - I guess I am expecting too much. I'll work on a global replace before import or chopping with strsplit while importing. FYI

Re: [R] read.csv quotes within fields

2013-01-26 Thread Tim Howard
=showCaseDownloadForm (see off-airport AEA 2005 for a csv with issues.) Thank you for the help. I really do appreciate the suggested solutions. Also, thanks to John Kane for the link to csvEdit. Tim Duncan Murdoch murdoch.dun...@gmail.com 01/25/13 6:37 PM On 13-01-25 4:37 PM, Tim Howard wrote: David, Thank

[R] read.csv quotes within fields

2013-01-25 Thread Tim Howard
All, I have some csv files I am trying to import. I am finding that quotes inside strings are escaped in a way R doesn't expect for csv files. The problem only seems to rear its ugly head when there are an uneven number of internal quotes. I'll try to recreate the problem: # set up a

Re: [R] read.csv quotes within fields

2013-01-25 Thread Tim Howard
[5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base Tim Howard 1/25/2013 1:42 PM All, I have some csv files I am trying to import. I am finding that quotes inside strings are escaped in a way R

Re: [R] read.csv quotes within fields

2013-01-25 Thread Tim Howard
with the escape character within a single string. Tim David Winsemius dwinsem...@comcast.net 1/25/2013 2:27 PM On Jan 25, 2013, at 10:42 AM, Tim Howard wrote: All, I have some csv files I am trying to import. I am finding that quotes inside strings are escaped in a way R doesn't expect

Re: [R] read.csv quotes within fields

2013-01-25 Thread Tim Howard
there would be a solution within read.csv() ... or perhaps scan()?, I just can't figure it out. best, Tim David Winsemius dwinsem...@comcast.net 1/25/2013 4:16 PM On Jan 25, 2013, at 11:35 AM, Tim Howard wrote: Great point, your fix (quote=) works for the example I gave. Unfortunately

Re: [R] Filling Lists or Arrays of variable dimensions

2012-12-21 Thread Tim Howard
Jessica, In terms of initializing your list for populating it in a later step, I think this partially gets at your question -- it removes the upper loop assignment, but then does require a loop to get the second level. Perhaps there's something here you can work with ... height-c(high,low)

[R] bootstrap means by strata

2011-10-13 Thread Tim Howard
All - I have an uneven set of replicates and would like to sample from this set X number of times to generate a mean for each grouping variable. I was thinking the boot package would be the thing to use, but now I'm not so sure ... given the discussion here:

Re: [R] bootstrap means by strata

2011-10-13 Thread Tim Howard
Answering my own question. ?sample (!) y - by(x, x$TrSeasYr, function(x) mean(sample(x[,1], size=999, replace = TRUE))) Tim Howard 10/13/2011 9:42 AM All - I have an uneven set of replicates and would like to sample from this set X number of times to generate a mean for each grouping

Re: [R] assign factor levels based on list

2011-02-10 Thread Tim Howard
]] - factor(y[[x]] , levels= my.factor.defs[[x]])}) str(y) 'data.frame': 3 obs. of 3 variables: $ colOne : Factor w/ 6 levels 1,2,3,4,..: 1 2 3 $ colTwo : Factor w/ 5 levels apple,pear,..: 1 2 3 $ colThree: num 4 5 6 Thank you again! Best, Tim Howard William Dunlap wdun...@tibco.com 2

[R] assign factor levels based on list

2011-02-09 Thread Tim Howard
All, Given a data frame and a list containing factor definitions for certain columns, how can I apply those definitions from the list, rather than doing it the standard way, as noted below. I'm lost in the world of do.call, assign, paste, and can't find my way through. For example: #set up

[R] apply over list of data.frames

2010-11-24 Thread Tim Howard
6 10 3 12 7 11 #the result should be a b c 1 2.5 3.5 6 2 5 4.5 7 3 7.5 5.5 8 Can anyone direct me down the right path? Thanks in advance Tim Howard [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

Re: [R] apply over list of data.frames

2010-11-24 Thread Tim Howard
= data.frame(x = c(1,2,3), y = c(1,2,2), z = c(3,1,1)), two = data.frame(x = c(2,5,2), y = c(2,3,1), z = c(4,1,2)) ) Reduce(+, DF.lis) / length(DF.lis) I hope it helps. Best, Dimitris On 11/24/2010 8:37 PM, Tim Howard wrote: R users, This probably involves a simple incantation of one

Re: [R] Force evaluation of variable when calling partialPlot

2010-11-16 Thread Tim Howard
the 'names' of the imp data frame to be absolutely clear to RF you are talking about the same variables for(i in length(sel.imp){ partialPlot(sel.rf,xdata,names(sel.imp[i]),which.class=1,xlab=vars[i],main=) } Hope that helps. Tim Howard Date: Mon, 15 Nov 2010 12:29:08 -0800 (PST) From

Re: [R] Random Forest - Strata

2010-07-21 Thread Tim Howard
Coll, An alternative approach is to do that subsetting yourself before sending it to RF and treat each group as an external validation group, as follows: - extract Site A, build a RF model (Model 1) on sites B and C - validate this model by running a predict on site A using the model, use ROCR

Re: [R] ggplot2 rose diagram

2010-03-10 Thread Tim Howard
(axis.text.x = theme_text(size = 18)) smp2 + coord_polar() Cheers, Tim Tim Howard 3/9/2010 9:25 AM Dear R gurus - consider this plot: library(ggplot2) dat - sample(1:8,100,replace=TRUE) smp - ggplot(data.frame(dat), aes(x=factor(dat),fill=factor(dat))) + geom_bar(width=1) smp + coord_polar() Q1

Re: [R] ggplot2 rose diagram

2010-03-10 Thread Tim Howard
scale_y_sqrt(). Hadley On Wed, Mar 10, 2010 at 2:05 PM, Tim Howard tghow...@gw.dec.state.ny.us wrote: To answer two of my own questions to get them into the archives (I am slowly getting the hang of ggplot): Q1. use opts(axis.text.x = theme_text(size=xx)) to change font size of the bar

Re: [R] ggplot2 rose diagram

2010-03-10 Thread Tim Howard
Got it. Thanks again so much for the help. Best, Tim hadley wickham h.wick...@gmail.com 3/10/2010 2:46 PM By Q2 I was trying to refer to the Y-axis labels. For the polar plot, the Y-axis labels reside left of the panel. I was looking for a way to get the Y-axis labels to radiate out

[R] ggplot2 rose diagram

2010-03-09 Thread Tim Howard
for a different presentation than ggplot2. Any suggestions on how to use this calculation method in the ggplot framework? Thanks in advance for your help. Tim Howard New York Natural Heritage Program __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
(ROCR) data(ROCR.xval) RCdat - plot(perf, avg=threshold) RCdat ## output: NULL Does anyone have any tricks for piping or extracting these data? Or, perhaps for steering me in another direction? Thanks, Tim From: Tim Howard tghow...@gw.dec.state.ny.us Subject: [R] ROCR.plot methods, cross

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
On Sep 24, 2009, at 9:09 AM, Tim Howard wrote: All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted values from hist(), boxplot(), and even plot.randomForest(). Observe: # get some data dat - rnorm(100) # grab histogram data hdat

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
if I can get in there and tweak it. Thanks to both of you for the help. Tim David Winsemius dwinsem...@comcast.net 9/24/2009 9:43 AM On Sep 24, 2009, at 9:09 AM, Tim Howard wrote: All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted

Re: [R] pipe data from plot(). was: ROCR.plot methods, cross validation averaging

2009-09-24 Thread Tim Howard
, Sep 24, 2009 at 3:09 PM, Tim Howard tghow...@gw.dec.state.ny.us wrote: All, I'm trying again with a slightly more generic version of my first question. I can extract the plotted values from hist(), boxplot(), and even plot.randomForest(). Observe: # get some data dat - rnorm(100) # grab

[R] ROCR.plot methods, cross validation averaging

2009-09-23 Thread Tim Howard
]] - c(Inf,0) plot(perf, avg=threshold) ##output results in an error with this message # Error in if (from == to) rep.int(from, length.out) else as.vector(c(from, : # missing value where TRUE/FALSE needed Thanks in advance for your help Tim Howard New York Natural Heritage Program

Re: [R] rzinb (VGAM) and dnbinom in optim - Solved.

2008-04-19 Thread Tim Howard
,par=c(0.09, 72, 0.7),x=x,method = L-BFGS-B, lower=c(1e-10,1e-10,1e-10),upper=c(1-1e-10,Inf,Inf), control=list(trace=TRUE),hessian=TRUE) ##optim solut$par ##vglm Coef(fit) On Fri, 18 Apr 2008, Tim Howard wrote: Dear R-help gurus (and T.Yee, the VGAM maintainer) - I've been banging my head

[R] rzinb (VGAM) and dnbinom in optim

2008-04-18 Thread Tim Howard
) : argument size is missing, with no default I have the same problem with dnbinom. I'm sure I'm doing something obvious any suggestions? Session info below. Thanks in advance. Tim Howard New York Natural Heritage Program sessionInfo() R version 2.6.2 (2008-02-08) i386-pc-mingw32 locale