I've installed the "directlabels" package from http://directlabels.r-forge.r-project.org/, along with its dependency "quadprog". The first example from that page works:
install.packages("directlabels", repo="http://r-forge.r-project.org")
library(lattice)
library(directlabels)
direct.label(xyplot(jitter(Sepal.Length)~jitter(Petal.Length),iris,groups=Species))
But the second example doesn't:
install.packages("ggplot2")
library(ggplot2)
data(BodyWeight,package="nlme")
p <- qplot(Time,weight,data=BodyWeight,colour=Rat,geom="line",facets=.~Diet)
direct.label(p,"first.qp")
direct.label(p,"last.qp")
I've tried running it on two computers: the work computer which is locked down and uses an older version of R (3.5.1), RStudio (1.1.463) and outdated package repository that required "quadprog" to be installed manually, and my home computer which has the latest version of R and RStudio and was able to install quadprog automatically.
Running direct.label(p,"first.qp")
at work produces
Error:
xmust be a string or a R connection
and at home produces
Error in parse(text = x) : <text>:1:2: unexpected ';'
1: ~;
.
If I just run direct.label(p)
both work and home produce
Error in switch(geom, density = "top.bumptwice", line = { :
EXPR must be a length 1 vector
. I also get this error with a basic ggplot of my own.
Is it possible to get this package working or is it just too old and poorly maintained these days?