2

In the help page of the psych package, it says that I can pass more graphic parameters to the outlier() function. My syntax is really simple and as follows:

outlier(na.omit(data[,51:56]), plot = TRUE, main = 'my title')

This returns: Error in plot.default(sx, sy, xlab = xlab, ylab = ylab, ...) : formal argument "main" matched by multiple actual arguments. I have the feeling this means that the function tries to have the default title (by the psych package) as well as the title I give (i.e. my title).

Is there a way to overwrite this or fix it? Or probably I am doing something that needs to be fixed.

Reproducible example

A <- floor(runif(30, 1,5))
B <- floor(runif(30, 1,5))
C <- floor(runif(30, 1,5))
D <- floor(runif(30, 1,5))
E <- floor(runif(30, 1,5)) 
f <- floor(runif(30, 1,5))

sample.data <- data.frame(A, B, C, D, E, f)

outlier(sample.data, plot = TRUE, main = 'my title')
Anonymous
  • 502
  • 4
  • 23
  • 1
    It's very hard to guess what causes the issue. Please provide [example data](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610) in order to make your issue reproducible! – jay.sf Jul 14 '18 at 08:04
  • 1
    Sorry, you're right. Please see the edited question for an example. – Anonymous Jul 14 '18 at 08:12

1 Answers1

2

I clear the color of title. Hope to solve your problem.

outlier(sample.data, plot = TRUE, col.main = NA)
title("My Title")
Darren Tsai
  • 32,117
  • 5
  • 21
  • 51