strengejacke / sjmisc

Data transformation and utility functions for R

Home Page:https://strengejacke.github.io/sjmisc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Would there be any way to set encoding argument for frq() function?

jooyoungseo opened this issue · comments

Hello,

I was using sjt.frq() function of sjPlot package which is now deprecated.
There was a way to set encoding at that time by using "encoding" argument; however, I was not able to find any equivalent parameter out of sjmisc::frq() function.
Since my dataset labels are encoded as "CP949," the
output in both browser and viewer do not display the label content correctly.
On top of this question, I was also wondering if there would be any way to save the frq() object as an excel file as the sjt.frq() function had file argument for this job.
Of course, I could achieve this by feeding the data.frame object taken from the frq() function through xlsx::write.xlsx() function; however, it does not contain the very last row that explains total N, missing and valid values.
In sum, I would like to have the following additional argument for the current sjmisc::frq() function:

  1. encoding for setting custom encoding.
  2. file for saving the frequency table as xlsx file.

Your consideration would be greatly appreciated.