[R] any similiar R fuction for matlab function 'fprintf'?
David Winsemius
dwinsemius at comcast.net
Sat Jan 29 00:30:17 CET 2011
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
More information about the R-help
mailing list