An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110128/b6016312/attachment.pl>
any similiar R fuction for matlab function 'fprintf'?
2 messages · Zunqiu Chen, David Winsemius
On Jan 28, 2011, at 6:23 PM, Zunqiu Chen wrote:
Dear All,
Currently, I am translating Matlab code to R. I met difficulties to
translate such Matlab codes into R:
fprintf(fid,(' SPLITTING RESULTS '));
fprintf(fid,(' \n'));
fprintf(fid,' Data base to analyze is a matrix %4i x %2i ',[n m]);
fprintf(fid,' \n');
fprintf(fid,' h is %2i',h);
fprintf(fid,' \n');
fprintf(fid,' group=0 outlier.\n');
fprintf(fid,' group=-1 discriminator or observation removed by the
rules.\n');
fprintf(fid,' \n');
Does anyone happen to know if R has similar function as fprintf in
Matlab?
Don't know any Matlab, but you should look at: ?cat ?sprintf ?format ?formatC And in the future, why not provide an English description of what you are hoping for? Also may want to consult: http://cran.r-project.org/doc/contrib/Hiebeler-matlabR.pdf
David Winsemius, MD West Hartford, CT