Copy HTML to Run R Code ExampleAbout This Page
This page displays HTML code you can use to embed a live demonstration of the R Statistics Program for political science research.
These live online examples are easy to use and are great for teaching online classes.
<!-- The Start of lineChartNominalDV.txt R Demo Code -->
<!-- Copy and paste this snippet into your web page -->
<!-- Modify border, width, and height attributes of the iframe as necessary -->
<iframe border=0 width=100% height=1200 src="https://rdrr.io/snippets/embed/?code=%23+Chapter+4%3A+Making+Comparisons%0Alibrary%28poliscidata%29++%23+Loads+R+companion+package+in+session%0A%0A%23+LINE+CHARTS%0A%0A%23+You+first+need+to+transform+the+DV.%0Anes%24envir+%3D+as.numeric%28nes%24envjob_3%3D%3D%22Envir%22%29%0Anes%24envir+%3D+100%2Anes%24envir%0A%0AplotmeansC%28nes%2C+%7Eenvir%2C+%7Epid_3%2C+envir%7Epid_3%2C+w%3D%7Ewt%2C%0A+++++++++++xlab%3D%22Party+Identification%22%2C+%0A+++++++++++ylab%3D%22Percent+Pro-Environment%22%2C%0A+++++++++++main%3D%22Percentage+Favoring+Environment+over+Jobs%2C%5Cn+by+Party+Identification%22%29"></iframe>
<!-- End of lineChartNominalDV.txt R Demo Code -->