How to make multiple bar graphs for factors in R
I would love to make a figure like what I have for my numeric features
hist(df[ , purrr::map_lgl(df, is.numeric)])
If I try to do the same thing with factors
hist(df[ , purrr::map_lgl(df[,interest_factors], is.factor)])
I get
Any suggestions? I just want to quickly view them
Thanks
See also questions close to this topic

How to draw a response surface plot for three factorial design?
I have created a three factorial design with two levels (Low & high) using Rstudio. My factors are:
 Type of catalyst (T300 coded as 1, TG300 coded as +1) (Categorical)
 Loading of TiO2 (0.1 g/L coded as 1, 1.0 g/L coded as +1) (Numerical)
 Hydrogen peroxide dose (2.5 mL coded as 1, 10 mL coded as +1) (Numerical)
Outcome variable is "
% Degradation of Gallic acid
"My prediction model is:
water < lm(y ~ C + S + T + C*T + C*S + S*T + C*T*S)
or
C < T < S < c(1, +1) design < expand.grid(C=C, T=T, S=S) C < design$C T < design$T S < design$S y < c(50, 46, 39, 36, 75, 73, 52, 55)
My question is how to draw a response surface plot for my model?

R Shiny: slickR select event
The slickR package has a
focusOnSelect
option  when clicking on an image in the carousel, it is highlighted. How can I access the selection event to use in R Shiny to trigger other actions? Specifically, I want to click on an image and have it update a textbox with the image name.To use the example below, put 3 images (image1.jpg, image2.jpg, image3.jpg) in the same directory as the app.
library(shiny) ui < shiny::basicPage( slickROutput("my_slick",width='100%',height='200px') ) server < function(input, output) { output$my_slick < renderSlickR({ my_images < c("image1.jpg", "image2.jpg", "image3.jpg") slickR( my_images, slideId = 'slick_images', width='90%' ) }) } shinyApp(ui, server)

fix() error with XQuartz cannot be solved
I was following this extremely easy example from ISLR book,
I used fix() for the first time (I usually just used head()), and I got the first error... I followed the error and went to xquartz.macosforge.org and installed it, and then I got the second error "X11 dataentry cannot be loaded"
I thought fix() was part of base... why I am I getting two different errors? Why is XQuartz needed for an R base function?

R compare group to full sample
Sample data
df < data.frame("id"=c(1,2,3,4,5), "group"=c(0,0,1,1,1), "score"=c(10,14,15,13,12))
My goal is to compare the scores for group = 1 to the complete sample.
I figured how to do the t test:
t.test(df$score ~ df$group)
But is this for group = 1 versus group = 0?

Compare a growth curve with its asymptote in r?
I want to find the point where the growth is statically equal to its asymptote.
# Create Data Conc < c(0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000, 0.03125, 0.06250, 0.12500, 0.25000, 0.50000, 1.00000) Response < c(167.11246201, 53.96960486, 128.42857143, 43.67173252, 4.51975684, 0.34042553, 120.10334347, 101.14589666, 155.17629179, 35.31306991, 8.56534954, 1.71124620, 146.34954407, 108.50151976, 163.60182371, 64.70212766, 2.88145897, 0.50759878, 82.92401216, 109.80547112, 116.69300912, 26.85410334, 3.01519757, 0.37386018, 87.06990881, 84.82978723, 118.36474164, 27.52279635, 2.34650456, 0.10638298, 89.47720365, 109.47112462, 85.43161094, 17.69300912, 2.31306991, 0.07294833) #Model df < data.frame(Conc = Conc, Response = Response) library(drc) drm < drm(Response ~ Conc, data = df, fct = LL.4()) plot(drm) asymptote < coef(drm)[3] abline(asymptote, 0)
I'm trying to do an anova with the model and its asymptote, without sucess...

Multivariate Normality Assumption in Regression
Does Multivariate Normality assumption in Linear Regression refer to normality among all subsets of the predictor variables or normality of the residuals ?
Do all combinations of predictor variables and each predictor variable itself have to be normal or is it just a way of improving the chances of the residuals being normal upon fitting the model ?
I understand its a very basic question, but some clarity will help clear some confusions I have.
Thank You

Arranging k letters without repetition 2 at a time up to k at a time. (Design of Experiments related problem)
I'm trying to generate all possible arrangements 2 at a time up to k at a time of k letters. Here's an example:
ABCD would generate AB, AC, AD, BC, BD and CD (2 at a time); ABC, ABD, ACD and BCD (3 at a time); and ABCD (4 at a time).
The algorithm I'm trying to build tries to generate all those columns from the initial given sequence of letters (I it must work for any size of sequence, such as ABCD, ABCDE, ABCDEF, etc)... building the combinations up to k at a time.
Does anyone know how to properly address this problem? I'm not too familiar with combination algorithms so I suspect this might be a classic problem with a classic solution. I'm trying to implement it in VBA since I'll print out all the columns generated from the initial sequence of letters in a spreadsheet.
Thank you all,

Is there algorithm to identify the False positive in code static analysis?
Is there algorithm for identify or find false positive in code static analysis report? how we could know this error is false positive? I need algorithm or way not check by person. please if somebody know please help me.thank you

Error occurs when fitting time series data in GARCH model using rugarch package
I want to analyze the GARCH effect on Bitcoin daily returns from 2015 to 2018 using rugarch package. I imported the data from a csv file using zoo package, and the header of my data (BTC_Return) looks like this:
20150102 20150103 20150104 20150105 20150106 20150107 0.001015636 0.093303963 0.081262425 0.037516428 0.026674925 0.031626936
And when I tried to fit the data in GARCH(1,1) model, this error occurred under Weighted ARCH LM Tests section: "Error in if (frequency > 1 && abs(frequency  round(frequency)) < ts.eps) frequency < round(frequency) : missing value where TRUE/FALSE needed". Here is the code that I used:
> library(zoo) > BTC_Return < read.zoo('BTC_Data.csv', header = TRUE, sep = ",", index.column = 1, format = "%Y/%m/%d") > class(BTC_Return) > BTC_Return_garch11_spec < ugarchspec(variance.model = list(garchOrder = c(1,1)), mean.model = list(armaOrder = c(0,0))) > BTC_Return_garch11_fit < ugarchfit(spec = BTC_Return_garch11_spec, data = BTC_Return) > BTC_Return_garch11_fit ** * GARCH Model Fit * ** Conditional Variance Dynamics  GARCH Model : sGARCH(1,1) Mean Model : ARFIMA(0,0,0) Distribution : norm Optimal Parameters  Estimate Std. Error t value Pr(>t) mu 0.001887 0.000717 2.6322 0.008484 omega 0.000024 0.000007 3.3136 0.000921 alpha1 0.142601 0.019727 7.2289 0.000000 beta1 0.856399 0.018160 47.1585 0.000000 Robust Standard Errors: Estimate Std. Error t value Pr(>t) mu 0.001887 0.000766 2.4628 0.013786 omega 0.000024 0.000017 1.3863 0.165640 alpha1 0.142601 0.041243 3.4576 0.000545 beta1 0.856399 0.041346 20.7129 0.000000 LogLikelihood : 2685.051 Information Criteria  Akaike 3.9254 Bayes 3.9101 Shibata 3.9254 HannanQuinn 3.9197 Weighted LjungBox Test on Standardized Residuals  statistic pvalue Lag[1] 5.321 0.02107 Lag[2*(p+q)+(p+q)1][2] 5.997 0.02203 Lag[4*(p+q)+(p+q)1][5] 7.863 0.03187 d.o.f=0 H0 : No serial correlation Weighted LjungBox Test on Standardized Squared Residuals  statistic pvalue Lag[1] 5.192 0.02269 Lag[2*(p+q)+(p+q)1][5] 7.363 0.04230 Lag[4*(p+q)+(p+q)1][9] 8.637 0.09635 d.o.f=2 Weighted ARCH LM Tests  Error in if (frequency > 1 && abs(frequency  round(frequency)) < ts.eps) frequency < round(frequency) : missing value where TRUE/FALSE needed
I'm a complete beginner in R, so I don't understand why this problem would occur. Can anyone help me fix this problem? Thanks!