Use:
cat(sprintf("Long on %s at a price of %f\n",dates[j],data[j]))
Hope it helps
mario
Tian Pan wrote:
> Hi
>
> I am having a problem with outputting text inside an if function. I have the
> following code:
>
> for (j in 20:length(bb.up))
> {
> if (up[j]==1 && up[j-1]=
Hi
I am having a problem with outputting text inside an if function. I have the
following code:
for (j in 20:length(bb.up))
{
if (up[j]==1 && up[j-1]==0)
{
sprintf("Long on %s at a price of %f",dates[j],data[j])
}
if (down[j]==1 && down[j-1]==0)
{
sprintf("Short on %s at a price of %f",d
2 matches
Mail list logo