I believe you are just making a typo, have in mind that code shown in your tutorial is not in a "copy & paste" friendly format, you have to manually remove the "+" symbols of the left margin.
I runed this code and it worked normally:
library(twang)
set.seed(1)
data(lalonde)
ps.lalonde <- ps(treat ~ age + educ + black + hispan + nodegree + married + re74 + re75,
data = lalonde,
n.trees=5000,
interaction.depth=2,
shrinkage=0.01,
perm.test.iters=0,
stop.method=c("es.mean","ks.max"),
estimand = "ATT",
verbose=FALSE)