search for: my_dat

Displaying 13 results from an estimated 13 matches for "my_dat".

Did you mean: my_data
2006 Nov 09
1
POSIXlt converted to POSIXct in as.data.frame()
...I've come across the conversion of POSIXlt to POSIXct when a POSIXlt variable is included in a data frame: my_POSIX <- strptime(c("11-09-2006", "11-10-2006", "11-11-2006", "11-12-2006", "11-13-2006"), "%m-%d-%Y") str(my_POSIX) my_Date <- as.Date(my_POSIX) str(my_Date) data <- format(my_Date) str(data) my_DF <- data.frame(my_POSIX) str(my_DF) DF_Date <- as.Date(my_DF$my_POSIX) str(DF_Date) DF_Date The consequence (for my LC_TIME and machine time zone) is that when as.Date() is applied to the data frame column, it d...
2008 Feb 19
3
will_paginate question
Hi- Is it possible to use search parameters with will_paginate? For example, something like this: @var = Model.paginate :per_page => 20, :page => params[:page], :order => ''my_date DESC'', :conditions =>["my_date >= ? AND my_date <=?",@start,@end] I am getting some errors with this, but will this generally work? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Rub...
2011 Mar 28
1
Ordering data.frame based on class
Dear R helpers Suppose I have a data.frame as given below - my_dat = data.frame(class = c("XYZ", "XYZ", "XYZ", "XYZ", "XYZ","ABC", "ABC", "ABC", "ABC", "ABC" ),  var1 = c(20, 14, 89, 81, 17, 44, 36, 41, 11, 36), var2 = c(1001, 250, 456, 740, 380, 641, 111, 209, 830,...
2008 Oct 15
1
dbAppy questions/clarifications
...it? Suppose the function I want to apply is "fitdistr(x,"exponential")". Would I just replace "quantile(x$DATA, names=FALSE)" by "fitdistr(x,"exponential")"? Finally, suppose the query I need to run is more complex, such as: SELECT group_id,YEAR(my_date),WEEK(my_date),ndays FROM myTable ORDER BY group_id,YEAR(my_date),WEEK(my_date); Can dbApply handle applying "fitdistr(x,"exponential")" to each group of values defined by "group_id,YEAR(my_date),WEEK(my_date)"? If so, how would I change the call to dbsendQuery, and...
2006 Jun 18
4
uninitialized constant Datetime
I am building an application and I have generated the scaffold for a product. In the list method I include something like my_date = Datetime.now and the result I get from the webrick is an error uninitialized constant Datetime Do I have to add a line with a require? I am new at ruby on rails thanks in advance -- Posted via http://www.ruby-forum.com/.
2006 Jun 08
5
AM/PM select
I have a customer that has a request that the select_datetime fields have AM/PM selectors instead of 24 hour time. The rails time and datetime selects seem to only support 24 hour time. I can''t seem to find any information on this. i was wondering if there is already a solution out there, or will i have to roll my own? Sean Wolfe master nerd of i heart squares, inc. 3711 N.
2006 Jun 15
1
Multiple :conditions?
How do I add multiple conditions to a paginated list? I have: @post_pages, @posts = paginate(:posts, :per_page => 10, :conditions => [ ''(title) OR (body) LIKE ?'', ''%'' + params[:query] + ''%''], :order =>
2011 Mar 28
0
Resending the mail - Ordering data.frame based on some class
Dear R helpers I am resending my mail as the output I desire was not properly visible and I apologize for the same. Suppose I have a data.frame as given below - my_dat = data.frame(class = c("XYZ", "XYZ", "XYZ", "XYZ", "XYZ","ABC", "ABC", "ABC", "ABC", "ABC" ),  var1 = c(20, 14, 89, 81, 17, 44, 36, 41, 11, 36), var2 = c(1001, 250, 456, 740, 380, 641, 111, 209, 830,...
2011 Sep 15
1
difftime on vector
How can I apply difftime to a vector of sorted dates? I can do this just fine with diff, but difftime doesn't seem to take in a vector. > diff(r$BOOKING_DATE) Works. Great! > difftime(r$MY_DATE, units="days") Error in as.POSIXct(time2) : argument "time2" is missing, with no default Thanks, Bradford [[alternative HTML version deleted]]
2007 Apr 23
3
How to change Date format
Hi all, I am using InstantRails with MySQL-Front. Date is stored in format yyyy-mm-dd in database. I want to retrieve and show date in dd-mm-yyyy in my view.rhtml. How can I change it to dd-mm-yyyy form. Please help me out. Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2006 Jan 23
3
date.to_s trimming
When I convert a datetime to a string, it prints out something like this Jan 20 12:00:00 EST 2006 I want to trim off the last twelve characters, i.e. :00 EST 2006 I tried to do it like so: @date = @meeting.date.to_s.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp but the chomps seem to do nothing. I''d love to use regex, but I don''t know which
2006 Mar 02
6
Newb question about facade columns
Hello, I am trying to deal with a database table that contains a date in the form of the number of seconds since epoch. Data is inserted in this format by an existing script that I can''t change, so a schema change isn''t realistic. I would like to allow humans to view and edit this data in the form of an actual human-readable date. I figured a facade column would be the
2006 May 09
2
How do you Convert a Time or Date to SQL formatted date?
I am executing some arbitrary SQL in which i need to convert a date/time object into an sql formatted string. Is there a simple way to do this in rails? Thanks Chris -- Posted via http://www.ruby-forum.com/.