In principle, your approach should work, I have used it with success to compute residual errors over edges. w should be defined as a TestFunction, and I would put "2*avg(w)" in the assembly statement, since as I understand it you want to count every inner edge twice. Also, your last line seems a little suspect to me. You may assemble into your DG function by using
assemble(..., tensor=store.vector())
This example code works for me:
from dolfin import *
mesh = UnitSquareMesh(2,2)
DG = FunctionSpace(mesh, 'DG', 0)
store = Function(DG)
w = TestFunction(DG)
R = Constant(1.0)
assemble(2*R*avg(w)*dS + R*w*ds,store.vector())
plot(store,interactive=True)
To compute the (global) L^{\infty} norm of a Function, you may use
norm(function, 'linf')
If it is not a Function but some ufl Expression, you can interpolate it to a function first.
A question back to you: How do you write LaTeX??
EDIT: I just noticed that my usage of the norm function was wrong, it should rather be
norm(function.vector(), 'linf')