Displaying 6 results from an estimated 6 matches for "kushan".
2007 Feb 14
4
How to define a multi line comment
Hi All
Is there who knows to define multi line comment? ( in Java we can define by
/* and */ )
Best Regards
Kushan Jayathilake
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this g...
2011 Feb 23
3
Using string to call/manipulate an object
...alled IBM.
Out of desperation, I have also tried:
colnames(paste(my.ticker)) <- c("open","high","low","close","vol")
colnames(as.xts(my.ticker)) <- c("open","high","low","close","vol")
Thanks
Kushan
[[alternative HTML version deleted]]
2011 Mar 10
2
using lapply
...) ) {
apply.strategy(instr.list[[i]], my.strat)
}
Is it possible to achieve this task by using one of the built in functions
in R? I have looked at lapply but can't quite figure out how to pass the
arguments.
What would be the performance implications of one method vs. the other?
Thanks,
Kushan
[[alternative HTML version deleted]]
2011 Feb 24
2
if statements on vectors
I have two vectors: both have possible values of 1,-1, or 0
trend1 <- c(1,1,1,1,1,1,-1,-1,-1,-1,-1,-1)
trend2 <- c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,)
i want to create a third vector that is conditional upon these two vectors:
if (trend2 == 1 && trend1 == 1) {position <- 1}
elseif (trend2 == -1 && trend1== -1) {position <- 1}
else {position <- 0}
based on this two
2011 Feb 11
1
if a variable is defined
I have an object type my.object. One of its slots contains a data frame
(i.e. my.object@my.data.frame) .. I want to check if one of the variables
exists in this data frame (i.e. my.object@my.data.frame$my.var)
I am trying to use the exists function but can't figure out how the
arguments work. Please help.
So far I have tried
exists(my.object@my.data.frame$my.var)
2011 Feb 10
1
accessing members from a data frame
I have a data frame with the following columns:
Date Price Buy Sell
The Buy and Sell variables are binary. They are either zero or 1.
Additionally, they are mutually exclusive. Either Buy is 1, Sell is 1 or
they are both 0. But they are never both 1 for a given observation.
I want to see observations for either either Buy == 1 or Sell ==1 (but not
the ones where Buy == 0 and Sell ==0). How can