Calculate Square Roots in PHP

To find the nth root of a number in PHP, we can use the pow(base, power) function, for example the cube root of 27 is equal to 27 raised to the power of 1/3, \(\sqrt[3]{27} = 27^{1/3}\), since \(3^3=27\). In general the nth root of x, \(\sqrt[n]{x}=x^{1/n}\). To calculate the square root of a number, … Read more

Categories PHP

Save plots in R to .png files

This tutorial explains how to save a chart as an png image file using R. Have you generated a chart in R which you want to save as an image, simply for posterity or because you want to use in a document or presentation? For an example, we can use the example data set faithful in the MASS package to produce … Read more

Categories R

How to use MINIFS in Excel

You’ll likely be familiar with the MIN function for taking the value of a range: MIN(A1:A5) will return the minimum value in cells A1:A5.  If you need to take a conditional minimum, which applies to only some of the values in that range, without splitting your data up, then the Excel MINIFS function is what … Read more