search for: reportdate

Displaying 5 results from an estimated 5 matches for "reportdate".

2017 Sep 11
4
Case statement in sqldf
Hi all, I am trying to create a new variable called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . Please advise me as to how I can do this mutation. library(zoo) library(lubridate) library(stringr) library(RH2) library(sqldf) cr$ReportDate = as.Date(cr$ReportDate, format ='%Y-%m-%d') > cr2 = sqldf(" select ReportDate + , case + when ReportDate between '2012-04-01' and '2013-03-31' + then '2012_13' +...
2017 Sep 11
0
Case statement in sqldf
...as the number of days since 1970-01-01 -- corresponds to a particular character string; however, the H2 database does have date types. See FAQ #4 on the sqldf github home page for more info. https://github.com/ggrothendieck/sqldf ) This works: library(sqldf) library(RH2) cr <- data.frame(ReportDate = as.Date("2017-09-11")) # input cr2 = sqldf(" select ReportDate , case when ReportDate between '2012-04-01' and '2013-03-31' then '2012_13' when ReportDate betwee...
2017 Sep 11
0
Case statement in sqldf
...able called Fiscal Year (FY) using case expression in sqldf and I am getting a null FY , see the code below . > > Please advise me as to how I can do this mutation. > > library(zoo) > library(lubridate) > library(stringr) > library(RH2) > library(sqldf) > > cr$ReportDate = as.Date(cr$ReportDate, format ='%Y-%m-%d') > >> cr2 = sqldf(" select ReportDate > + , case > + when ReportDate between '2012-04-01' and '2013-03-31' > + then '2012_13' &...
2010 Nov 05
1
as.xts
hey I am trying to turn a dataframe into xts with the function: as.xts, but it returns the error: Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format could someone give me some pointers please the data is coming from a spreadsheet via the excel, and has 5 columns of data (date (with the date and time), open, high, low, close) (excel format) ela
2013 Feb 15
1
Suggestion: Custom filename patterns for non-Sweave vignettes
Hi, as far as I understand it, the new R devel feature of processing non-Sweave vignettes will (a) locate any "[.][RrSs](nw|tex)$" or ".Rmd" files, (b) check for a registered vignette engine, (c) process the file using the registered "weave" function, (d) and possibly post process the generated weave artifact (e.g. a *.tex file). I'd like to propose to extend