R-loops are a class of non-canonical nucleic acid structures that typically form during transcription, when the nascent RNA hybridizes with the DNA template strand, leaving the DNA coding strand unpaired. Co-transcriptional R-loops are abundant in nature and biologically relevant. Recent research shows that DNA sequence and topology affect R-loops, and yet it remains unclear how these and other factors drive R-loop formation. In this work, we investigate the link between the secondary structure of the nascent RNA and the probability of R-loop formation. We introduce tree-polynomial representations, a mathematical object that enables accurate and efficient data analysis of RNA secondary structures. With tree-polynomial representations, we establish a strong correlation between the secondary structure of the RNA transcript and the probability of R-loop formation. We identify that branches with short stems separated by multiple bubbles in the RNA secondary structure drive the strong correlation and potentially promote R-loop formation.