similar to: problem converting character to dates

Displaying 20 results from an estimated 2000 matches similar to: "problem converting character to dates"

2006 Jan 28
1
Method for returning a random date between two dates
Hi, I''m trying to create a method to return a random date within a range. So far, I''ve come up with this... require ''parsedate'' def random_date (a, b) adate = ParseDate.parsedate(a) bdate = ParseDate.parsedate(b) atime = Time.local(*adate) btime = Time.local(*bdate) atime + (rand * (atime - btime) ) end ...and it doesn''t seem to
2011 May 16
2
conditional rowsums in sapply
Hi all I have a data frame with duplicate columns and i want to remove duplicates by adding rows in each group of duplicates, but have lots of NA's. Data: dfrm <- data.frame(a = 1:4, b= 1:4, cc= 1:4, dd=1:10, ee=1:4) names(dfrm) <- c("a", "a", "b", "b", "b") dfrm[3,2:3]<-NA dfrm a a b b b 1 1 1 1 1 1 2 2 2 2 2 2 3
2009 Oct 10
1
Resultados distintos
Buenas tardes a todos, tengo un problema con R: ejecuto el mismo script en el ordenador del trabajo y en mi portátil con los mismos datos y obtengo resultados diferentes (siendo los correctos, los obtenidos en el trabajo): rm(list=ls()) directorio<-"C:\\Documents and Settings\\BDs\\" library(RODBC) library(car) library(gdata) ### DATOS A ###
2008 Sep 10
1
help: error handling in try
First time to post and searched archive for this problem with no clue. My version is 2.5.1. Below is a function to check if a given date is a valid date to a given date function object. It uses try (also tried tryCatch but with same problem). When given an invalid date, I am hoping try will generate en error message which would be picked up by the geterrmessage and thus expecting a false result.
2009 Sep 17
3
Simple as.Date question dealing with a timezone offset
I've been trying to understand the as.Date functionality and I have a date and time stamp field that looks like this: "Tue Sep 15 09:22:09 -0600 2009" and I need to turn it into an R Date object for analysis. Simple date conversions I have down, no problem: > adate = c("7/30/1959") > as.Date(adate,"%m/%d/%Y") [1] "1959-07-30" > But when it
2006 Jul 25
1
[RODBC] ERROR: Could not SQLExecDirect
Hi, I've got a problem with RODBC and saving (sqlSave) of a dataframe in Access. R 2.0.1 is running on windows XP. When executing the examples in R help for the "USArrests" data set "sqlSAve" works fine, but running sqlSave() for a dataframe "Adat" > str(Adat) `data.frame': 1202 obs. of 18 variables: containing 18 columns and ca. 1200 rows fails.
2012 Aug 16
3
Reference a variable inside a string and another for object assingments
Hi R community I copied a bit of my R code that gets some data from a database. You won't be able to run the code, but I am a beginner so you will probably understand what going on. I would like to make a variable I can refer to inside the sqlQuery. Instead of writing the start date and time (ex SP.lokaldatotid >= '2005-01-01 00:00:00') inside the query I would like to define it
2010 Mar 03
6
File paths must be fully qualified
I was using Puppet 0.24.8 and now upgrade the puppet server and client both to 0.25.4 (on 1 machine i.e. server and client), but i am facing some problems. While testing, some of the configs which were/are running fine on older version generates error here; for instance, i have defined the FileSource path in ''/etc/puppet/fileserver.conf'' [myFileSrc] path
2002 Jan 24
1
PATCH: krb4/krb5/... names/patterns in auth_keys entries
This patch (to OpenSSH 3.0.2p1) adds support for using krb4, krb5 and other principal names in authorized_keys entries. It's a sort of replacement for .klogin and .k5login, but it's much more general than .k*login as it applies to any authentication mechanism where a name is associated with the ssh client and it supports name patterns and all the normal authorized_keys entry options
2009 Sep 15
1
quoting a table name due to a special character in sqlQuery (RODBC)
Dear List, I have a problem with RODBC on a Paradox-DB, sqlQuery, and special characters in table names. Unfortunately, some of the latter include the underscore <_>. And I am not able to change them. That's not a problem, when I quote the table name: > sqlQuery(channel2, 'SELECT * FROM "anmeldung-alt"') Btw, if I swap ' and " it does not work: >
2018 Sep 19
0
Delivery Status Notification (Delay)
** Delivery incomplete ** There was a temporary problem delivering your message to curtiskwong101 at gmail.com. Gmail will retry for 46 more hours. You'll be notified if the delivery fails permanently. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos-docs/attachments/20180919/4030c740/attachment-0002.html>
2011 Dec 05
2
R 2-14.0 locking up
Dear R People: I'm working with R-2.14.0 created from source on a quad core Windows 7 machine. Starting yesterday, nearly everything I run just sits. When I hit escape or Ctrl C, nothing happens. Has anyone run into this, please? Any suggestions would be much appreciated. Thanks, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of
2011 Jun 03
1
Icecast authentication cant resolve address on Debian
Hi, I am trying to use the url authentication method but am having trouble getting icecast to work on a Debian installation on a VPS platform. I have logged in my VPS as root and installed icecast using apt-get install icecast2 setup the config file and then set ENABLE=true in /etc/init.d/icecast2 This initialy didn't work as it couldn't access log files and then had trouble with the
2004 Jul 24
3
Population simulation.
Hello, can anyone tell me if R has any special function for simulating the structure of human populations? Something like the genetic algorithm? I need to simulate a sample of a population with a specific structure. Is there something on R that can help me? Thanks to everyone. __________________________________________________________
2012 Mar 23
5
How to convert factors to numbers
Hello, I am relatively new to using R. The text file contains the date and price . I want to read and manipulate the data in R. However, when I use read.table, it treats all of the data as "factors" and I do not know how to treat the data as numbers: http://r.789695.n4.nabble.com/file/n4498828/p_diarios.txt p_diarios.txt setwd ("C:\\Users\\Sandro\\Dropbox\\R")
2006 Jan 23
1
exporting dates into Microsoft SQL Server
I am running R 2.1.1 in a Windows XP environment. I wish to use the sqlSave command to export a dataframe into Microsoft SQL. My dataframe is called temp and has 2 ?columns?, ?monthenddate? and ?value?. Monthenddate is in 'POSIXct', format. (i.e. 'POSIXct', format: chr "1984-01-31" "1984-01-31" "1984-01-31" "1984-01-31" ...). How can I
2010 Apr 08
0
Reading dates in R using SQL and otherwise (and someinteresting behavior by the data editor)
Hi Paul, Jim, Dennis, and others,   I got RODBC and SQL Server to create a date variable in R (see below). I'm pretty sure the commands I was issuing before were working but that I was stripping off the date class every time I submitted the command "fix(mydata)." So I kept getting the mistaken impression that what I was doing wasn't working.   One thing I've noticed is
2003 Feb 10
3
non-SQL sqlQuery error
Dear all, I've encountered a curious problem. I am trying to run an SQL query using sqlQuery() function in RODBC. The query works fine when run in a stand-alone SQL browser (Microsoft Query Analyzer, in particular). However, when I use the exact same thing from sqlQuery() function, I get the following error: Error in "[.data.frame"(data, , ) : not all specified columns exist
2010 Oct 11
1
importing numeric types via sqlQuery
Hi everyone, I am using the sqlQuery function (in RODBC library) to import data from a database into R. My table (called temp) in the database looks like this: category numabc 54469517.307692307692def 36428860.230769230769 I used the following R code to pull data into R:data <-sqlQuery(channel, "select category, num from temp;") However, the result is that "num" gets all its
2005 Oct 19
3
sqlQuery and string selection
Dear alls, Could someone tell me how to select a subset of string observations (e.g. "females" in a sex column) with sqlQuery in the RODBC library? Indeed, I'm trying to select a subset of observations on my access database with: female<-sqlQuery(mychannel,"SELECT Micromammiferes.sex FROM Micromammiferes WHERE (((Micromammiferes.sex)="females"));") The sql