search for: tdate

Displaying 19 results from an estimated 19 matches for "tdate".

Did you mean: date
2012 Oct 19
4
Creating a new by variable in a dataframe
Hello, I have a dataframe w/ 3 variables of interest: transaction,date(tdate) & time(event_tim). How could I create a 4th variable (last_trans) that would flag the last transaction of the day for each day? In SAS I use: proc sort data=all6; by tdate event_tim; run; /*Create last transaction flag per day*/ data all6; set all6; by tdate event_tim; last_tran...
2012 Oct 10
3
How to replicate SAS by group processing in R
Hello, I am trying to re-code all my programs from SAS into R. In SAS I use the following code: proc sort data=upper; by tdate stock_symbol expire strike; run; data upper1; set upper; by tdate stock_symbol expire strike; if first.expire then output; rename strike=astrike; run; on the following data set: tdate stock_symbol expiration strike 9/11/2012 C 9/16/2012 11 9/11/2012 C...
2010 Sep 17
7
removing specific rows from array
I'm attempting to create an array of treatment comparisons for modelling data generation. This involves comparison of one treatment (c2) with another (c3), relative to a common comparator (c1). Attached code gives me the correct array but need to remove duplicates. Duplicates relate only to c2 and c3 such that I need to remove r3 because c2 and c3 are same as r1 with c2 and c3 swapped r5
2012 Aug 31
2
Conditional merging in R & if then statement
1)I am wandering how the following SQL statement can be written in R language w/o using sqldf: create table detail2 as select a.* from detail a, pdetail b where a.TDATE=b.TDATE and (a.STIM >= b.STIM and a.STIM <=b.MAXTIM) 2) when try if then in R it only applies to the 1st row & not to whole dataset like in SAS. How do you get round that? in SAS: data summary; set all1; if entry='a:prop' then pctexec=stkful/stocks*100; run; Thanks in...
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
...n to each dataframe based on a certain condition which is the same for all dataframes. When I extract one dataframe and apply my code it works very well as follows :- First suppose this is my first dataframe in the list > OneDF <- Mylist[[1]] > OneDF ID Pdate Tdate 1 2010-09-30 2011-05-10 2 2011-11-07 2009-09-31 3 2012-01-05 2008-06-23 To add a new column where "C" has to be written in that column only if the date in "Tdate" column is less than the first date(row) in "Pdate" column...
2018 Mar 29
1
Problem with my function using as.POSIXct
...my.bastimeToSynoptic <- function(x) { f<-unlist(strsplit(as.character(x), " ")) hr<-unlist(strsplit(f[2], ":")) if(as.numeric(hr[1])<6) { synoptic<-"00" } else { synoptic<-as.integer(as.numeric(hr[1])/6)*6 } tdate<-paste(c(f[1]," ",as.character(synoptic),":00:00"),collapse="") d<-as.POSIXct(tdate, tz="EST") return(d) } This works as expected: > my.bastimeToSynoptic("2010-12-01 14:05:00") [1] "2010-12-01 12:00:00 EST" This does no...
2015 Nov 06
2
(sin asunto)
...obteniendo y tendría que obtener: [image: Imágenes integradas 2] Pero donde pone Observation Index, me gustaria tener los meses (para esta grafica he usado indexplot), Intento con la funcion plot: wbd <- read.csv("Dades_PAC1Des96_Des08_PUNTS_DATE.csv",header=TRUE) attach(wbd) tDate <- as.Date(Mesos, "%d/%m/%Y") plot(Visits ~ tDate, wbd, xaxt = "n", type = "l") plot(asDate(Mesos), Serie01) Pero no hay manera. Alguna idea donde esta el error? Gracias! -- *Albert Montolio Aguado* ------------ próxima parte ------------ Se ha borrado un ad...
2012 Aug 29
2
Deduping in R by multiple variables
...oc sort nodupkey it in seconds by 11 variables. I tried to do the same thing in R using both the unique & then the !duplicated functions but it just hangs there & I get no output. Does anyone know how to solve this? This is how I tried to do it in R: detail3 <- [!duplicated(c(detail2$TDATE,detail2$FIRM,detail2$CM,detail2$BRANCH, detail2$BEGTIME, detail2$ENDTIME,detail2$OTYPE,detail2$OCOND, detail2$ACCTYP ,detail2$OSIDE,detail2$SHARES,detail2$STOCKS, detail2$STKFUL)),] detail3 <- unique(detail2[...
2018 Apr 15
0
Adding a new conditional column to a list of dataframes
...ame for all dataframes. > > > When I extract one dataframe and apply my code it works very well as follows :- > > > First suppose this is my first dataframe in the list > >> OneDF <- Mylist[[1]] > >> OneDF > > > ID Pdate Tdate > > 1 2010-09-30 2011-05-10 > > 2 2011-11-07 2009-09-31 > > 3 2012-01-05 2008-06-23 > > > To add a new column where "C" has to be written in that column only if the date in > > "Tdate" column is le...
2010 Mar 11
1
Group by
I have a matrix with a POSIXct as a numeric in the first column. I would like to create a new matrix that is "grouped by" my chosed time bars. i.e. So I would like to group by hour or day or 5 days, and have all my columns be summed or averaged or counted.. mydata: V1,V2,V3 10:03:13,3.4,1002 10:03:14,5.6,1001 10:05:27,7.2,999 10:05:33,8.2,998 I want to convert this into say 5
2009 Sep 02
2
Help with sub-setting data.frame
Friends I have a data frame, df that I want to extract some rows from Here is a sample of the data > head(df) TDate Expiry Underlie Strike CSettle PSettle Futures ExDate TTE 1 20080102 200801 200803 0.840 0.0000 0 0.9207 20080104 0.005479452 2 20080102 200801 200803 0.850 0.0000 0 0.9207 20080104 0.005479452 Rate Disc 1 0.0457 0.9997496 2 0.0457 0.9997496 I want all rows where T...
2012 Nov 13
1
Using lubridate to increment date by business days only
Hello, I know how to increment a date by calendar date: ticker$ldate <- ticker$tdate + days(5) How do I increment it by business days only so that week-ends are not counted? So for example friday november 2 + 5days becomes friday november 9 & not wednesday nov 7. Thanks for your help. -- View this message in context: http://r.789695.n4.nabble.com/Using-lubridate-to-increm...
2019 Jan 02
2
Solr
...or 7.5.0 ???? > > On 2019-01-02 08:12, Joan Moreau wrote: >> The real main differecne seems coming from "diffconfig.xml" >> >> When I put yours, Solr delete (!) schema.xml and create a "manage-schema" >> and starts complaining about useless types (tdates, booleans, etc..) that >> are not needed for Mail fileds >> >> When I put mine (from standard distribution of Arch), it keeps things as >> they are (yeah !), does not complains about those useless types and startup >> properly. >> >> I attach my diffcon...
2019 Jan 02
7
Solr
The real main differecne seems coming from "diffconfig.xml" When I put yours, Solr delete (!) schema.xml and create a "manage-schema" and starts complaining about useless types (tdates, booleans, etc..) that are not needed for Mail fileds When I put mine (from standard distribution of Arch), it keeps things as they are (yeah !), does not complains about those useless types and startup properly. I attach my diffconfig But these are the configurations that one should adjust...
2017 Feb 09
2
Solr 6.4.1
...ionIncrementGap="0" multiValued="true"/> <fieldType name="tdoubles" class="solr.TrieDoubleField" docValues="true" precisionStep="8" positionIncrementGap="0" multiValued="true"/> <fieldType name="tdate" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/> <fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap=&quot...
2019 Jan 02
0
Solr
...So, are you running 6.4.1 or 7.5.0 ???? On 2019-01-02 08:12, Joan Moreau wrote: > The real main differecne seems coming from "diffconfig.xml" > > When I put yours, Solr delete (!) schema.xml and create a "manage-schema" and starts complaining about useless types (tdates, booleans, etc..) that are not needed for Mail fileds > > When I put mine (from standard distribution of Arch), it keeps things as they are (yeah !), does not complains about those useless types and startup properly. > > I attach my diffconfig > > But these are the configur...
2008 Oct 08
0
Applying an R script to data within MySQL? How to?
...have data spanning multiple years, and will have to modify the SQL that gets the data accordingly. At present, my SQL statement groups records by WEEK of the year, and then I manually separate weeks in a CSV file outside the DB. Suppose I make a query like: SELECT ndays FROM xxxxxxx GROUP BY WEEK(tdate); There is no a priori of knowing just how many weeks of data there are. My reason for asking is I see information in the documentation about "dbApply(RMySQL)" which says: "Applies R functions to groups of remote DBMS rows without bringing an entire result set all at once. The resu...
2019 Jan 02
0
Solr
...nning 6.4.1 or 7.5.0 ???? > > On 2019-01-02 08:12, Joan Moreau wrote: > > The real main differecne seems coming from "diffconfig.xml" > > When I put yours, Solr delete (!) schema.xml and create a "manage-schema" and starts complaining about useless types (tdates, booleans, etc..) that are not needed for Mail fileds > > When I put mine (from standard distribution of Arch), it keeps things as they are (yeah !), does not complains about those useless types and startup properly. > > I attach my diffconfig > > But these are the configur...
2018 Dec 31
3
Solr
On 12/29/2018 4:49 PM, Joan Moreau wrote: > > Also : > > - Java is 10.0.2 > Same as me. > > - If i delete schema.xml but create only managed-schema, the solr > refuses to start with a java error "schema.xml missing" > Ok...so we need to do some more digging. How did you install Solr? (I downloaded a "binary" installation and unpacked it) How did