Re: [R] Determining maximum hourly slope per day

2013-03-14 Thread Nathan Miller
mberg Tiburon Center San Francisco State University 3150 Paradise Dr Tiburon, CA 94920 www.nate-miller.org On Wed, Mar 13, 2013 at 4:34 PM, Peter Ehlers wrote: > On 2013-03-12 17:10, Nathan Miller wrote: > >> Hello, >> >> I have a challenge! >> >> I have

[R] Determining maximum hourly slope per day

2013-03-12 Thread Nathan Miller
Hello, I have a challenge! I have a large dataset with three columns, "date","temp", "location". "date" is in the format %m/%d/%y %H:%M, with a "temp" recorded every 10 minutes. These temperatures of surface temperatures and so fluctuate during the day, heating up and then cooling down, so the da

Re: [R] Adding 95% contours around scatterplot points with ggplot2

2013-01-28 Thread Nathan Miller
es to stat_contour, but try > > ggplot(data=data, aes(x, y, colour=(factor(level)), fill=level))+ > geom_point()+ > stat_density2d(bins=2) > > HTH, > Ista > > On Mon, Jan 28, 2013 at 2:43 PM, Nathan Miller > wrote: > > Thanks Ista, > > >

Re: [R] Adding 95% contours around scatterplot points with ggplot2

2013-01-28 Thread Nathan Miller
r criteria, but have you looked at > ?stat_density2d? > > Best, > Ista > > On Mon, Jan 28, 2013 at 12:53 PM, Nathan Miller > wrote: > > Hi all, > > > > I have been looking for means of add a contour around some points in a > > scatterplot as a means of

[R] Adding 95% contours around scatterplot points with ggplot2

2013-01-28 Thread Nathan Miller
Hi all, I have been looking for means of add a contour around some points in a scatterplot as a means of representing the center of density for of the data. I'm imagining something like a 95% confidence estimate drawn around the data. So far I have found some code for drawing polygons around the

Re: [R] More efficient use of reshape?

2012-12-14 Thread Nathan Miller
tempt to simplify example and just include the code I felt was > > necessary I left out the loading of ggplot2, which then imports reshape2, > > and which was actually used in the code I provided. Sorry to the mistake > > and my misunderstanding of where the reshape function was coming fro

Re: [R] More efficient use of reshape?

2012-12-13 Thread Nathan Miller
from. Should have checked that more carefully. Thanks, Nate On Thu, Dec 13, 2012 at 9:48 AM, David Winsemius wrote: > > On Dec 13, 2012, at 9:16 AM, Nathan Miller wrote: > > Hi all, >> >> I have played a bit with the "reshape" package and function along with

[R] Violin plot of categorical/binned data

2012-11-03 Thread Nathan Miller
Hi, I'm trying to create a plot showing the density distribution of some shipping data. I like the look of violin plots, but my data is not continuous but rather binned and I want to make sure its binned nature (not smooth) is apparent in the final plot. So for example, I have the number of indivi

[R] drop1, 2-way Unbalanced ANOVA

2012-07-23 Thread Nathan Miller
Hi all, I've spent quite a lot of time searching through the help lists and reading about how best to run perform a 2-way ANOVA with unbalanced data. I realize this has been covered a great deal so I was trying to avoid adding yet another entry to the long list considering the use of different SS,

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
t someone else might start their own exploration of these issues a little further down the road than I found myself when I started looking into this. Thanks, Nate On Wed, Nov 9, 2011 at 1:46 PM, David Winsemius wrote: > > On Nov 9, 2011, at 4:35 PM, Nathan Miller wrote: > > Sorry, I

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
Ok, I got it. smean.cl.boot(x, conf.int=.95, B=1000, na.rm=TRUE, reps=FALSE) Looks like its 1000. Cool. Thanks for the help, Nate On Wed, Nov 9, 2011 at 1:35 PM, Nathan Miller wrote: > Sorry, I didn't realize I was being so obscure. > > Within ggplot it is possible to use sta

Re: [R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
y looking for details regarding how "mean_cl_boot" works. If you don't have information regarding how it works (such as the default number of resamplings) there is no need to respond. Thanks for any assistance, Nate On Wed, Nov 9, 2011 at 1:10 PM, David Winsemius wrote: >

[R] ggplot stat_summary (mean_cl_boot)

2011-11-09 Thread Nathan Miller
Hello, This is a pretty simple question, but after spending quite a bit of time looking at "Hmisc" and using Google, I can't find the answer. If I use stat_summary(fun.data="mean_cl_boot") in ggplot to generate 95% confidence intervals, how many bootstrap iterations are preformed by default? Can

[R] Calculating difference between values in data frame based on separate column

2011-10-21 Thread Nathan Miller
Hi all, Say I have a data frame something like the one below with different sample vials, measured before(B) and after(A) some process, with a value recorded at each measurement point vialmeasurevalue 1 B26 1 A12 2 B 45 2

Re: [R] Applying function with separate dataframe (calibration file) supplying some inputs

2011-10-19 Thread Nathan Miller
17.4 10 > 3 27.6 17.4 20 > 3 28.1 17.5 30 > 4 31.0 17.6 10 > 4 33.3 17.6 20 > 4 35.617.6 30"), header = TRUE, stringsAsFactors = > FALSE) > closeAllConnections() &

[R] Applying function with separate dataframe (calibration file) supplying some inputs

2011-10-19 Thread Nathan Miller
Hello, I am not entirely sure the subject line captures what I am trying to do, but hopefully this description of the problem will help folks to see my challenge and hopefully offer constructive assistance. I have an experimental setup where I measure the decrease in oxygen in small vials as an o

Re: [R] ggplot2-Issue placing error bars behind data points

2011-09-08 Thread Nathan Miller
tor + to be at the end of > a > line, not at the beginning. Copy and paste this code verbatim to > see what I mean: > p + geom_errorbar(limits,width=0.2) > + geom_point(aes(fill=factor(Temp)), colour = colors()[173], > shape = 21, size=4) > > This happen

[R] ggplot2-Issue placing error bars behind data points

2011-09-07 Thread Nathan Miller
Hi all, This seems like a basic problem, but no amount of playing with the code has solved it. I have a time-series data set like that shown below (only longer) and am seeking to plot the data with filled, circular points and error bars. I would like the error bars to be behind the points otherwis

Re: [R] Linear Regression with 2 grouping variables

2011-08-23 Thread Nathan Miller
. The game is to write the function so that it > takes a [list] model object (here, m) as input and a data frame as > output. You can also extract output from summary(m) in a similar way, > using m as the input object. > > HTH, > Dennis > > On Mon, Aug 22, 2011 at 6:15 PM, Nathan

[R] Linear Regression with 2 grouping variables

2011-08-22 Thread Nathan Miller
Hi all, I have a data set that looks a bit like this. feed1 RFU Site Vial Time lnRFU 1 811 10 10.702075 2 4752111 20 10.768927 3 4290511 30 10.66674 4 4686711 40 10.755069 5 4299511 50 10.668839 6 4307411

[R] ggplot boxplot

2011-01-20 Thread Nathan Miller
Hello, I am trying to generate a set of boxplots using ggplot with the following data with 4 columns (Day, Site, VO2, Cruise) AllCorbulaMR Day Site VO2 Cruise 1 11 148.43632670 1 2 11 61.73864969 1 3 11 92.64536096 1 4 11 73.35434957

Re: [R] Error in combined for() and if() code

2010-12-28 Thread Nathan Miller
nient as well. Maybe I'll came back to the data filtering problem later. Thanks for your help and comments, Nate On Tue, Dec 28, 2010 at 10:49 AM, David Winsemius wrote: > > On Dec 28, 2010, at 1:08 PM, Nathan Miller wrote: > > Hello, >> >> I am trying to filter a dat

[R] Error in combined for() and if() code

2010-12-28 Thread Nathan Miller
Hello, I am trying to filter a data set like below so that the peaks in the Phase value are more obvious and can be identified by a peak finding function following the useful advise of Carl Witthoft. I have written the following for(i in length(data$Phase)){ newphase=if(abs(data$Phase[i+1]-data$P

[R] Finding flat-topped "peaks" in simple data set

2010-12-23 Thread Nathan Miller
Hello, Thank you to all those great folks that have helped me in the past (especially Dennis Murphy). I have a new challenge. I often generate time-series data sets that look like the one below, with a variable ("Phase") which has a series of flat-topped peaks (sample data below with 5 "peaks"). I

[R] ggplot missing fill colours in boxplot legend

2010-12-17 Thread Nathan Miller
Hello, I am trying to create a series of boxplots with the following data, three columns, "Day" (1 or 2), "Site" (1-4), and "VO2" (some values missing for some Sites or Days) > CorbulaMR3 Day Site VO2 111 88.92223 211 86.17873 311 61.08950 411 190.47922

[R] Wait for user input with readline()

2010-11-22 Thread Nathan Miller
Hello, I am trying write a script that includes a prompt for user input using readlines(). I am running into the problem that when I run readlines() as a single line the prompt works perfectly, but when I try to run a block of code which includes the readline function, the script doesn't wait for

Re: [R] Batch Processing Files

2010-11-16 Thread Nathan Miller
Dennis and all, Thank you for the help as I try to get this method for importing and batch processing files organized. I currently have this set-up to import data from two files in my working directory. "Var1" specifies data from file 1 and file 2. filenames=list.files() library(plyr) import