Displaying 20 results from an estimated 3000 matches similar to: "Checking dates for entry errors"
2011 Nov 07
2
Problem working with dates
Hello All,
I've been reading books about R for awhile now and am in the process of replicating the SAS analyses from an old report. I want to be sure that I can do all the things I need to in R before using it in my daily work.
So far, I've managed to read in all my data and have done some data manipulation. I'm having trouble with fixing an error in a date variable though, and was
2013 Apr 30
0
performance issue with as.Date
We encounted a performance problem when a large number of R scripts are run simulatanously. A large number of stat() system calls to /etc/timezone was limiting how many scripts could be run effectively. I traced the problem to as.Date.character where strptime() is called without a timezone argument when there is no format argument.
as.Date.character <- function(x, format="", ...)
{
2010 Dec 10
1
importing date vector with read.table
Hi,
I understand this should be an easy task but I am still struggling a bit to
read a .txt file with a date vector. My code is as below:
data<-read.table(file.choose(),header=TRUE,sep="\t",dec=",",colClasses=c("Date","numeric","numeric","numeric"))
But I am getting an error:
Error in charToDate(x) :
character string is not in a
2012 Jun 07
1
factor coercion with read.csv or read.table
How do I fix this error ? I tried coercion to a vector but that didn't work.
msci <-read.csv("..MSCIexUS.csv", header=TRUE)
head(msci)
Date index
1 Dec 31, 1969 100
2 Jan 30, 1970 97.655
3 Feb 27, 1970 96.154
4 Mar 31, 1970 95.857
5 Apr 30, 1970 85.564
6 May 29, 1970 79.005
> str(msci)
'data.frame': 510 obs. of 2 variables:
$ Date : Factor w/ 510
2011 Jun 01
2
Problems Dating....
I'm trying to convert a column in a data frame with dates from a
"Factor" type to a "Date Object" but I am encountering and error. (I am
having trouble plotting an x,y scatter and I suspect it's something with
my data format). I have a table with two columns and 8,000 rows.
> dsort=read.delim("C:\\Documents and Settings\\E066582\\My
2011 Jun 24
2
SQL Changing Data Type
Passing in two dates to a sql statement (sqldf). Is returning a factor. Tried
setting back to a Date via as.Date, but get an error the error: character
string is not in a standard unambiguous format. Any thoughts appreciated.
Code/Results listed below:
> summary(df.possible.combos)
Date Hour
Min. :2011-03-01 Min. : 0.00
1st Qu.:2011-03-23 1st Qu.: 5.75
2011 Jul 26
2
How to use as.Date (or something else) with "31-Jul-2010 23:59:00"
Hello
I have a huge file (not an R-file) in which the first column is a string
with date, hour, minutes and seconds (For instance, "31-Jul-2010 23:59:00").
I tried as.Date but the error msg was "Error in charToDate(x) :
character string is not in a standard unambiguous format".
I have checked the help for the function as well as date but to no avail.
How can that sort
2009 Apr 16
0
Printing data as a narrative or form letter rather than as a table
How would one print the information in a table without having to view it as
a table? I have a dataframe with about 30 columns and 50 rows. About 7 rows
contain human subjects where something is just not right and I need to
manually work out what is going on with them and maybe even call them to
ensure we have the data correct. It is really inconvenient to view the 7
patients in a table. Instead, I
2012 Jul 11
3
unable to subtract dates in R
Hi,
I wanted to calculate the age of people in my dataset by subtracting the
individual's date of birth from their intake into a program.
After several hours, searches of help archives, and the downloading of
lubiridate, I have had no luck with this.
Below is the code I used.
> intakeDS$DOB <- as.character(intakeDS$DOB)
> intakeDS$DOB <- as.Date(intakeDS$DOB,
2010 Feb 23
1
Problem with strptime generating missing values where none appear to exist
Dear R Helpers,
I am having difficulty with strptime. I wish to find the differences between
two vectors of times. I have apparently no difficulty to convert the vectors
to the appropriate format using strptime. But, then difftime does not
calculate all the differences.
Here is the code and output:-
dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100
2006 Jan 25
0
Another crack at age calculations
I cobbled this together based on a few previous posts and some tinkering,
nothing fancy (my first bit of Ruby infact) but it seams to work for my
purposes.
My questions is actually why can I call <%= h(child.age(child.dob)) %> in a view
but not <%= h(child.age_year_month(child.dob)) %>? Both work fine in the
console.
Thanks for any insight,
Hugh
child.rb
class Child < Person
2010 Feb 23
0
subtracting 100 from strptime year vector generates missing values in POSIXct where none appear to exist in strptime year vector
Thanks Don MacQueen for this reply to my initial query - please SEE MY REPLIES TO THESE IDEAS AND FURTHER INFORMATION BELOW
>From: Don MacQueen [macq at llnl.gov]
>Sent: 23 February 2010 21:25
>To: Jonathan Williams; r-help at r-project.org
>
>Subject: Re: [R] Problem with strptime generating missing values where none appear to exist
>
>What happens if you do all that NA
2009 Nov 25
3
Feature request for as.Date() function
Hello -
I have a csv file with a few date columns. Some of the records have an
"NA" character string instead of the date. When I attempt to use
read.csv() and typecast the columns using colClasses, I receive the
following error:
Error in charToDate(x) :
character string is not in a standard unambiguous format
Similarly, the following command produces the same error:
2006 Jun 13
0
date_select and date validation
Hi,
I''ve put together a simple form that contains among other things a
date_select:
<%= date_select(:user, :dob, :order => [:day, :month, :year],
:start_year => 1900, :end_year => Date.today.year) %>
In my controller I have some code to create a user entity from the
parameters posted up from the form, like so:
parameters:
2001 Oct 15
0
date and chron library help...!
Dear all,
I'm not sure whether this is a bug or not... But some help would be greatly appreciated.
I have a dataframe, which I read in using read.xport (from the foriegn library) as the orginal data is in SAS format.
3 columns of this dataset are supposed to be dates, but read.xport doesn't recognise them as dates (all columns are read in as mode numeric). So I load up the date library
2011 Jan 26
2
applying a set of rules to each row
All,
I would like to apply a set of rules to each row of the sample data set
below. The rule sets are the guidelines for determining an individual's
date for retirement eligibility. The rules are found in this document,
http://www.opm.gov/feddata/RetirementPaperFinal_v4.pdf. I am only
interested in the top two categories for retirement eligibility, the
CSRS and FERS plans.
The data set has
2011 Sep 25
4
checkbox use question
Hi,
how can I use checkbox in a form to show all customers from table
customers,
Course Users Customers
========= ========= =============
user_id customer_id Customer_name
I would like to select customers from the checkbox list, then add to the
course table only users of the selected customers.
thanks dani
--
Posted via http://www.ruby-forum.com/.
--
You received
2012 Jan 11
0
Error in charToDate(x)
Dear all,
I have a problem while working with hourly data of fx rates. I've read from
a csv file, the following way:
csv-file like:
Date,Open,High,Low,Close,Volume
2011-08-11 03:00:00,1.41758,1.42205,1.41625,1.42174,8974
...
2011-08-12 04:00:00,1.42175,1.42413,1.42067,1.42172,7229
...
2011-12-30 05:00:00,1.42173,1.42341,1.42062,1.42171,6703
...
raw<-
2012 Nov 06
1
pivot table
Hello,
I have a data which looks like below: Some of the patients have multiple diagnosis.
ID(200 patients) Diag (100 unique Diag-200 in general) Proc (50 uniqe Proc) DOB (200) Gender (200)
a daig1
b diag2
c diag1
I want to reformat this data to :
ID diag1 diag 2 diag 3.. diagx proc1 proc2
2016 Mar 16
2
GSoC 2016 Project: Implement Bindings for R
On Wed, Mar 16, 2016 at 12:09:01AM +0530, Amanda Jayanetti wrote:
> Seems like it takes a lot of time for 'proof of enrollment' document to get
> processed. Will upload the proposal as soon as it gets accepted.
You should be able to upload a proposal while the proof of enrollment is
still awaiting review.
Cheers,
Olly