Nizamuddin Siddiqui has Published 2307 Articles

How to easily initialize a list of Tuples in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 12:03:01

3K+ Views

Tuple can be used where you want to have a data structure to hold an object with properties, but you don't want to create a separate type for it. The Tuple class was introduced in .NET Framework 4.0. A tuple is a data structure that contains a sequence of elements ... Read More

What is an alternative to string.Replace that is case-insensitive in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 12:01:40

2K+ Views

Replace() method is a string method. This method is used to replace all the specified Unicode characters or specified string from the current string object and returns a new modified string. This method can be overloaded by passing arguments to it.Example 1To replace even the case sensitive charaters Regular expressions ... Read More

How to parse a string into a nullable int in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 12:01:07

4K+ Views

C# provides a special data types, the nullable types, to which you can assign normal range of values as well as null values.C# 2.0 introduced nullable types that allow you to assign null to value type variables. You can declare nullable types using Nullable where T is a type.Nullable types ... Read More

What are the benefits to marking a field as readonly in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:58:05

419 Views

The readonly keyword is used to declare a member variable a constant, but allows the value to be calculated at runtime. This differs from a constant declared with the const modifier, which must have its value set at compile time. Using readonly you can set the value of the field ... Read More

How to find the position of a data frame’s column value based on a column value of another data frame in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:55:24

539 Views

In data analysis, we encounter many problems with a lot of variations among them. One such problem is we have some information in a place that needs to be checked through a different place and these places can be data frames. Therefore, we need to find the position of a ... Read More

How to find the distance among matrix values in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:54:21

76 Views

Finding the distance among matrix values means that we want to find the distance matrix and it can be directly found by using dist function with the matrix name. For example, suppose we have a matrix of size 5x5 named as M then the distance matrix can be calculated as ... Read More

How to plot the X-axis labels on the upper-side of the plot in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:52:48

655 Views

By default, the X−axis labels are plotted on the bottom−axis of the plot and that is referred to as the first axis of axis 1, the second axis is the axis on the left−side, the third axis is the axis on the upper side of the plot, and the fourth ... Read More

How to add a data frame inside a list in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:48:56

2K+ Views

A list may contain many objects such as vector, matrix, data frame, list etc. In this way, we can have access to all the necessary objects at the same time. If we want to add a data frame inside a list then we can use the length of the list. ... Read More

How to perform group-wise linear regression for a data frame in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:47:20

5K+ Views

The group−wise linear regression means creating regression model for group levels. For example, if we have a dependent variable y and the independent variable x also a grouping variable G that divides the combination of x and y into multiple groups then we can create a linear regression model for ... Read More

How to create a vector of data frame values by rows in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 07-Nov-2020 11:45:42

5K+ Views

To create a vector of data frame values by rows we can use c function after transposing the data frame with t. For example, if we have a data frame df that contains many columns then the df values can be transformed into a vector by using c(t(df)), this will ... Read More

Advertisements