brad-cannell / codebookr

Create Codebooks From Data Frames
https://brad-cannell.github.io/codebookr/
Other
25 stars 5 forks source link

vignettes not works as expected #35

Open jhk0530 opened 1 year ago

jhk0530 commented 1 year ago

Hi, thanks for building a very inspiring package.

What happened?

I tried this code as readme suggests

remotes:install_github('brad-cannell/codebookr')
library(codebookr) # install
data(study) # load 
study_codebook <- codebook(study) # build code book
print(study_codebook, "test.docx") # print as docx file

and "not finished" result created like below figure and file.

스크린샷 2022-08-23 오후 10 42 24

test.docx


Here's what I tried.

I tried to "debug" codes of package, and I checked temp file created successfully

스크린샷 2022-08-23 오후 10 59 40

and also rdocx object has them ( I checked element count has changed 6 -> 10 )

스크린샷 2022-08-23 오후 10 59 26

but after that, print(rdocx, 'test.docx') worked not properly

So maybe print function has some problem. (which I can't found)

Any suggestion will be helpful.

Thanks.

Kim

mbcann01 commented 1 year ago

Hello Kim,

Thank you for using codebookr and thank you for reaching out. I downloaded the test.docx document that you linked above. In the screenshot you attached above, it looks like you are viewing the file with the MacOS "Quick Look" feature. When I view the file with Quick Look, I get the same result.

Screen Shot 2022-08-23 at 8 35 06 PM

However, I get the desired result when I open the document in Microsoft Word.

Screen Shot 2022-08-23 at 8 36 39 PM

Have you tried opening test.docx in Microsoft Word?