search for: daterange

Displaying 11 results from an estimated 11 matches for "daterange".

2012 Feb 22
4
Week number from a date
Hi My data looks like this startDate="2008-06-01" dateRange =c( "2008-10-01","2008-12-01") Is there any method to find the week number from the startDate range ----- Thanks in Advance Arun -- View this message in context: http://r.789695.n4.nabble.com/Week-number-from-a-date-tp4410223p4410223.html Sent from the R help mailing l...
2007 Jul 18
5
Strange search result with conditions in find_by_contents
.../tags/stable/acts_as_ferret'' in my SearchController def searchforum if !params[:doSearch].nil? if params[:searchTerms].nil? || params[:searchTerms] == "" flash[:notice] = ''Please enter some words to search on.'' else @conditions = " 1 = 1"; if !params[:dateRange].nil? && params[:dateRange] != "" @conditions += " and creationDate >= " + params[:dateRange] end if !params[:forumID].nil? && params[:forumID] != "" @conditions += " and forum_id = " + params[:forumID] end # @total, @topics = Topic.full_...
2011 Feb 09
1
Iterate over a list of input files?
...= 1101101 StartDate = TStoDate(FirstDate) EndDate = TStoDate(LastDate) # Create a sequence of days from start to finish # Then remove weekends and holidays and turn into a data.frame dd <- seq(StartDate, EndDate, by = "day") TradingDate <- dd[!is.weekend(dd) & !is.holiday(dd)] DateRange <- as.data.frame(TradingDate) # Read list of files to run tests on Files = dir("C:\\CorrelationTests", pattern = "^[T]", full.names=TRUE) # Create a data.frame with the A = read.csv(Files[1], header=FALSE)[,c(1,7)] A[,1] = as.Date(A[,1], format="%m/%d/%Y") ASum &...
2010 Dec 29
1
filling up holes
I have a data frame with three columns client ID | date | value For each cilent ID I want to determine Min date and Max date and for any dates in between that are missing I want to insert a row Client ID | date| NA Any help would be appreciated.
2012 Oct 14
0
Asking help about drawing and saving candle chart automatically....
...quot;)) for(i in 1:5) { # increased date and convert it as Date class again convdate <- as.Date(juldate_start + i) # reformat date as recognizable string by quantmod format(convdate, format="yyyy-mm-dd") strdate <- as.character(convdate) print(strdate) # make daily range daterange <- paste( strdate, "::", strdate, sep="" ) print(daterange) jpegname <- paste(strdate, ".jpeg", sep="") #### jpeg( filename=jpegname, width=1200, height=400 ) tryCatch(chartSeries(aa, subset=daterange, type='candlesticks', theme=chartThem...
2007 Jan 09
9
Date Approximation in Specs
The floating-point expectations allow for an error tolerance. Is there any similar facility for dates? For example, say I have a custom class that handles date/time spans and I want to spec it: context "A DateRange span" do specify "should know when a week ago is :)" do d = DateRange.new d.last_week.should_be_close_to(1.week.ago, 24*60*60) end end The idea of should_be_close_to is to provide a tolerance. My class only is required to be accurate to the same day, and I want to...
2007 May 02
4
Wrong total_hits when using conditions in find_by_contents
...nts(q, options, find_options) return [results.total_hits, results] end in my SearchController: if params[:doSearch] == "true" if params[:query] == "" flash[:notice] = ''Please enter some words to search on.'' else @conditions = " 1 = 1"; if params[:dateRange] != "" @conditions += " and creationDate >= " + params[:dateRange] end if params[:forumID] != "" @conditions += " and forum_id = " + params[:forumID] end @total, @topics = Topic.full_text_search(params[:query], {:page => (params[:page]||1)}, {:conditio...
2009 Sep 17
1
Beginner Q- dates in the xrange?
Hi all- terribly beginner question here, but I can't figure out how to put dates as the values for my x range in a plot. Example: xrange <- results$current yrange <- results$DIFF plot(xrange, yrange, type="n", xlab="Date", ylab="Differential") lines(results$DIFF, type="l", lwd=1.5, col="red") Where xrange is: > xrange [1]
2011 Aug 09
0
How to merge multiple 'having' clause relation in rails 3
If i remove any one of scopes having clause then the above action works perfectly . Is there any way to like- @model = Model.vacant_list(daterange) and then remove the active record relation and then apply @model.amenity_type(term). I tried lots of things but didnt find any solution for this..... Full question listed here http://stackoverflow.com/questions/6986561/how-to-merge-multiple-having-clause-relation-in-rails-3 -- You received this...
2010 Feb 10
0
boxplot label cleanup
.../Programs/UtilityProgram_Summarize_UNSAT_Zone_Results_8Class/Process_UZF_Output/bin/R_Data_fracETSat_US.txt",header=TRUE,sep="\t") attach(my.dat) dates<-strptime(as.character(my.dat$date),"%m/%e/%Y") my.dat=my.dat[,2:5] my.dat=data.frame(date=dates,my.dat) detach(my.dat) daterange=c(as.POSIXlt(min(my.dat$date)),as.POSIXlt(max(my.dat$date))) rm(dates) attach(my.dat) cropped=subset(my.dat,Classification==5) natveg=subset(my.dat,Classification==7) > cropped[c(1,2,3),] #Example data date Cell_ID Classification WT_Depth Frac_ET_Satsfd 94 1999-04-08 4395...
2011 Jul 05
9
How to implement a schedule of recurring events?
Hello, I am fairly new to Ruby and Ruby on Rails. I am creating an application that "has many :groups", each with their own schedule of events. This is a little different than a calendar of events, since these events recur every week and do not have a specific date. So for example, I need to display a schedule for one group that looks like this: Group A''s Activities - Monday