In this paper, we study an opportunistic subchannel scheduling problem for the relay-based OFDMA cellular network where relay stations (RSs) can perform opportunistic network coding with downlink and uplink sessions of a mobile station (MS). In wireless networks, network coding is one of promising techniques to improve network performance in various aspects. However, previous studies did not provide optimal opportunistic resource allocation solutions for the OFDMA networks with network coding-aware RSs as well as they did not consider practical duplexing schemes for the transmission of network coded data. In this paper, to allow network coding with downlink and uplink sessions at RSs, we consider a time-division duplexing (TDD) based time-slot structure. We formulate a stochastic optimization problem to maximize the average weighted-sum rate for both downlink and uplink sessions. Then, by solving the problem, we provide an optimal opportunistic subchannel scheduling algorithm that can opportunistically use network coding with considering time-varying channel states.