similar to: POSIXlt converted to POSIXct in as.data.frame()

Displaying 20 results from an estimated 200 matches similar to: "POSIXlt converted to POSIXct in as.data.frame()"

2009 Oct 29
1
Basic question ( too broad for help topics).
I have searched help topics but don't know exactly what to search for. Need to use my_num to find any matching STREPs in my_df my_num <- c("101","102","103","104","105","107","108","112","113","114","115") ## "my_df" has 8,000 different STREPS in it. ## I have a
2013 Mar 20
3
summarize dataframe based on multiple cols, not their combinations
Hi folks, I'm trying to figure out how to get summarized data based on multiple columns. However, instead of giving summaries for every combination of categorical columns, I want it for each value of each categorical column regardless of the other columns. I could do this with three different commands, but i'm wondering if there's a more elegant way that I'm missing. Thanks!
2011 Nov 03
2
query about counting rows of a dataframe
Dear R users, I have got the following data frame, called my_df: gender day_birth month_birth year_birth labour 1 F 22 10 2001 1 2 M 29 10 2001 2 3 M 1 11 2001 1 4 F 3 11
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?
2008 Jan 22
2
contingency table on data frame
I am sorry if this is a faq or tutorial somewhere, but I am unable to solve this one. What I am looking for is a count of how many different categories(numbers in this case) that appears for a given factor. Example: > l <- c("Yes", "No", "Perhaps") > x <- factor( sample(l, 10, replace=T), levels=l ) > m <- c(1:5) > y <- factor( sample(m, 10,
2012 Sep 13
1
remove all terms with interaction factor in formula
Hi Folks, I'm trying to find a way to remove all terms in a formula that contain a particular interaction. For example, in the formula below, I'd like to remove all terms that contain the b:c interaction. > attributes(terms( ~ a*b*c*d))$term.labels [1] "a" "b" "c" "d" "a:b" "a:c" [7]
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/.
2023 Jun 04
2
Adding a numeric class to a data.frame
R-Help Community How do I add a numeric class to a data .frame. For example, I have calculated the following probabilities 1 2 3 0.0011566127 0.0009267028 0.0081623324 How would I add them back into my data.frame for example My_df <- data.frame(col_1 = c('A', 'B', 'C')) such that I end up with col_1
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]]
2008 Oct 15
1
dbAppy questions/clarifications
In the example in the documentation, I see: rs <- dbSendQuery(con, "select Agent, ip_addr, DATA from pseudo_data order by Agent") out <- dbApply(rs, INDEX = "Agent", FUN = function(x, grp) quantile(x$DATA, names=FALSE)) Maybe I am a bit thick, but it took me a while, and a kind hint from Phil, to figure much of this out. It is clear that the SQL
2007 Jun 06
1
spgrass6 and aggregation (bis)
Dear all, I have some additionale question concerning the spgrass6 package. * When you set a region in GRASS, does the readGRASS6 function in R only load data contained in the zoomed region or the whole map ? * When you have a MASK map in grass, does the readGRASS6 function in R only load data contained inside the MASK area ? Could this be the problem ? Thanks, Jessica
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.
2008 Jul 22
5
How to filter a data frame?
I have a question about how to filter the data frame: Suppose my data frame has variables like gender, age,... How to get a subset of the data frame, with only female (or male) and/or age > 50...? What is the typical syntax? I tried several condition expressions, but none of them worked... Thanks a lot! -- View this message in context:
2018 May 22
3
legend order in ggplot2
Hi, I'd like to graph three lines on ggplot2 and I intend the lines to be "solid", "dashed", and "dotted". The legend names are "name_b", "name_a", "name_c". I'd like to legend to present in the order: the "name_b" at the top, and "name_c" at the bottom. As a consequence, the legend is indeed in the order:
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 =>
2006 May 01
3
Repeat dataframe
Hi R list: How can I "repeat" a data frame n times (with n>1000), and obtain a new data frame where all the n data frames are binded by rows? Thank you for your help Kenneth -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
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
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, 920)) > my_dat    class