You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently writing a book with CRC Press, and I found a lot of advice in your posts and books. Thank you!!!
Recently I had a problem with R output too wide for the CRC PDF format. I followed your advice from Chapter 5.3.;
options(width) was not respected (you described this in your book)
I did not dare to use the listings package because I was afraid it might impact other parts of my book.
So, I came up with a hack that might be useful for others (or not :) );
library(tidyverse)
print(str(diamonds)) #Output too wideWideOutputVector=capture.output(str(diamonds))
NarrowOutputVector=strtrim(WideOutputVector, 30)
cat(NarrowOutputVector,sep="\n")
I thought it might help somebody who has a similar problem as I had.
Best,
Carsten
……………………………………………..
Carsten Lange, Ph.D.
Professor of Economics and Graduate Coordinator
California State University
3801 West Temple Ave.
Pomona, CA 91768
Phone: +1 (909) 869 3843
Email: [email protected]
The text was updated successfully, but these errors were encountered:
Hi Yihui,
I am currently writing a book with CRC Press, and I found a lot of advice in your posts and books. Thank you!!!
Recently I had a problem with R output too wide for the CRC PDF format. I followed your advice from Chapter 5.3.;
So, I came up with a hack that might be useful for others (or not :) );
I thought it might help somebody who has a similar problem as I had.
Best,
Carsten
……………………………………………..
Carsten Lange, Ph.D.
Professor of Economics and Graduate Coordinator
California State University
3801 West Temple Ave.
Pomona, CA 91768
Phone: +1 (909) 869 3843
Email: [email protected]
The text was updated successfully, but these errors were encountered: