Help with box plot

Hi

I am new to R studio and need some help.
I have 3 column of data: Column1, Column2 and Column3

I tried to do a boxplot and it works for Column1 but when I added the other two column, I have error.
Here is the code, will appreciate if you can provide some help.

boxplot(log10(df$ Column1))   #### This works and I am able to get the boxplot.
boxplot(log10(df$Column1,df$Column2,df$Column3))  ### This is giving the following error

###ERROR CODE####
Error in log10(df$Column1,df$Column2,df$Column3)) ) : **
** 3 arguments passed to 'log10' which requires 1

I tried the following as well.
#boxplot(log(df[,c(' Column1',' Column2',' Column3')])) ####Seems to be working
#boxplot(log10(df[,c(' Column1',' Column2',' Column3')])) ### It gaves this error NaNs producedNaNs produced

If you only have the 3 columns in your dataframe, this should work:

boxplot(log10(df))

If you have more than the 3, you can do something like this:

boxplot(log10(df[c('Column1', 'Column2', 'Column3')]))
1 Like

Thank you. It works. :grinning: