You create an empty GRanges object by calling GRanges().
Note that growing an object in a loop with something like
interactions <- GRanges()
for (i in seq_len(N)) {
gr <- ... make some GRanges object ...
interactions <- append(interactions, gr)
}
is generally very inefficient and should be avoided.
If you know in advance how many iterations you're going to do, it is a lot more efficient to do:
interactions <- vector(mode="list", length=N)
for (i in seq_len(N)) {
gr <- ... make some GRanges object ...
interactions[[i]] <- gr
}
interactions <- do.call(c, interactions)
Alternatively, you can replace the for loop by a call to lapply() which is more elegant but does basically the same.