Nizamuddin Siddiqui has Published 2303 Articles

What is the difference between int and Int32 in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:35:51

6K+ Views

Int32 is a type provided by .NET framework whereas int is an alias for Int32 in C# language.Int32 x = 5;int x = 5;So, in use both the above statements will hold a 32bit integer. They compile to the same code, so at execution time there is no difference whatsoever.The ... Read More

How to store n number of lists of different types in a single generic list in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:30:13

827 Views

We can store n number of lists of different types in a single generic list by creating a list of list of objects as shown below.List list = new List();Example Live Demousing System; using System.Collections.Generic; namespace MyApplication{    public class Program{       public static void Main(){       ... Read More

What is the use of "is" keyword in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:28:19

401 Views

The "is" keyword is used to check if an object can be casted to a specific type. The return type of the operation is Boolean.Exampleusing System; namespace DemoApplication{    class Program{       static void Main(){          Employee emp = new PermanentEmployee{         ... Read More

What if we are not sure of the type of value that we want to store in a variable. How to handle this in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 04-Aug-2020 06:25:55

102 Views

As C# is a strongly-typed language, every variable and constant has a pre-defined type. Before using any variable, we must tell the compiler what type of value a variable will store.If we are not sure about the type, then it is handled using dynamic programming. Dynamic programming is supported by ... Read More

How to write text and output it as a text file using R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 11-Jul-2020 12:56:06

844 Views

The easiest way to write text and obtain it as an output is done by using writeLines function and cat function, and the output of these functions are connected with the help fileConn and sink.Example> fileConn writeLines(c("TutorialsPoint", "SIMPLY EASY LEARNING"), fileConn) > close(fileConn)We can do the same and view these ... Read More

What is the use of tilde operator (~) in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 11-Jul-2020 12:55:17

4K+ Views

Tilde operator is used to define the relationship between dependent variable and independent variables in a statistical model formula. The variable on the left-hand side of tilde operator is the dependent variable and the variable(s) on the right-hand side of tilde operator is/are called the independent variable(s). So, tilde operator ... Read More

How to simulate discrete uniform random variable in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 11-Jul-2020 12:54:09

4K+ Views

There is no function in base R to simulate discrete uniform random variable like we have for other random variables such as Normal, Poisson, Exponential etc. but we can simulate it using rdunif function of purrr package.The rdunif function has the following syntax −> rdunif(n, b , a)Here, n = ... Read More

Which function should be used to load a package in R, require or library?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 06-Jul-2020 15:02:01

543 Views

The main difference between require and library is that require was designed to use inside functions and library is used to load packages. If a package is not available then library throws an error on the other hand require gives a warning message.Using library> library(xyz) Error in library(xyz) : there ... Read More

How to deal with “could not find function” error in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 06-Jul-2020 15:01:06

10K+ Views

The error “could not find function” occurs due to the following reasons −Function name is incorrect. Always remember that function names are case sensitive in R.The package that contains the function was not installed. We have to install packages in R once before using any function contained by them. It ... Read More

How to do an inner join and outer join of two data frames in R?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 06-Jul-2020 15:00:12

871 Views

An inner join return only the rows in which the left table have matching keys in the right table and an outer join returns all rows from both tables, join records from the left which have matching keys in the right table. This can be done by using merge function.ExampleInner ... Read More

Advertisements