Re: [R] Sum of column from another df based of row values of df1

2012-09-09 Thread Shivam
Just to add, I did not know that the speed of data access is so much different in matrix and dataframes. This is one for the future. Thanks again Jim :) -Shivam On Mon, Sep 10, 2012 at 3:29 AM, Shivam wrote: > Thanks a lot Jim, it works a treat. Just had to change the date format >

Re: [R] Sum of column from another df based of row values of df1

2012-09-09 Thread Shivam
Thanks a lot Jim, it works a treat. Just had to change the date format in the mCALL as well. But you saved me 80 hours of fretting and frustration. Really thankful for it. Regards, Shivam On Mon, Sep 10, 2012 at 1:33 AM, jim holtman wrote: > How about an improvement to 16 seconds. The fi

[R] Sum of column from another df based of row values of df1

2012-09-09 Thread Shivam
lass = "data.frame") > dput(VOL) structure(list(DATE = structure(c(1293993000, 1294079400, 1294165800, 1294252200, 1294338600, 1294597800), class = c("POSIXct", "POSIXt" ), tzone = ""), VOL = c(2.32666706461792e-05, 6.7916444364

[R] Query about TSRV

2012-06-14 Thread Shivam
ssing here? Can anyone point out please. Thanks and regards, Shivam __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, min

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
sequence. This was the part which I deemed as difficult to achieve. I had mentioned this issue in my previous mails but you might have missed it. Thanks again for your time :) Regards, Shivam On Mon, May 28, 2012 at 5:06 AM, Gabor Grothendieck wrote: > On Sun, May 27, 2012 at 7:03 PM, Shi

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
cond=0) hend <- new_period( hour=15, minute=30,second=0 ) mperiod <- new_period( second=1 ) numperday <- (hend-hstart)/mperiod dtms <- expand.grid( dt=pdates, tm=hstart + mperiod * seq( from=0, to=numperday ) ) dtms$dtm <- with( dtms, dt + tm ) dtms <- dtms[ order( dtms$dtm ), ]

Re: [R] Query about creating time sequences

2012-05-27 Thread Shivam
[[2]] Data: numeric(0) Index: POSIXct[1:22501], format: "2011-01-04 09:15:00" "2011-01-04 09:15:01" "2011-01-04 09:15:02" "2011-01-04 09:15:03" "2011-01-04 09:15:04" "2011-01-04 09:15:05" ... > tseq = merge.xts(seqtimes[[1]],seqtimes[[2

[R] Query about creating time sequences

2012-05-25 Thread Shivam
ut am not having much success there either. Any kind of help would be greatly appreciated. Thanks and regards, Shivam structure(list("20110103", "20110104", "20110105", "20110106", "20110107", "20110110", "20110111", "

[R] Query regarding date as argument in functions - and about sqldf

2012-05-12 Thread Shivam
t * from dlfhead where DATE = '2011-01-03'") > nrow(dlftest) [1] 0 Kindly note that in the above, the query does complete successfully with 'dlftest' created with 0 rows. When I run the select on a column with class other than date I get the output. >

Re: [R] Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:

2012-05-10 Thread Shivam
Thanks Gabor, Jim, POSIXct is working fine :) Regards, Shivam On Thu, May 10, 2012 at 5:22 AM, Gabor Grothendieck wrote: > On Wed, May 9, 2012 at 7:24 PM, Shivam wrote: > > Ohh ... Thanks Gabor. I have a few related queries then, kindly have a > look: > > > > 1. Does

Re: [R] Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:

2012-05-09 Thread Shivam
;date+timestamp', something like '2011-01-03 09:07:07' which are of class POSIXlt. I need to perform some arithmetic operations on these columns. Which class would be most appropriate for such kind of data? Thanks and Regards, Shivam On Thu, May 10, 2012 at 4:45 AM, Gabor Grothendieck wro

[R] Problem with SQLDF - Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver: (error in statement: no such table:

2012-05-09 Thread Shivam
1-05-06", "2011-05-09", "2011-05-10", "2011-05-11", "2011-05-12", "2011-05-13", "2011-05-16", "2011-05-17", "2011-05-18", "2011-05-19", "2011-05-20", "2011-05-23", "2011-05-24"

[R] Query about memory used in list and dataframe

2012-05-05 Thread Shivam
ject size increases to 1.35 GB. This was in contradiction to the earlier result. What am I missing? Why a 75% reduction in size in one case and double size in other? Anyone with any explanation? Sorry for the verbose email, just wanted to make my case clear. Thanks in advance, Regards Shivam

Re: [R] How to insert filename as column in a file

2012-04-25 Thread Shivam
. Go Live... > DCN:Basics: ##.#. ##.#. Live > Go... > Live: OO#.. Dead: OO#.. Playing > Research Engineer (Solar/BatteriesO.O#. #.O#. with > /Software/Embedded Controllers) .OO#. .OO#. rocks..

Re: [R] How to insert filename as column in a file

2012-04-24 Thread Shivam
Reposting in hope of a reply. On Tue, Apr 24, 2012 at 1:12 AM, Shivam wrote: > Thanks for the quick response. It works for an individual dataframe, but I > have many dataframes. This is the code so far > > fnames = list.files(path = getwd()) > for (i in 1:length(fnames)){ >

Re: [R] How to insert filename as column in a file

2012-04-23 Thread Shivam
to extract the date from the > filename, of course. > > -Don > > > -- > Don MacQueen > > Lawrence Livermore National Laboratory > 7000 East Ave., L-627 > Livermore, CA 94550 > 925-423-1062 > > > > > > On 4/23/12 9:29 AM, "Shivam" wrote:

[R] How to insert filename as column in a file

2012-04-23 Thread Shivam
help would be greatly appreciated. Thanks in advance, Shivam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-