Nizamuddin Siddiqui

Nizamuddin Siddiqui

1,958 Articles Published

Articles by Nizamuddin Siddiqui

Page 170 of 196

How to visualize the normality of a column of an R data frame?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 215 Views

The first step to analyze a variable is checking whether it is normally distributed or not and to visually do this, we create a histogram. If the histogram depicts a bell then we consider that the variable is normally distributed otherwise, it is not. We can create a histogram for any column of an R data frame by using hist function.ExampleConsider the below data frame −set.seed(9) df

Read More

How to create a new data frame for the mean of rows of some columns from an R data frame?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 966 Views

Finding row means help us to identity the average performance of a case if all the variables are of same nature and it is also an easy job. But if some of the columns have different type of data then we have to extract columns for which we want to find the row means. Therefore, we can create a new data frame with row means of the required columns using rowMeans function.Example Live DemoConsider the below data frame −set.seed(88) Group

Read More

How to add or multiply each element of a matrix to the corresponding element of another matrix in R, if these matrices are stored as a list?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 210 Views

Basic mathematical operations such as addition, subtraction, multiplication, and division are common for matrices and we often do that but if the matrices are stored as a list in R then these basic calculations are done differently as they are not direct objects. To add or multiply the matrices in a list, we can use Reduce function with the plus (+) or multiply (*) sign and the list name.Example Live DemoConsider the below list of matrices −Matrices_List

Read More

How to create a line chart for a subset of a data frame using ggplot2 in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 674 Views

Subsetting is not a difficult thing in R but if we make our code short then it is a little tedious task because we will have to introduce code between codes and that creates confusion. Therefore, we must be very careful while writing a code inside another code. To create a line with subsetting the data frame using ggplot function of ggplot2 can be done by using subset function.Example Live DemoConsider the below data frame −set.seed(99) x1

Read More

How to create a Venn diagram in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 504 Views

A Venn diagram helps to identify the common and uncommon elements between two or more than two sets of elements. This is also used in probability theory to visually represent the relationship between two or more events. To create a Venn diagram in R, we can make use of venn function of gplots package.ExampleConsider the below vectorsx

Read More

How to find monthly sales using date variable in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 509 Views

Sales analysis requires to find monthly sales mean, total, range, and often standard deviation. This is mostly required by FMCG (Fast-Moving Consumer Goods) companies because they want to track their sales on daily basis as well as monthly basis. If we have daily sales data then we need to create another column for months in an R data frame to find the monthly sales and this can be done with the help of strftime and aggregate function.ExampleConsider the below data frame −date

Read More

How to add a month to a date in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 21-Aug-2020 758 Views

We have to deal with date data in time series analysis, also sometimes we have a time variable in data set that is recorded to perform another type of analysis. Depending on our objective, we need to process the data and the time variable is also converted into appropriate form that we are looking for. If we want to create a sequence of months from date data then we can do it by adding a month to each upcoming month. This can be easily done by using AddMonths function of DescTools package.ExampleInstalling DescTools package −install.packages("DescTools") Loading DescTools package: library(DescTools) AddMonths(as.Date('2020/01/31'), ...

Read More

How to create a vector with zero values in R?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 20-Aug-2020 691 Views

In data analysis, sometimes we need to use zeros for certain calculations, either to nullify the effect of a variable or for some other purpose based on the objective of the analysis. To deal with such type of situations, we need a zero value or a vector of zeros. There are many ways to create a vector with zeros in R. The important thing is the length of the vector.Examples> x1 x1 [1] 0 0 0 0 0 0 0 0 0 0 > x2 x2 [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

Read More

What is parameter binding in C# ASP.NET WebAPI?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 19-Aug-2020 2K+ Views

Binding is a process to set values for the parameters when Web API calls a controller action method.Web API methods with the different types of the parameters and how to customize the binding process.If the parameter is a simple type like int, bool, double, etc., Web API tries to get the value from the URI (Either from route data or from the Query String)if the parameter is a complex type like Customer, Employee, etc., then the Web API Framework tries to get the value from the request body.We can change this default behavior of the parameter binding process by using ...

Read More

How to configure C# ASP.NET WebAPI in web.configure file?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 19-Aug-2020 1K+ Views

No we cannot configure WEB API in web.configure file.Web API supports code based configuration. It cannot be configured in web.config file.We can configure WEB API, to customize the behaviour of Web Api hosting Infrastructure and component such asRoutesFormattersFiltersDependency ResolverMessage HandlersParameterBindingRulesPropertiesServicesRoutes − The public methods of the controller are called action methods or simply actions.When the Web API framework receives a request, it routes the request to an action. To determine which action to invoke, the framework uses a routing tableroutes.MapHttpRoute(    name: "API Default",    routeTemplate: "api/{controller}/{id}",    defaults: new { id = RouteParameter.Optional } );Formatters −ASP.NET Core MVC supports ...

Read More
Showing 1691–1700 of 1,958 articles
« Prev 1 168 169 170 171 172 196 Next »
Advertisements