BN Learn _ Error: unused argument (ignore.cycle = TRUE)

Hi,
I am very new to R. I am trying to follow this exercise but I always get an error at the end. Please I need some help as to why is it an unused argument and how can I correct it.
Please find the R-code below:

> library(bnlearn)
> data(marks)
> str(marks)
'data.frame':	88 obs. of  5 variables:
$ MECH: num  77 63 75 55 63 53 51 59 62 64 ...
$ VECT: num  82 78 73 72 63 61 67 70 60 72 ...
$ ALG : num  67 80 71 63 65 72 65 68 58 60 ...
$ ANL : num  67 70 66 70 70 64 65 62 62 62 ...
$ STAT: num  81 81 81 68 63 73 68 56 70 45 ...
> ug = empty.graph(names(marks))
> arcs(ug, ignore.cycles = TRUE) = matrix(
+     c("MECH", "VECT", "MECH", "ALG", "VECT", "MECH",
+     "VECT", "ALG", "ALG", "MECH", "ALG", "VECT",
+     "ALG", "ANL", "ALG", "STAT", "ANL", "ALG",
+     "ANL", "STAT", "STAT", "ALG", "STAT", "ANL"),
+ ncol = 2, byrow = TRUE,
+ dimnames = list(c(), c("from", "to")))
Error in `arcs<-`(`*tmp*`, ignore.cycles = TRUE, value = c("MECH", "MECH",  : 
 unused argument (ignore.cycles = TRUE)