Giter VIP home page Giter VIP logo

Comments (6)

choonghyunryu avatar choonghyunryu commented on June 16, 2024

@jgduenasl

plot_outlier () only performs visualization. No visualization object is returned. Therefore, the result cannot be stored in the object. and can not modify the aesthetics of the plots.

However, the following code can save the individual visualization results as an image file rather than an R object.

carseats <- ISLR::Carseats
carseats[sample(seq(NROW(carseats)), 20), "Income"] <- NA
carseats[sample(seq(NROW(carseats)), 5), "Urban"] <- NA

num_vbles <- carseats %>%
names() %>%
grep("ce|ge", ., value = TRUE)

plot_num_outliers <- function(df, ls_vbles){
df %>%
select(!!ls_vbles) %>%
plot_outlier(diagnose_outlier(.) %>%
filter(outliers_ratio >= 0.5) %>%
select(variables) %>%
unlist())
}

png("plot_outliers_%02d.png", width = 800, height = 600)
plot_num_outliers(carseats, quo(num_vbles))
dev.off()

from dlookr.

jgduenasl avatar jgduenasl commented on June 16, 2024

Thanks for the reply Choonghyunryu,

I am trying to produce an analysis report in Spanish, therefore I wish to customize the aesthetics of the plot results. Is there some way I could work with the results plot function in dlookr? or I would need to make my own customization of the plot functions in my script?

from dlookr.

choonghyunryu avatar choonghyunryu commented on June 16, 2024

@jgduenasl

customize the aesthetics of plot_outlier() only supports changing the color of the plot using col argument.

There is no way to create this function using R graphics function and save it as an object. Therefore, it must be saved as the graphic file described above.

Visualizations to be made with the ggplot2 package can be saved, but it seems unreasonable to develop plot_outlier() to the ggplot2 package version.

from dlookr.

jgduenasl avatar jgduenasl commented on June 16, 2024

Hi choonghyunryu,

I have revisited your code for generating the quality data report in /inst/report/Diagnosis_Report.Rmd. At the moment, I could adjust it to Spanish and put each diagnosis into a function to use at any moment. However, I would like to know if it is possible to generate reports in Spanish. I could work on it to integrate this possibility into dlookr. Really, I am interested in using this package intensively. Let me know what do you think.

Cheers,

Juan

from dlookr.

choonghyunryu avatar choonghyunryu commented on June 16, 2024

@jgduenasl

Hi Juan,

Currently, pdf reports only support English and Korean.
The html report will support Spanish. However, the title, chapter, subject, etc. are expressed in English, but information on data containing Spanish will work normally.

If dlookr's pdf report supports Spanish, you will need to modify the code to include latex packages that support Spanish.

This topic is closer to the domain of Latex than the domain of R.

Cheers,
choonghyunryu

from dlookr.

choonghyunryu avatar choonghyunryu commented on June 16, 2024

@jgduenasl

merge the "#24 diagnose_report() is not working"

from dlookr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.