M
Mohsen
Hello all,
I want to write the following line:
mtext(1, at=Graph, text=sprintf('%0.2f',MP$LR), line=1)
in a file (for example:Hist.R) in a function as follow:
void Graph()
{
FILE *RH=fopen("Hist.R","w");
..
..
..
fprintf(RH,"mtext(1, at=Graph, text=sprintf('%0.2f',MP$LR),
line=1)\n");
..
..
..
fclose(RH);
When I run the program, what program writes in the 'Hist.R' file
is:
mtext(1, at=Graph, text=sprintf('0.00',MP$LR), line=1)
it is '0.00' instead of '%0.2f'. Can anybody help me to solve
this problem?
Thanks,
Mohsen
I want to write the following line:
mtext(1, at=Graph, text=sprintf('%0.2f',MP$LR), line=1)
in a file (for example:Hist.R) in a function as follow:
void Graph()
{
FILE *RH=fopen("Hist.R","w");
..
..
..
fprintf(RH,"mtext(1, at=Graph, text=sprintf('%0.2f',MP$LR),
line=1)\n");
..
..
..
fclose(RH);
When I run the program, what program writes in the 'Hist.R' file
is:
mtext(1, at=Graph, text=sprintf('0.00',MP$LR), line=1)
it is '0.00' instead of '%0.2f'. Can anybody help me to solve
this problem?
Thanks,
Mohsen