[R] Conditional merging in R & if then statement
ramoss
ramine.mossadegh at finra.org
Fri Aug 31 19:11:29 CEST 2012
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 advance for your help.
--
View this message in context: http://r.789695.n4.nabble.com/Conditional-merging-in-R-if-then-statement-tp4641936.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list