We investigate the evolution of molecular abundances in a protoplanetary di
sk in which matter is accreting toward the central star by solving numerica
lly the reaction equations of molecules as an initial-value problem. We obt
ain the abundances of molecules, both in the gas phase and in ice mantles o
f grains, as functions of time and position in the disk. In the region of s
urface density less than 10(2) g cm(-2) (distance from the star greater tha
n or similar to 10 AU for the mass accretion rate 10(-8) M. yr(-1)), cosmic
rays are barely attenuated even on the midplane: of the disk and produce c
hemically active ions such as H-3(+) and He+. We find that through reaction
s with these ions considerable amounts of CO and N-2, which are initially t
he dominant species in the disk, are transformed into CO2, CH4, NH3, and HC
N. In the regions where the temperature is low enough for these products to
freeze onto grains, they accumulate in ice mantles. As the matter migrates
toward inner warmer regions of the disk, some of the molecules in the ice
mantles evaporate. It is found that most of the molecules desorbed in this
way are transformed into less volatile molecules by the gas-phase reactions
, which then freeze out. Molecular abundances both in the gas phase and in
ice mantles crucially depend on the temperature and thus vary significantly
with the distance from the central star. although molecular evolution proc
eeds in protoplanetary disks, our model also shows that significant amount
of interstellar ice, especially water ice, survives and is included in ice
mantles in the outer region of the disks. We also find that the timescale o
f molecular evolution is dependent on the ionization rate and the grain siz
e in the disk. If the ionization rate and the grain size are the same as th
ose in molecular clouds, the timescale of the molecular evolution, in which
CO and N-2 are transformed into other molecules, is about 10(6) yr, which
is slightly smaller than the lifetime of the disk. The timescale for molecu
lar evolution is larger (smaller) in the case of lower (higher) ionization
rate or larger (smaller) grain size. We compare our results with the molecu
lar composition of comets, which are considered to be the most primitive bo
dies in our solar system. The molecular abundances derived from our model n
aturally explain the coexistence of oxidized ice and reduced ice in the obs
erved comets. Our model also suggests that comets formed in different regio
ns of the disk have different molecular compositions. Finally, we give some
predictions for future millimeter-wave and sub-millimeter-wave observation
s of protoplanetary disks.