Python List A list is a sequence of values (similar to an array in other programming languages but more versatile) The values in a list are called items or sometimes elements. The important properties of Python lists are as follows: Lists are ordered – Lists remember the order of items inserted. Accessed by index – Items in a list can …
Day: May 11, 2021
Python Comments You can use comments to include non-executable text in your code, as a note or reminder to yourself. Comments are ignored by the Python compiler when your code is compiled. Single-line Comments To write a comment in Python, simply put the hash character # before your comment. Python ignores everything after the # and up to the …
Python Operators Operators are used to perform operations on values and variables. The Python operators are classified into seven different categories: Arithmetic operators Assignment operators Comparison operators Logical operators Identity operators Membership operators Bitwise operators Arithmetic Operators Arithmetic operators are used to perform simple mathematical operations on numeric values (except complex). Operator Meaning Example + Addition …
R Scatter Plot – ggplot2 A scatter plot is a graphical display of relationship between two sets of data. They are good if you to want to visualize how two variables are correlated. That’s why they are also called correlation plot. Create a Scatter Plot To get started with plot, you need a set …
R Quantile-Quantile (QQ) Plot – Base Graph Sometimes it’s important to know whether the data is normally distributed. A quantile-quantile plot (QQ plot) is a good first check. It shows the distribution of the data against the expected normal distribution. If the data is normally distributed, the points fall on the 45° reference line. If …
R Pie Chart – Base Graph A Pie Chart is a special chart that shows relative sizes of data using pie slices. They are good if you are trying to compare parts of a single data series to the whole. The pie() function In R, you can create a pie chart using the pie() function. It has …
R Histogram – Base Graph A Histogram is a graphical display of continuous data using bars of different heights. It is similar to a bar graph, except a histogram groups the data into bins. The height of each bar shows the number of elements in the bin. They are a great way to display the …
R Box-whisker Plot – Base Graph The box-whisker plot (or a boxplot) is a quick and easy way to visualize complex data where you have multiple samples. A box plot is a good way to get an overall picture of the data set in a compact manner. The boxplot() function You can use the boxplot() function to …
R Scatter Plot – Base Graph A scatter plot is a graphical display of relationship between two sets of data. They are good if you to want to visualize how two variables are correlated. That’s why they are also called correlation plot. The plot() function The basic plot() function is a generic function that can be used …
R plot() Function An effective and accurate data visualization is an important part of a statistical analysis. It can make your data come to life and convey your message in a powerful way. R has very strong graphics capabilities that can help you visualize your data. The plot() function In R, the base graphics function …