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
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.