So I would like to create an albatros plot in RStudio, so I downloaded the metap package (https://www.rdocumentation.org/packages/metap/versions/1.11).
With the help of the description and sample code, I was able to produce a plot with my own data, see below. The studies I want to analize used different methods, and I would like to display those in different colors. E.g. Method 1 has red Datapoints, Method 2 has blue, Method 3 has green.
I cannot figure out how to make the cols parameter work, every time I input something other than NULL either the code just does not run or I get error messages. Could you guys help me out?
This is the discription of the cols parameter:
The pch parameter may either be a single value or a vector of the same length as p. It may contain anything which is legal as input to the parameter of the same name in the graphics library and will be used for the plotted points. The cols parameter works similarly.
Plot: enter image description here
My code:
albatros(Test_Albatross$p, Test_Albatross$n,
contours = list(type = “smd”, contvals = c(0.25, 0.5, 0.8), ltys = 1:3),
axes = list(ylimit = c(1,100), xlimit = 0.0001, lefttext = “Negative correlation”,
righttext = “Positive correlation”),
plotpars = list(yscale = NULL, pchs = letters[unclass(Test_Albatross$Kennung)], cols = NULL),
main = “Test2”)
My Dataset (Excel):
enter image description here
I already tried:
cols = colors[unclass(Test_Albatross$Method)]
cols = “red”
rgb, hex, values, …
Anne-Amalia Böhm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.