Let K be a finite field and let X* be an affine algebraic toric set parameterized by monomials. We give an algebraic method, using Gröbner bases, to compute the length and the dimension of CX* (d), the parameterized affine code of degree d on the set X*. If Y is the projective closure of X*, it is shown that CX* (d) has the same basic parameters that CY (d), the parameterized projective code on the set Y. If X* is an affine torus, we compute the basic parameters of CX* (d). We show how to compute the vanishing ideals of X* and Y.