search for: lakkis

Displaying 20 results from an estimated 34 matches for "lakkis".

Did you mean: lacks
2005 May 25
5
precision problem
I have prices that I am finding difficult to compare with ==, > and >, due to precision. For example: the numbers should match, with '==', but they differ in the magnitude of 1e-14 due to bunch of calculations that I run on them. Programming with java, I am used to implementing a function that compares the difference between the numbers to a pre determined precision factor. This
2005 Jun 07
3
without a loop
tmp <- c(-1,NA,NA,1,1,NA,NA,1) without using a loop, how can I replace all NAs in the list above with the previous none NA value in the list?
2005 Aug 11
3
signal handling
Is ther a signal handling model in R? similar to Perl's %SIG hash. I want to do fast clean up in my R code before exit when a kill signal is issued.
2005 May 11
3
simplify loop
Is there a way to implement this faster than doing it in a loop. for (i in length(settle)-1:1) { settle[i] = settle[i+1]/(1 + settle.pct[i+1]) } I want to guarantee that i+1 is calculated before i
2005 Oct 27
3
its dates masked by chron
I built R 2.2.0 from source on my debian machine yesterday and updated all packages. My problem is that "dates" function from its, that my code heavely uses is now masked by "dates" from chron. How can I specify tehat I want to use dates from its or how can I prevent it from being masked? > library(its) Loading required package: Hmisc Hmisc library by Frank E Harrell Jr
2006 Apr 10
3
timeAlign
I use POSIXct for datetimes. Is thee a timeAlign function that I can use where : align by year direction -1 ==> start of this year direction 1 ==> start of next year align by week direction -1 ==> date on last sunday direction 1 ==> date on next sunday align by day direction -1 ==> time at past midnight direction 1 ==> time at this comming
2005 Feb 15
2
how many 7th of the month is there between two dates
This is a eaeir way to ask my prior question: I want to caculate how many an exact day of the month there is between two dates. For example; How many 7th of the month is there between "1998/12/17" and "2000/1/7". To make the problem simple, the day of the month (7) is the day in the 2nd date.
2005 May 13
2
without the loop
Can this be re-implemented to run faster (without the loop) ? r <- list() n = nrow(prices) for (i in (w+1):n) { window <- prices[(i-w):(i-1),] if (prices[i,]$settle > max(window$high)) r <- append(r, 1) else if (prices[i,]$settle < min(window$low)) r <- append(r, -1)
2005 Jun 06
2
names of functions in a library
How can I get a list of the names of all exported functions in a library? I load my library using library() and then want to dynamically get all functions that start with "test." to dynamically execute them.
2005 Apr 28
2
how to construct an empty data.frame
> r [1] open settle <0 rows> (or 0-length row.names) > class(r) [1] "data.frame" this is an empty data.frame I get back from a sql statement that returns an empty result set. How can I create such an empty data.frame using the data.frame() constructor? I want to have a data.frame with 0 rows but named empty columns. Thanks in advance for any help.
2005 Oct 06
2
isdst
Can someone, please, explain the difference is results below (notice the isdst value) > unlist(as.POSIXlt('2005-7-1')) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 1 > unlist(as.POSIXlt(as.Date('2005-7-1'))) sec min hour mday mon year wday yday isdst 0 0 0 1 6 105 5 181 0
2005 Jun 24
2
seq in R
I want to generate a sequence from 1 to x by 1 seq(1,x,by=1) I want the above to return an empty list if x is zero In other languages I can do 1:x:1 to force the increment by to be a positive 1. This syntax does not work in R. In R 1:x gives me 1 0 when x is zero, this is not what I want. The seq statement above throws an error when x is 0. How can I generate a sequence where if the
2004 Dec 13
2
read attribute
How can I get a single attribute value of an object ? I jhave the tiemSeries object > ts1 Open 2003-10-09 02:00:00 1.27 2003-10-10 02:00:00 1.25 2003-10-13 02:00:00 1.27 2003-10-14 02:00:00 1.29 When I unclass ts1 I get: > unclass(ts1) list() attr(,"Data") Open 2003-10-09 02:00:00 1.27 2003-10-10 02:00:00 1.25 2003-10-13 02:00:00 1.27
2006 May 26
2
Too many open files
This may be more of an OS question ... I have this call r = get.hist.quote(symbol, start= format(start, "%Y-%m-%d"), end= format(end, "%Y-%m-%d")) which does a url request in a loop and my program runs out of file handlers after few hundred rotations. The error message is: 'Too many open files'. Other than increasing the file handlers assigned to my process, is there
2006 Apr 10
2
seq
Can someone, please, help explain to me why the following two calls return the same set: > seq(from=as.POSIXlt('2005-12-4'), to=as.POSIXlt('2006-4-2'), by='weeks') [1] "2005-12-04 EST" "2005-12-11 EST" "2005-12-18 EST" "2005-12-25 EST" [5] "2006-01-01 EST" "2006-01-08 EST" "2006-01-15 EST"
2005 Jul 08
2
R.oo static field
How can I define a static member of a class? not a static method, rather a static field that would be accessed by all instances of the class.
2004 Dec 09
1
Finmetrics positions
Finmetrics (in S-PLUS) has teh functions "positions" (return the positions of an ordered data object). Is there an equivalent to it in Remtrics? I am applying it to teh data of a time series.
2005 Feb 23
1
RODBC type conversion bug
I run R 2.0.1 on Debian and connect to Informix database via RODBC. In the table below the column "month" is of type char(1). RODBC seems to be converting this column to boolean if the value is F or T. This is the data in my table: id month year 25 F 2005 26 Z 2005 When I select * for id 25 I get 25 FALSE 2005 When I select * for id 16 I get 26 Z
2005 May 13
1
where is aggregateSeries
What package is aggregateSeries in? It is referred to in the fCalendar document but I do not see it in the package.
2005 May 18
1
align
Is there a function in R that is similar to Splus's align? The idea is, if I have a data.frame, or an its object that is like this: 2002-01-03 5 2002-01-04 NA 2002-01-05 7 2002-01-06 NA I want to align it by the last value to this: 2002-01-03 5 2002-01-04 5 2002-01-05 7 2002-01-06 7 TITLE: Function align USAGE: align(x, pos, how, error.how, localzone,